aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/format.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-12-23 11:19:30 +0100
committerDamjan Marion <damarion@cisco.com>2018-12-23 11:45:49 +0100
commitc811663491262fdc01e8309b1f9ecde2a110a84d (patch)
tree2c9b343c9cc7765b6c67999ef4a8dfccc391e905 /src/plugins/avf/format.c
parentc227e4950d3bc791d2ec4a2131916f9b5c40f008 (diff)
avf: add option to specify interface name
Change-Id: I94591d5b103280f8df157819d423fef7ee89d4c8 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/format.c')
-rw-r--r--src/plugins/avf/format.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/avf/format.c b/src/plugins/avf/format.c
index 3a1e1ff7f44..ed99e5861c8 100644
--- a/src/plugins/avf/format.c
+++ b/src/plugins/avf/format.c
@@ -31,6 +31,9 @@ format_avf_device_name (u8 * s, va_list * args)
avf_device_t *ad = vec_elt_at_index (am->devices, i);
vlib_pci_addr_t *addr = vlib_pci_get_addr (vm, ad->pci_dev_handle);
+ if (ad->name)
+ return format (s, "%s", ad->name);
+
s = format (s, "avf-%x/%x/%x/%x",
addr->domain, addr->bus, addr->slot, addr->function);
return s;