summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-10-22 13:38:57 +0200
committerDave Barach <openvpp@barachs.net>2018-10-22 16:10:26 +0000
commit2322798bea16ff4092e2361423af6fd451fd1669 (patch)
treebeec5b680365a31c40bb9ff8ea656e8323aca734 /src/plugins/dpdk/device
parenta26373bda8aa66cebf03ac092c20fdf4b0a0f625 (diff)
vlib: pci improvements
- logging - pass vlib_main_t to all APIs - open vfio container only when needed Change-Id: I897e53e0af3f91c3a99f0c827401d1c0ec2e478a Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r--src/plugins/dpdk/device/init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 58ba6c003c7..7d9ec7e5c80 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -842,6 +842,7 @@ dpdk_lib_init (dpdk_main_t * dm)
static void
dpdk_bind_devices_to_uio (dpdk_config_main_t * conf)
{
+ vlib_main_t *vm = vlib_get_main ();
clib_error_t *error;
u8 *pci_addr = 0;
int num_whitelisted = vec_len (conf->dev_confs);
@@ -860,7 +861,7 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf)
vlib_pci_free_device_info (d);
d = 0;
}
- d = vlib_pci_get_device_info (addr, &error);
+ d = vlib_pci_get_device_info (vm, addr, &error);
if (error)
{
clib_error_report (error);
@@ -928,7 +929,7 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf)
continue;
}
- error = vlib_pci_bind_to_uio (addr, (char *) conf->uio_driver_name);
+ error = vlib_pci_bind_to_uio (vm, addr, (char *) conf->uio_driver_name);
if (error)
{