summaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3/format.c
diff options
context:
space:
mode:
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);