net/virtio-user: fix hugepage files enumeration
authorJianfeng Tan <jianfeng.tan@intel.com>
Thu, 26 Apr 2018 15:34:07 +0000 (15:34 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:47 +0000 (22:31 +0100)
commit169a9da64a859e1782e49886e7214982304a580f
treef61f036c15b54443f72925afa35e5edc255b6924
parentaee6c97f006cea7b1c791b21b222442437ee5403
net/virtio-user: fix hugepage files enumeration

After the commit 2a04139f66b4 ("eal: add single file segments option"),
one hugepage file could contain multiple hugepages which are further
mapped to different memory regions.

Original enumeration implementation cannot handle this situation.

This patch filters out the duplicated files; and adjust the size after
the enumeration.

Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
doc/guides/howto/virtio_user_for_container_networking.rst
drivers/net/virtio/virtio_user/vhost_user.c