summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDekel Peled <dekelp@mellanox.com>2019-11-26 10:34:22 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-26 18:05:15 +0100
commit0adf23adcbb521cd45e2eb88e15aa57317828433 (patch)
tree1081fef3ff35bbd2f24f4991cefc46f44875b7df
parentc2c0aa75cd0170cc243baf267622f7c3c5309fd5 (diff)
downloaddpdk-0adf23adcbb521cd45e2eb88e15aa57317828433.zip
dpdk-0adf23adcbb521cd45e2eb88e15aa57317828433.tar.gz
dpdk-0adf23adcbb521cd45e2eb88e15aa57317828433.tar.xz
net/mlx5: fix flow engine choice
Commit in fixes line sets the DV (Direct Verbs) flow engine as default. Newer versions of DV flow engine use the DR (Direct Rules) features. DR is supported from RDMA Core library version rdma-core-24.0. This cause failure to start port when using older rdma-core version, without DR support. This patch selects DV flow engine if rdma-core version is v24.0 or higher. Verbs flow engine is selected otherwise. Fixes: cd4569d2bf3c ("net/mlx5: change default flow engine to DV") Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>
-rw-r--r--doc/guides/nics/mlx5.rst2
-rw-r--r--doc/guides/rel_notes/release_19_11.rst3
-rw-r--r--drivers/net/mlx5/mlx5.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 2080766..771970f 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -673,7 +673,7 @@ Run-time configuration
- ``dv_flow_en`` parameter [int]
A nonzero value enables the DV flow steering assuming it is supported
- by the driver.
+ by the driver (RDMA Core library version is rdma-core-24.0 or higher).
Enabled by default if supported.
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 8498fa8..901e7c4 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -210,6 +210,9 @@ New Features
* Added support for matching on packets withe Geneve tunnel header.
* Added hairpin support.
* Added ConnectX6-DX support.
+ * Flow engine selected based on RDMA Core library version.
+ DV flow engine selected if version is rdma-core-24.0 or higher.
+ Verbs flow engine selected otherwise.
* **Updated the AF_XDP PMD.**
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 59ae408..8abd1b1 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2428,7 +2428,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
!defined(HAVE_IBV_DEVICE_COUNTERS_SET_V45)
DRV_LOG(DEBUG, "counters are not supported");
#endif
-#ifndef HAVE_IBV_FLOW_DV_SUPPORT
+#if !defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_MLX5DV_DR)
if (config.dv_flow_en) {
DRV_LOG(WARNING, "DV flow is not supported");
config.dv_flow_en = 0;