Skip to content

Commit

Permalink
vfio: extend data structure for multi container
Browse files Browse the repository at this point in the history
Currently eal vfio framework binds vfio group fd to the default
container fd during rte_vfio_setup_device, while in some cases,
e.g. vDPA (vhost data path acceleration), we want to put vfio group
to a separate container and program IOMMU via this container.

This patch extends the vfio_config structure to contain per-container
user_mem_maps and defines an array of vfio_config. The next patch will
base on this to add container API.

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
  • Loading branch information
XiaoWang1772 authored and Ferruh Yigit committed Apr 27, 2018
1 parent c0e3f8e commit 340b7bb
Show file tree
Hide file tree
Showing 4 changed files with 290 additions and 140 deletions.
1 change: 1 addition & 0 deletions config/common_base
Expand Up @@ -87,6 +87,7 @@ CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
CONFIG_RTE_EAL_IGB_UIO=n
CONFIG_RTE_EAL_VFIO=n
CONFIG_RTE_MAX_VFIO_GROUPS=64
CONFIG_RTE_MAX_VFIO_CONTAINERS=64
CONFIG_RTE_MALLOC_DEBUG=n
CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n
CONFIG_RTE_USE_LIBBSD=n
Expand Down
1 change: 1 addition & 0 deletions config/rte_config.h
Expand Up @@ -32,6 +32,7 @@
#define RTE_LOG_DP_LEVEL RTE_LOG_INFO
#define RTE_BACKTRACE 1
#define RTE_EAL_VFIO 1
#define RTE_MAX_VFIO_CONTAINERS 64

/* bsd module defines */
#define RTE_CONTIGMEM_MAX_NUM_BUFS 64
Expand Down

0 comments on commit 340b7bb

Please sign in to comment.