summaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3/format.c
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/vmxnet3/format.c
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/vmxnet3/format.c')
-rw-r--r--src/plugins/vmxnet3/format.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/vmxnet3/format.c b/src/plugins/vmxnet3/format.c
index 56904652a79..c1a74367436 100644
--- a/src/plugins/vmxnet3/format.c
+++ b/src/plugins/vmxnet3/format.c
@@ -25,10 +25,11 @@
u8 *
format_vmxnet3_device_name (u8 * s, va_list * args)
{
+ vlib_main_t *vm = vlib_get_main ();
u32 i = va_arg (*args, u32);
vmxnet3_main_t *vmxm = &vmxnet3_main;
vmxnet3_device_t *vd = vec_elt_at_index (vmxm->devices, i);
- vlib_pci_addr_t *addr = vlib_pci_get_addr (vd->pci_dev_handle);
+ vlib_pci_addr_t *addr = vlib_pci_get_addr (vm, vd->pci_dev_handle);
s = format (s, "vmxnet3-%x/%x/%x/%x",
addr->domain, addr->bus, addr->slot, addr->function);