]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx5: fix flow engine choice
authorDekel Peled <dekelp@mellanox.com>
Tue, 26 Nov 2019 08:34:22 +0000 (10:34 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 26 Nov 2019 17:05:15 +0000 (18:05 +0100)
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>
doc/guides/nics/mlx5.rst
doc/guides/rel_notes/release_19_11.rst
drivers/net/mlx5/mlx5.c

index 2080766966e2e7b39e7326bda5e379ae405ac4f8..771970f62605d634cb8fb2c6a985f157cb8da907 100644 (file)
@@ -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.
 
index 8498fa8aebab3d15f98e7f0710ad18da85604692..901e7c4e9c62f87551692b239bda3cabb7b64d89 100644 (file)
@@ -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.**
 
index 59ae40828c4a54c66b026cf8d6de37550b8713d3..8abd1b1474853d9c915728f3ca00d3abac2425d1 100644 (file)
@@ -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;