summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorHyong Youb Kim <hyonkim@cisco.com>2019-02-19 04:32:55 -0800
committerDamjan Marion <dmarion@me.com>2019-02-19 14:21:59 +0000
commitaed61801947146e6a93e7791d382bd21d050ee14 (patch)
treeadfe3072b81313c7de36c5c0a42ef5e6820727df /src/plugins
parent30a83d9f167545e9fe2f1085b055f9a64134269e (diff)
dpdk: update Cisco VIC port type
Recent VIC models can support 25, 50, and 100Gbps links. Use the helper (port_type_from_link_speed) to set the port type as it supports all possible link speeds. Change-Id: I748d8ac716a6393d116a9db8a599151c70a9000a Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dpdk/device/init.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index ffd63ea0514..ef16f46d298 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -441,10 +441,7 @@ dpdk_lib_init (dpdk_main_t * dm)
/* Cisco VIC */
case VNET_DPDK_PMD_ENIC:
- if (l.link_speed == 40000)
- xd->port_type = VNET_DPDK_PORT_TYPE_ETH_40G;
- else
- xd->port_type = VNET_DPDK_PORT_TYPE_ETH_10G;
+ xd->port_type = port_type_from_link_speed (l.link_speed);
break;
/* Intel Red Rock Canyon */