aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2020-11-13 10:41:21 -0600
committerMatthew Smith <mgsmith@netgate.com>2020-11-18 13:37:22 -0600
commit9585d79f7aae28532f2528efec746a302c0fbcd4 (patch)
treefdd017a0658087de4d3de6a852a4229336d9e517 /src
parent727082016f8822edcf40662d0059d3e8fab5e2ef (diff)
dpdk: change mlx5 pmd name in foreach_dpdk_pmd
Type: fix With DPDK 20.08, mlx5 devices get bound to the mlx5_pci PMD instead of net_mlx5. Update the name in foreach_dpdk_pmd so the PMD will be correctly recognized during initialization. Change-Id: I1863ec55da9fcf6a289959dff22ca2dcc5d114bc Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dpdk/device/dpdk.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index b094a1931cf..ee768f251c6 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -58,6 +58,12 @@ extern vnet_device_class_t dpdk_device_class;
extern vlib_node_registration_t dpdk_input_node;
extern vlib_node_registration_t admin_up_down_process_node;
+#if RTE_VERSION < RTE_VERSION_NUM(20, 8, 0, 0)
+#define DPDK_MLX5_PMD_NAME "net_mlx5"
+#else
+#define DPDK_MLX5_PMD_NAME "mlx5_pci"
+#endif
+
#define foreach_dpdk_pmd \
_ ("net_thunderx", THUNDERX) \
_ ("net_e1000_em", E1000EM) \
@@ -76,7 +82,7 @@ extern vlib_node_registration_t admin_up_down_process_node;
_ ("net_fm10k", FM10K) \
_ ("net_cxgbe", CXGBE) \
_ ("net_mlx4", MLX4) \
- _ ("net_mlx5", MLX5) \
+ _ (DPDK_MLX5_PMD_NAME, MLX5) \
_ ("net_dpaa2", DPAA2) \
_ ("net_virtio_user", VIRTIO_USER) \
_ ("net_vhost", VHOST_ETHER) \