From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C5474A04C1; Tue, 26 Nov 2019 09:35:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 99BC24C90; Tue, 26 Nov 2019 09:35:13 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 4D0B02A5D for ; Tue, 26 Nov 2019 09:35:12 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 26 Nov 2019 10:35:05 +0200 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.128.130.87]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id xAQ8Z5TK028221; Tue, 26 Nov 2019 10:35:05 +0200 From: Dekel Peled To: matan@mellanox.com, shahafs@mellanox.com, viacheslavo@mellanox.com Cc: orika@mellanox.com, dev@dpdk.org Date: Tue, 26 Nov 2019 10:34:22 +0200 Message-Id: X-Mailer: git-send-email 1.7.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix flow engine select by rdma-core ver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Recent patch [1] 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. [1] http://patches.dpdk.org/patch/61900/ Fixes: cd4569d2bf3c ("net/mlx5: change default flow engine to DV") Signed-off-by: Dekel Peled Acked-by: Ori Kam --- doc/guides/nics/mlx5.rst | 2 +- doc/guides/rel_notes/release_19_11.rst | 3 +++ drivers/net/mlx5/mlx5.c | 2 +- 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 48c80e5..928698e 100644 --- a/doc/guides/rel_notes/release_19_11.rst +++ b/doc/guides/rel_notes/release_19_11.rst @@ -193,6 +193,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 @@ struct mlx5_flow_id_pool * !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; -- 1.8.3.1