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 7D8EE457A1 for ; Mon, 12 Aug 2024 14:58:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76BF340668; Mon, 12 Aug 2024 14:58:08 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2042.outbound.protection.outlook.com [40.107.244.42]) by mails.dpdk.org (Postfix) with ESMTP id CA8934029C for ; Mon, 12 Aug 2024 14:58:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BloUGDOUq110m4KH7JwAm6/CrgCVxecxrht4TsyKyftwmM3Ja/zurAA/F7wyTgBD1F32Rs58EGbDbJ9nj8jPJ8jlA3sjkUbv0GBFfWdEMXhgLX/usKo6KHYvdLyTZtCZbywW37NQGZ2JCqJMboQhnWaMeImyq4lQtwPJ9XfuXqD3Dme9IBMIUdR4twOchrIJOdl5QC1tPHsxW/giwTjc8aa3lHMKtJI/Hrr+wPS1BVlzSCD/i9gBLUiNiYcgnUMiXy+MeaSaT0UHYYqDnu8LGC1QXafBkaN7a4fnRpOaPetTMFDi5WsgVDHMyiLsSR3CoKZz2MFsPbZOqnR6794Lcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/3K0m2GG3Z+a01NeRUJbWuuzFuHavxl/A0Tch7Ug43A=; b=omhEk9iVKWovbawu+UvJfGFN4T230RXYh83KlN7fWne29+HULGakLteUIvc+8riGS+2MIYJDbM6eKdyX7/GFb4qL8cRyB/3az67NtIkSCiBgJBNh7Cu8WohPGcgwSnEn4de1G6uBSQG9yaTXqGW57Z7MzUm6S/IIas4HjXzJR7DzWe4vd8W5YDv4cwBxoeyYnowfzgO6Ggny56V/ZQvdTzN1ecMd0ZPYCPdH4BP1xZsNl7IB1N/spSrXrpmtw+Xrb+pKdqaU6ddypSI0e77769b8bqhLZYzO5fh+654XNxoNn9r7cFPDsqqpBvnSTGSSewMH1+4PDSlXLTpyI4rCmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=trustnetic.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/3K0m2GG3Z+a01NeRUJbWuuzFuHavxl/A0Tch7Ug43A=; b=ZEGHrcXpjwjPyzmfAAiijoUlQm/3ErzNus5FRvAsplxxUOvzSppKHE9o5ZoYtmC47ZtzfwMHYuD2hR15rF5O/TM8Be4CgE4LtyVrqozJyDLJqgBf5A5IG3INb0j5TCRP7/+epSqjcExmXwa2nFw2tN1l2Me2MyhKJTTTiMrOvgJ966hnE+pgkhZZOySoktIYqWTq1sWVYrZJdLDZ/zkADWFucZ9bZT57KrZs8NK6T+W4o7Wtzh3Rw+W1oWYuMvSr11O022nk6wlpFrvKtpFCpmrUt/kgukFFqyZtM/Y03xe9SAfZeWUZczIEO5rzktkiujVgs3fwlBgRbh2C2zXDlw== Received: from SJ0PR13CA0002.namprd13.prod.outlook.com (2603:10b6:a03:2c0::7) by CH3PR12MB8402.namprd12.prod.outlook.com (2603:10b6:610:132::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20; Mon, 12 Aug 2024 12:58:03 +0000 Received: from CO1PEPF000042AA.namprd03.prod.outlook.com (2603:10b6:a03:2c0:cafe::1e) by SJ0PR13CA0002.outlook.office365.com (2603:10b6:a03:2c0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20 via Frontend Transport; Mon, 12 Aug 2024 12:58:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000042AA.mail.protection.outlook.com (10.167.243.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19 via Frontend Transport; Mon, 12 Aug 2024 12:58:03 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 12 Aug 2024 05:57:36 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 12 Aug 2024 05:57:34 -0700 From: Xueming Li To: Jiawen Wu CC: , dpdk stable Subject: patch 'net/txgbe: fix flow filters in VT mode' has been queued to stable release 23.11.2 Date: Mon, 12 Aug 2024 20:49:08 +0800 Message-ID: <20240812125035.389667-72-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240812125035.389667-1-xuemingl@nvidia.com> References: <20240712110153.309690-23-xuemingl@nvidia.com> <20240812125035.389667-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042AA:EE_|CH3PR12MB8402:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ef599bb-b50d-4e9a-7e45-08dcbace66fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?6tOqzcC54ZIZouYgVaZ3lCvKjZQobVe6faAniWamgJWsyv0FxHAPzelQYYkG?= =?us-ascii?Q?KWOxPwNvoUDFzKduHa0OVTsrlQm48IIVzELO3bRH19h5b213Vb71Flm0IF1Q?= =?us-ascii?Q?2BNtHde/KJAKWaVkLsISOkyAQ5GResp8up4M8cyy1ZCcNFY4547TBI4/oDA0?= =?us-ascii?Q?1rs+Rj60Lr+Eqsv4upjJ7y61POlzTVywRi0XIs5fHnmSyG2ZR5A6VPyNXpk/?= =?us-ascii?Q?ychoyYWNkFqG95GqSnG7A64UovWu7ZeGjcoHDAPT7EAgunXxngLF8jx05EkL?= =?us-ascii?Q?EfRHlJ0zJfWSXNCLTrqyE2VncPlthsIp+wtCK9hMcvP+DEx3C446FB293Fl9?= =?us-ascii?Q?aSbPBRPPYkCE5TBwVaPrV8cq+fkU25T/LlWwdWjnOEYTy7L/TSNcxGEFKlRh?= =?us-ascii?Q?/Py2Qelri6V9DnuRzUsMk97xznFuBp6HwUv83BP7uSKZrSFiLkGH6nT5ht1l?= =?us-ascii?Q?0RtktNq69UgipEkGAxVUsrMH5Cxv6qj+MgK373U49Z8R8gW6ookNwU37iQct?= =?us-ascii?Q?X1786EvEbf08IReKHA+6JdAPlsgej2Bjo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?Q?MaNFumPo/sGYMy1bMXtJWYG9kUUIWuBw?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2024 12:58:03.1745 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ef599bb-b50d-4e9a-7e45-08dcbace66fc X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AA.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8402 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 23.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/14/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6ea637699a7fa4897cb24947dab91c334e68ed98 Thanks. Xueming Li --- >From 6ea637699a7fa4897cb24947dab91c334e68ed98 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Tue, 18 Jun 2024 15:11:33 +0800 Subject: [PATCH] net/txgbe: fix flow filters in VT mode Cc: Xueming Li [ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ] In virtualization mode, target pool should be determined for the filters. For ether type filter, virtualization mode must be enabled to filter broadcast/multicast packets due to hardware limitations. Fixes: f8e2cfc7702b ("net/txgbe: support ethertype filter add and delete") Fixes: 77a72b4d9dc0 ("net/txgbe: support ntuple filter add and delete") Fixes: 983a4ef2265b ("net/txgbe: support syn filter add and delete") Fixes: 08d61139be0a ("net/txgbe: support flow director filter add and delete") Fixes: 9fdfed08a5e3 ("net/txgbe: restore RSS filter") Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethdev.c | 24 +++++++++++++++++++++--- drivers/net/txgbe/txgbe_fdir.c | 3 +++ drivers/net/txgbe/txgbe_rxtx.c | 8 +++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index 6bc231a130..33e4c2ec9b 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -4004,6 +4004,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, struct txgbe_filter_info *filter_info = TXGBE_DEV_FILTER(dev); uint32_t syn_info; uint32_t synqf; + uint16_t queue; if (filter->queue >= TXGBE_MAX_RX_QUEUE_NUM) return -EINVAL; @@ -4013,7 +4014,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, if (add) { if (syn_info & TXGBE_SYNCLS_ENA) return -EINVAL; - synqf = (uint32_t)TXGBE_SYNCLS_QPID(filter->queue); + if (RTE_ETH_DEV_SRIOV(dev).active) + queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue; + else + queue = filter->queue; + synqf = (uint32_t)TXGBE_SYNCLS_QPID(queue); synqf |= TXGBE_SYNCLS_ENA; if (filter->hig_pri) @@ -4082,7 +4087,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev, wr32(hw, TXGBE_5TFPORT(i), sdpqf); wr32(hw, TXGBE_5TFCTL0(i), ftqf); - l34timir |= TXGBE_5TFCTL1_QP(filter->queue); + if (RTE_ETH_DEV_SRIOV(dev).active) + l34timir |= TXGBE_5TFCTL1_QP(RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue); + else + l34timir |= TXGBE_5TFCTL1_QP(filter->queue); wr32(hw, TXGBE_5TFCTL1(i), l34timir); } @@ -4366,7 +4374,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, if (add) { etqf = TXGBE_ETFLT_ENA; etqf |= TXGBE_ETFLT_ETID(filter->ether_type); - etqs |= TXGBE_ETCLS_QPID(filter->queue); + if (RTE_ETH_DEV_SRIOV(dev).active) { + int pool, queue; + + pool = RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx; + queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue; + etqf |= TXGBE_ETFLT_POOLENA; + etqf |= TXGBE_ETFLT_POOL(pool); + etqs |= TXGBE_ETCLS_QPID(queue); + } else { + etqs |= TXGBE_ETCLS_QPID(filter->queue); + } etqs |= TXGBE_ETCLS_QENA; ethertype_filter.ethertype = filter->ether_type; diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c index a198b6781b..f627ab681d 100644 --- a/drivers/net/txgbe/txgbe_fdir.c +++ b/drivers/net/txgbe/txgbe_fdir.c @@ -844,6 +844,9 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev, return -EINVAL; } + if (RTE_ETH_DEV_SRIOV(dev).active) + queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + queue; + node = txgbe_fdir_filter_lookup(info, &rule->input); if (node) { if (!update) { diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 0e825f89fe..50207eb6cf 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, uint32_t reta; uint16_t i; uint16_t j; + uint16_t queue; struct rte_eth_rss_conf rss_conf = { .rss_key = conf->conf.key_len ? (void *)(uintptr_t)conf->conf.key : NULL, @@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, for (i = 0, j = 0; i < RTE_ETH_RSS_RETA_SIZE_128; i++, j++) { if (j == conf->conf.queue_num) j = 0; - reta = (reta >> 8) | LS32(conf->conf.queue[j], 24, 0xFF); + if (RTE_ETH_DEV_SRIOV(dev).active) + queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + + conf->conf.queue[j]; + else + queue = conf->conf.queue[j]; + reta = (reta >> 8) | LS32(queue, 24, 0xFF); if ((i & 3) == 3) wr32at(hw, TXGBE_REG_RSSTBL, i >> 2, reta); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-12 20:44:04.857356313 +0800 +++ 0071-net-txgbe-fix-flow-filters-in-VT-mode.patch 2024-08-12 20:44:02.195069314 +0800 @@ -1 +1 @@ -From af8c90f424ff704578971fb07f5005d4615c9f3e Mon Sep 17 00:00:00 2001 +From 6ea637699a7fa4897cb24947dab91c334e68ed98 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index 6d11412616..fa68a5d2ca 100644 +index 6bc231a130..33e4c2ec9b 100644 @@ -28 +30 @@ -@@ -4011,6 +4011,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, +@@ -4004,6 +4004,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, @@ -36 +38 @@ -@@ -4020,7 +4021,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, +@@ -4013,7 +4014,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev, @@ -49 +51 @@ -@@ -4089,7 +4094,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev, +@@ -4082,7 +4087,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev, @@ -61 +63 @@ -@@ -4373,7 +4381,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, +@@ -4366,7 +4374,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev, @@ -95 +97 @@ -index 7731ad8491..35f80d73ac 100644 +index 0e825f89fe..50207eb6cf 100644 @@ -98 +100 @@ -@@ -5160,6 +5160,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, +@@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, @@ -106 +108 @@ -@@ -5192,7 +5193,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev, +@@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,