summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dpdk/device/dpdk.h4
-rw-r--r--src/plugins/dpdk/device/format.c16
-rwxr-xr-xsrc/plugins/dpdk/device/init.c23
3 files changed, 43 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index 4f4a2e590b2..1f43a484224 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -92,10 +92,14 @@ typedef enum
typedef enum
{
VNET_DPDK_PORT_TYPE_ETH_1G,
+ VNET_DPDK_PORT_TYPE_ETH_2_5G,
+ VNET_DPDK_PORT_TYPE_ETH_5G,
VNET_DPDK_PORT_TYPE_ETH_10G,
+ VNET_DPDK_PORT_TYPE_ETH_20G,
VNET_DPDK_PORT_TYPE_ETH_25G,
VNET_DPDK_PORT_TYPE_ETH_40G,
VNET_DPDK_PORT_TYPE_ETH_50G,
+ VNET_DPDK_PORT_TYPE_ETH_56G,
VNET_DPDK_PORT_TYPE_ETH_100G,
VNET_DPDK_PORT_TYPE_ETH_BOND,
VNET_DPDK_PORT_TYPE_ETH_SWITCH,
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index d661fa72f1c..36f921d598b 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -176,10 +176,22 @@ format_dpdk_device_name (u8 * s, va_list * args)
device_name = "GigabitEthernet";
break;
+ case VNET_DPDK_PORT_TYPE_ETH_2_5G:
+ device_name = "Two_FiveGigabitEthernet";
+ break;
+
+ case VNET_DPDK_PORT_TYPE_ETH_5G:
+ device_name = "FiveGigabitEthernet";
+ break;
+
case VNET_DPDK_PORT_TYPE_ETH_10G:
device_name = "TenGigabitEthernet";
break;
+ case VNET_DPDK_PORT_TYPE_ETH_20G:
+ device_name = "TwentyGigabitEthernet";
+ break;
+
case VNET_DPDK_PORT_TYPE_ETH_25G:
device_name = "TwentyFiveGigabitEthernet";
break;
@@ -192,6 +204,10 @@ format_dpdk_device_name (u8 * s, va_list * args)
device_name = "FiftyGigabitEthernet";
break;
+ case VNET_DPDK_PORT_TYPE_ETH_56G:
+ device_name = "FiftySixGigabitEthernet";
+ break;
+
case VNET_DPDK_PORT_TYPE_ETH_100G:
device_name = "HundredGigabitEthernet";
break;
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 95c5e5ccae8..a425c585dad 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -62,14 +62,22 @@ port_type_from_speed_capa (struct rte_eth_dev_info *dev_info)
if (dev_info->speed_capa & ETH_LINK_SPEED_100G)
return VNET_DPDK_PORT_TYPE_ETH_100G;
+ else if (dev_info->speed_capa & ETH_LINK_SPEED_56G)
+ return VNET_DPDK_PORT_TYPE_ETH_56G;
else if (dev_info->speed_capa & ETH_LINK_SPEED_50G)
return VNET_DPDK_PORT_TYPE_ETH_50G;
else if (dev_info->speed_capa & ETH_LINK_SPEED_40G)
return VNET_DPDK_PORT_TYPE_ETH_40G;
else if (dev_info->speed_capa & ETH_LINK_SPEED_25G)
return VNET_DPDK_PORT_TYPE_ETH_25G;
+ else if (dev_info->speed_capa & ETH_LINK_SPEED_20G)
+ return VNET_DPDK_PORT_TYPE_ETH_20G;
else if (dev_info->speed_capa & ETH_LINK_SPEED_10G)
return VNET_DPDK_PORT_TYPE_ETH_10G;
+ else if (dev_info->speed_capa & ETH_LINK_SPEED_5G)
+ return VNET_DPDK_PORT_TYPE_ETH_5G;
+ else if (dev_info->speed_capa & ETH_LINK_SPEED_2_5G)
+ return VNET_DPDK_PORT_TYPE_ETH_2_5G;
else if (dev_info->speed_capa & ETH_LINK_SPEED_1G)
return VNET_DPDK_PORT_TYPE_ETH_1G;
@@ -1387,15 +1395,30 @@ dpdk_update_link_state (dpdk_device_t * xd, f64 now)
case ETH_SPEED_NUM_1G:
hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_1G;
break;
+ case ETH_SPEED_NUM_2_5G:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_2_5G;
+ break;
+ case ETH_SPEED_NUM_5G:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_5G;
+ break;
case ETH_SPEED_NUM_10G:
hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_10G;
break;
+ case ETH_SPEED_NUM_20G:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_20G;
+ break;
case ETH_SPEED_NUM_25G:
hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_25G;
break;
case ETH_SPEED_NUM_40G:
hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_40G;
break;
+ case ETH_SPEED_NUM_50G:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_50G;
+ break;
+ case ETH_SPEED_NUM_56G:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_56G;
+ break;
case ETH_SPEED_NUM_100G:
hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_100G;
break;