summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/avf/format.c')
-rw-r--r--src/plugins/avf/format.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/avf/format.c b/src/plugins/avf/format.c
index 4eab3198766..3a1e1ff7f44 100644
--- a/src/plugins/avf/format.c
+++ b/src/plugins/avf/format.c
@@ -25,10 +25,11 @@
u8 *
format_avf_device_name (u8 * s, va_list * args)
{
+ vlib_main_t *vm = vlib_get_main ();
u32 i = va_arg (*args, u32);
avf_main_t *am = &avf_main;
avf_device_t *ad = vec_elt_at_index (am->devices, i);
- vlib_pci_addr_t *addr = vlib_pci_get_addr (ad->pci_dev_handle);
+ vlib_pci_addr_t *addr = vlib_pci_get_addr (vm, ad->pci_dev_handle);
s = format (s, "avf-%x/%x/%x/%x",
addr->domain, addr->bus, addr->slot, addr->function);