dpdk: rename port_id to *_instance_num
[vpp.git] / src / plugins / dpdk / device / format.c
index 3809024..22f37c4 100644 (file)
@@ -213,7 +213,7 @@ format_dpdk_device_name (u8 * s, va_list * args)
       break;
 
     case VNET_DPDK_PORT_TYPE_ETH_BOND:
-      return format (s, "BondEthernet%d", dm->devices[i].port_id);
+      return format (s, "BondEthernet%d", dm->devices[i].bond_instance_num);
 
     case VNET_DPDK_PORT_TYPE_ETH_SWITCH:
       device_name = "EthernetSwitch";
@@ -225,7 +225,7 @@ format_dpdk_device_name (u8 * s, va_list * args)
 
     case VNET_DPDK_PORT_TYPE_AF_PACKET:
       rte_eth_dev_info_get (i, &dev_info);
-      return format (s, "af_packet%d", dm->devices[i].port_id);
+      return format (s, "af_packet%d", dm->devices[i].af_packet_instance_num);
 
     case VNET_DPDK_PORT_TYPE_VIRTIO_USER:
       device_name = "VirtioUser";
@@ -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,14 @@ 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;
+
+    case VNET_DPDK_PMD_LIOVF_ETHER:
+      dev_type = "Cavium Lio VF";
+      break;
+
     default:
     case VNET_DPDK_PMD_UNKNOWN:
       dev_type = "### UNKNOWN ###";