From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3336845D5D for ; Thu, 21 Nov 2024 00:43:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CAD240296; Thu, 21 Nov 2024 00:43:34 +0100 (CET) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id 4021843278 for ; Thu, 21 Nov 2024 00:43:33 +0100 (CET) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3824709ee03so168498f8f.2 for ; Wed, 20 Nov 2024 15:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732146213; x=1732751013; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CawRBk9TpwaJ3EYCxbTqtncc15j5LxgyrEiPMCOobbc=; b=jJnMWxRo5LSOksxs43ql04zybRQ4Qz8GThKaSR07YQQzPclA+b3n/ytu9Fx+WHDNBh kJKF71XlU1Efz5pQF1T91n6+ua6u7kVqorIsc1YE7xzrrqgrNQMldkSX2RIicM6yrcP3 svVWLf9jjfag5k6W/hCfhEEbANhOQQSnmkQjxEhAgh9L0LnV6K4kXubPjpjXGitSY6w/ cS9aPIHYireCt3AqnmsOFcblyYqzBbjcs4ELB1zgP4TD2ZGpFEYFUM+oCdCPbnyb/OJZ V6RBhpOP1qKbDat+61a41Kcqd/f4tZabg3HK/mJCqxeJaReYml+eDIEn0ylv9NcXyhm2 Q7kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732146213; x=1732751013; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CawRBk9TpwaJ3EYCxbTqtncc15j5LxgyrEiPMCOobbc=; b=B9fgu+mU/TepZwVfBXlGekvmk/Mbig67OAGAQ3r6R57qm6ARCMkbE2JqTZio2+coGs JyG842mDszjlE5GFhMzJH0j57mzhcjxP+Eq218N24dc0vOaiR7CtYMWvon9eas88vdQN NUtaw29hxAT47yOLiZVra5oJy51eaLtLurg2nAUp5gkRrinQYorDRiEHJrvcSDhvlnH0 4t/3zhRT5RlmZT8rYfwnb5SicVKNhLMV8tUtfQggAd1cqOFV0qLR0mw8s0AZKI30v59H BBDRCiSSUcFCirdq9g2mRzNLlHjJ2rT07OG63SEc3HxVjJWzXeetnHa4lNTwt9BQTyTJ lk4Q== X-Forwarded-Encrypted: i=1; AJvYcCWu6MUpIlcEAXv9D6Dr0OqG4e00XfP+ZaSv9TDfvWA3D+venPLSmOChdaQdEEOBbtyoTtJd3G4=@dpdk.org X-Gm-Message-State: AOJu0Yybbr+AXO8aiobeRz2WJgG5qe7/UuyViGSbuR1JDTtgRycYA/vT TTTmy6uydiAZP2aNipuonaGBOTtn7Lh1AfX/KvV9PPvL6atPYqAQ X-Google-Smtp-Source: AGHT+IEx3cCPJ788v4ZPHFtMHt6k51WebbPKRBVz0x4y33N6uy8wAUdDFqJlZunaSHbsQhvhd7o89A== X-Received: by 2002:a5d:64ad:0:b0:382:4a0d:5ce5 with SMTP id ffacd0b85a97d-38254add168mr3396641f8f.12.1732146212773; Wed, 20 Nov 2024 15:43:32 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825490c674sm3256738f8f.33.2024.11.20.15.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 15:43:31 -0800 (PST) From: luca.boccassi@gmail.com To: Bing Zhao Cc: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix default RSS flows creation order' has been queued to stable release 22.11.7 Date: Wed, 20 Nov 2024 23:41:45 +0000 Message-ID: <20241120234215.233355-20-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241120234215.233355-1-luca.boccassi@gmail.com> References: <20241112220754.666489-40-luca.boccassi@gmail.com> <20241120234215.233355-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/22/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/318bb3c11d42f286612d9f783aafcfb44aeb7dc1 Thanks. Luca Boccassi --- >From 318bb3c11d42f286612d9f783aafcfb44aeb7dc1 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Wed, 13 Nov 2024 09:19:52 +0200 Subject: [PATCH] net/mlx5: fix default RSS flows creation order [ upstream commit 9a66bb734e1311bcc2bf3b286f7ab6d28975c5c7 ] In both SWS and HWS mode, default ingress RSS flows are always created via the driver on the root table. In the current driver, the first created flow rules will be matched firstly when: 1. >= 2 rules can be matched on the root table. 2. the rules have the same priority. All MC / BC flow rules would have the same priority and discard the input priority from the user space in the driver. All rules have a fixed priority 32 when the Ethernet destination MAC is a MC or BC address. In SWS non-template API, all the device rules are added into the list and applied in a reverse order. This patch syncs default flow rule creation order between SWS and HWS. The order should be: 1. IPv4(6) + TCP/UDP, if required. 2. IPv4(6) only, if required. 3. None IP traffic. Fixes: 9fa7c1cddb85 ("net/mlx5: create control flow rules with HWS") Signed-off-by: Bing Zhao Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_flow.h | 8 ++++---- drivers/net/mlx5/mlx5_flow_hw.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index d523cff739..fb2eb05c06 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -2183,13 +2183,13 @@ enum mlx5_flow_ctrl_rx_eth_pattern_type { /* All types of RSS actions used in control flow rules. */ enum mlx5_flow_ctrl_rx_expanded_rss_type { - MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_NON_IP = 0, - MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV4, + MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6_UDP = 0, + MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6_TCP, MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV4_UDP, MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV4_TCP, MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6, - MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6_UDP, - MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6_TCP, + MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV4, + MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_NON_IP, MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_MAX, }; diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index dd64cb224f..047af4a0c9 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -9782,7 +9782,7 @@ mlx5_flow_hw_ctrl_flows(struct rte_eth_dev *dev, uint32_t flags) struct mlx5_priv *priv = dev->data->dev_private; struct mlx5_flow_hw_ctrl_rx *hw_ctrl_rx; unsigned int i; - unsigned int j; + int j; int ret = 0; RTE_SET_USED(priv); -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-20 23:41:23.416903400 +0000 +++ 0020-net-mlx5-fix-default-RSS-flows-creation-order.patch 2024-11-20 23:41:22.740195468 +0000 @@ -1 +1 @@ -From 9a66bb734e1311bcc2bf3b286f7ab6d28975c5c7 Mon Sep 17 00:00:00 2001 +From 318bb3c11d42f286612d9f783aafcfb44aeb7dc1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9a66bb734e1311bcc2bf3b286f7ab6d28975c5c7 ] + @@ -27 +28,0 @@ -Cc: stable@dpdk.org @@ -37 +38 @@ -index a56e8be97e..bcc2782460 100644 +index d523cff739..fb2eb05c06 100644 @@ -40 +41 @@ -@@ -2916,13 +2916,13 @@ enum mlx5_flow_ctrl_rx_eth_pattern_type { +@@ -2183,13 +2183,13 @@ enum mlx5_flow_ctrl_rx_eth_pattern_type { @@ -59 +60 @@ -index 6ad98d40f7..50dbaa27ab 100644 +index dd64cb224f..047af4a0c9 100644 @@ -62 +63 @@ -@@ -16164,7 +16164,7 @@ mlx5_flow_hw_ctrl_flows(struct rte_eth_dev *dev, uint32_t flags) +@@ -9782,7 +9782,7 @@ mlx5_flow_hw_ctrl_flows(struct rte_eth_dev *dev, uint32_t flags)