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 4900BA034E; Thu, 7 Nov 2019 16:05:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 633B21BF47; Thu, 7 Nov 2019 16:04:29 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 27FBD1BF2B for ; Thu, 7 Nov 2019 16:04:27 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 7 Nov 2019 17:04:26 +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 xA7F4PcF008594; Thu, 7 Nov 2019 17:04:25 +0200 From: Dekel Peled To: matan@mellanox.com, shahafs@mellanox.com, viacheslavo@mellanox.com Cc: orika@mellanox.com, dev@dpdk.org Date: Thu, 7 Nov 2019 17:04:19 +0200 Message-Id: <68c9b97142373f84eb6af76e5fcf3178bfe4e21c.1573138940.git.dekelp@mellanox.com> X-Mailer: git-send-email 1.7.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix condition to create default rule 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" Previous patch added creation of a default flow rule on port start. Rule is created under the condition that device is in eswitch mode, and is not a VF, to make sure rule is created only once. In Bluefield, where PF representor is used, this condition is not sufficient. Rule is created twice, causing loss of traffic. This patch updates this condition, adding check that device is also not a representor. Fixes: b67b4ecbde22 ("net/mlx5: skip table zero to improve insertion rate") Signed-off-by: Dekel Peled --- drivers/net/mlx5/mlx5_trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index cafab25..f4dc047 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -420,7 +420,7 @@ } mlx5_txq_release(dev, i); } - if (priv->config.dv_esw_en && !priv->config.vf) + if (priv->config.dv_esw_en && !priv->config.vf && !priv->representor) if (!mlx5_flow_create_esw_table_zero_flow(dev)) goto error; if (priv->isolated) -- 1.8.3.1