aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-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 84f86ae28dd..6328d115b42 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 110d74571b5..ca9053264dc 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];