summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/format.c
diff options
context:
space:
mode:
authorRui Cai <rucai@microsoft.com>2018-05-11 22:13:58 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-12 07:14:09 +0000
commit257d8d4f0fc5019b6d62682d61b07fe02ab4f24a (patch)
tree22eb4a98842eba6e7be5358feaaa66fd23763037 /src/plugins/dpdk/device/format.c
parent60bd3028270b1ae297def6f14b65e24a3697a3ed (diff)
dpdk: Add constants for failsafe PMD
Adding name, enum constants and formatting code for failsafe PMD. This is part of initial effort to enable vpp running over dpdk on failsafe PMD in Microsoft Azure(2/4). Change-Id: I4eb0093db9f666e2635f7ddff451e3c9064bd0c4 Signed-off-by: Rui Cai <rucai@microsoft.com>
Diffstat (limited to 'src/plugins/dpdk/device/format.c')
-rw-r--r--src/plugins/dpdk/device/format.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index 38090244f27..6dd80e01ede 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -235,6 +235,10 @@ format_dpdk_device_name (u8 * s, va_list * args)
device_name = "VhostEthernet";
break;
+ case VNET_DPDK_PORT_TYPE_FAILSAFE:
+ device_name = "FailsafeEthernet";
+ break;
+
default:
case VNET_DPDK_PORT_TYPE_UNKNOWN:
device_name = "UnknownEthernet";
@@ -243,7 +247,8 @@ format_dpdk_device_name (u8 * s, va_list * args)
rte_eth_dev_info_get (i, &dev_info);
- if (dev_info.pci_dev)
+ if (dev_info.pci_dev &&
+ dm->devices[i].port_type != VNET_DPDK_PORT_TYPE_FAILSAFE)
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);
@@ -363,6 +368,10 @@ format_dpdk_device_type (u8 * s, va_list * args)
dev_type = "AWS ENA VF";
break;
+ case VNET_DPDK_PMD_FAILSAFE:
+ dev_type = "Failsafe Ethernet";
+ break;
+
default:
case VNET_DPDK_PMD_UNKNOWN:
dev_type = "### UNKNOWN ###";