summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/devices/dpdk/dpdk.h2
-rw-r--r--vnet/vnet/devices/dpdk/format.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/vnet/vnet/devices/dpdk/dpdk.h b/vnet/vnet/devices/dpdk/dpdk.h
index 19c521bcf3a..554b95f6aa9 100644
--- a/vnet/vnet/devices/dpdk/dpdk.h
+++ b/vnet/vnet/devices/dpdk/dpdk.h
@@ -80,7 +80,7 @@ extern vlib_node_registration_t handoff_dispatch_node;
_ ("net_enic", ENIC) \
_ ("net_vmxnet3", VMXNET3) \
_ ("net_af_packet", AF_PACKET) \
- _ ("net_bonding", BOND) \
+ _ ("rte_bond_pmd", BOND) \
_ ("net_fm10k", FM10K) \
_ ("net_cxgbe", CXGBE) \
_ ("net_dpaa2", DPAA2)
diff --git a/vnet/vnet/devices/dpdk/format.c b/vnet/vnet/devices/dpdk/format.c
index b0e624cddf7..212f10914af 100644
--- a/vnet/vnet/devices/dpdk/format.c
+++ b/vnet/vnet/devices/dpdk/format.c
@@ -183,9 +183,13 @@ format_dpdk_device_name (u8 * s, va_list * args)
}
rte_eth_dev_info_get (i, &dev_info);
- ret = format (s, devname_format, device_name, dev_info.pci_dev->addr.bus,
- dev_info.pci_dev->addr.devid,
- dev_info.pci_dev->addr.function);
+
+ if (dev_info.pci_dev)
+ ret = format (s, devname_format, device_name, dev_info.pci_dev->addr.bus,
+ dev_info.pci_dev->addr.devid,
+ dev_info.pci_dev->addr.function);
+ else
+ ret = format (s, "%s%d", device_name, dm->devices[i].device_index);
if (dm->devices[i].interface_name_suffix)
return format (ret, "/%s", dm->devices[i].interface_name_suffix);