Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E163C433C1 for ; Tue, 30 Mar 2021 13:40:45 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 7F2DB619CB for ; Tue, 30 Mar 2021 13:40:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F2DB619CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5981A140DD9; Tue, 30 Mar 2021 15:40:43 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 5F757406B4 for ; Tue, 30 Mar 2021 15:40:41 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from jackmin@nvidia.com) with SMTP; 30 Mar 2021 16:40:37 +0300 Received: from nvidia.com ([172.27.8.60]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 12UDeYGO032253; Tue, 30 Mar 2021 16:40:35 +0300 From: Xiaoyu Min To: Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Xiaoyu Min , Ori Kam Cc: dev@dpdk.org, stable@dpdk.org Date: Tue, 30 Mar 2021 21:40:32 +0800 Message-Id: X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/mlx5: fix redundant flow after RSS expansion X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" When RSS expand, if there is no expansion happened but completion happened because user only input next protocol field instead of item i.e, ether type == 0x8100 instead of VLAN, an extra flow is created with missing item in order to filter traffic strictly. However, after [1] and [2] the rte_flow_item_eth itself is enough to filter out VLAN traffic, the VLAN item is not needed. This redundant flow will cause faiure in some scenarios on group 0 due to they are the same FTE. Fixes: fc2dd8dd492f ("ethdev: fix expand RSS flows") Cc: stable@dpdk.org [1]: commit 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN items") [2]: commit 86b59a1af671 ("net/mlx5: support VLAN matching fields") Signed-off-by: Xiaoyu Min --- drivers/net/mlx5/mlx5_flow.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index c347f8130e..668c32cf51 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -385,22 +385,6 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size, } node = *next_node ? &graph[*next_node] : NULL; }; - /* no expanded flows but we have missed item, create one rule for it */ - if (buf->entries == 1 && missed != 0) { - elt = 2; - lsize += elt * sizeof(*item) + user_pattern_size; - if (lsize <= size) { - buf->entry[buf->entries].priority = 1; - buf->entry[buf->entries].pattern = addr; - buf->entries++; - flow_items[0].type = missed_item.type; - flow_items[1].type = RTE_FLOW_ITEM_TYPE_END; - rte_memcpy(addr, buf->entry[0].pattern, - user_pattern_size); - addr = (void *)(((uintptr_t)addr) + user_pattern_size); - rte_memcpy(addr, flow_items, elt * sizeof(*item)); - } - } return lsize; } -- 2.31.0