summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
diff options
context:
space:
mode:
authorAlexander Popovsky (apopovsk) <apopovsk@cisco.com>2017-03-17 12:08:16 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-17 20:33:27 +0000
commited812458641e8805e98a5bb399248745bae5d6b7 (patch)
tree808e5fca702eb00f7f2c0213ce483726a95aa083 /src/plugins/dpdk
parent1bd01099a6512b6119bbf337b36222a6f0770d49 (diff)
Fix bonded ethernet PMD name for DPDK 17.02
In DPDK 17.02 bonded PMD name is changed from rte_bond_pmd to net_bonding. Change-Id: I1a57a16b0ae68b5fa56a561a4f75981112228572 Signed-off-by: Alexander Popovsky (apopovsk) <apopovsk@cisco.com>
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r--src/plugins/dpdk/device/dpdk.h21
-rwxr-xr-xsrc/plugins/dpdk/device/init.c10
2 files changed, 24 insertions, 7 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index 84f86ae2..6328d115 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -66,6 +66,26 @@ extern vnet_device_class_t dpdk_device_class;
extern vlib_node_registration_t dpdk_input_node;
extern vlib_node_registration_t handoff_dispatch_node;
+#if RTE_VERSION >= RTE_VERSION_NUM(17, 2, 0, 0)
+#define foreach_dpdk_pmd \
+ _ ("net_thunderx", THUNDERX) \
+ _ ("net_e1000_em", E1000EM) \
+ _ ("net_e1000_igb", IGB) \
+ _ ("net_e1000_igb_vf", IGBVF) \
+ _ ("net_ixgbe", IXGBE) \
+ _ ("net_ixgbe_vf", IXGBEVF) \
+ _ ("net_i40e", I40E) \
+ _ ("net_i40e_vf", I40EVF) \
+ _ ("net_virtio", VIRTIO) \
+ _ ("net_enic", ENIC) \
+ _ ("net_vmxnet3", VMXNET3) \
+ _ ("AF_PACKET PMD", AF_PACKET) \
+ _ ("net_bonding", BOND) \
+ _ ("net_fm10k", FM10K) \
+ _ ("net_cxgbe", CXGBE) \
+ _ ("net_mlx5", MLX5) \
+ _ ("net_dpaa2", DPAA2)
+#else
#define foreach_dpdk_pmd \
_ ("net_thunderx", THUNDERX) \
_ ("net_e1000_em", E1000EM) \
@@ -84,6 +104,7 @@ extern vlib_node_registration_t handoff_dispatch_node;
_ ("net_cxgbe", CXGBE) \
_ ("net_mlx5", MLX5) \
_ ("net_dpaa2", DPAA2)
+#endif
typedef enum
{
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 110d7457..ca905326 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -1872,13 +1872,9 @@ dpdk_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
{
for (i = 0; i < nports; i++)
{
- struct rte_eth_dev_info dev_info;
- rte_eth_dev_info_get (i, &dev_info);
- if (!dev_info.driver_name)
- dev_info.driver_name = dev_info.pci_dev->driver->driver.name;
-
- ASSERT (dev_info.driver_name);
- if (strncmp (dev_info.driver_name, "rte_bond_pmd", 12) == 0)
+ xd = &dm->devices[i];
+ ASSERT (i == xd->device_index);
+ if (xd->pmd == VNET_DPDK_PMD_BOND)
{
u8 addr[6];
u8 slink[16];