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 42A84470E5 for ; Thu, 25 Dec 2025 10:22:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B75B4065D; Thu, 25 Dec 2025 10:22:38 +0100 (CET) Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazon11012071.outbound.protection.outlook.com [40.93.195.71]) by mails.dpdk.org (Postfix) with ESMTP id 7B4DA40654 for ; Thu, 25 Dec 2025 10:22:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZJOvXCHKbVj+MjnlQPOhQ8c625us7hHfNWpePsMi8MmXNl+r9lr9cP6l7V6fJfuAz6oAZYejWoV/pFh6bfqaXbgHR0/3UV9dmGRAwJhZDAFM7Mq+dkZMKTFiwoltH7XeUIPfqtSAEwFaud5XqASrMY9lNK2cuhdRlYudxbMCj9r/3HANPOHfvTbbJmrxWHQhSvw6cj/G3u53Vp9cVGXD3PId5exa82VxfQRD0Sa2Nw+89indqzDZOz7Pp/jrRjx2+qi5nl8yJc0zyLzqsmi+aTPqlhNEUo+NP3jcq1mCAp48ufwAun5/JC7qsMaCQSHzVqGxAbwMxJtOkVmjUWAsNg== 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=SyVGkxqE3TMxUgBh6imx68U3mbdU+Cwqy1tM9HenWqI=; b=ijAvK6jdkhotG1TREkapqBdZCstki5JEENeNsBK/FnCJLRw90JCvFne/PP3J37QDD3O9EfuLrO28Ry6RqpptcSTVaG8m5f3ZBgGpp6Ij5BEV3ESAJ4Po+AD2BURmfx5JMlmjwv3eBSsfwdJTtRK4b1QYgS5APqdr7NG9fygLZsbrSyxR8KDD/HVGBkz5zEfq6noJmU10jTCRblootJkvUrjWmF8IKSCP9ZPoixZc0NyLixLvRGue4WJmC/YCAW1TBMrNCAIc5/QGIj41+5IDV33O8MaDKEkdm1ZeysokIaZUQmvY0BRlPiAjJ0aYN00E4UWYgG2q0O3s0e+AKSlJNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=SyVGkxqE3TMxUgBh6imx68U3mbdU+Cwqy1tM9HenWqI=; b=K2hncvSGk5BJYD6BsmCFnnCZ9VOcu2uzi40IUtIlOoNlx3hpDxHCTRDrfOEiOsF6eQH7tmCon4J1lnGkbhXShv7RF7PH/+6J95VNUxH1TMPU+W4qt1R03gN2ytHALCNutzhvEpN3kc4cZi+TnxPf8LLYqb7UQZ9dv72lMD496nOC4PICwbW+2a8rpSRRc2D3xyXxoa+/w9+S8KrjRUmwu6diirmDxRbJgLnqLA+eA3cDMVxKwBoCK1Z/8NDTJjv7IrMZ/3x9SyrvNDOMMCROpwZTvrBYcQxhYV9Dmxr5+7H94vxEDRj7D/PlND85XKp8woH+4m1mv3ShcFmqAhzWxQ== Received: from SJ0PR03CA0199.namprd03.prod.outlook.com (2603:10b6:a03:2ef::24) by MW4PR12MB7383.namprd12.prod.outlook.com (2603:10b6:303:219::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9412.12; Thu, 25 Dec 2025 09:22:30 +0000 Received: from BY1PEPF0001AE16.namprd04.prod.outlook.com (2603:10b6:a03:2ef:cafe::37) by SJ0PR03CA0199.outlook.office365.com (2603:10b6:a03:2ef::24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9434.11 via Frontend Transport; Thu, 25 Dec 2025 09:22:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by BY1PEPF0001AE16.mail.protection.outlook.com (10.167.242.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.9 via Frontend Transport; Thu, 25 Dec 2025 09:22:29 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:22:13 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:22:13 -0800 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 25 Dec 2025 01:22:12 -0800 From: Shani Peretz To: Jiawen Wu CC: dpdk stable Subject: patch 'net/txgbe: fix maximum number of FDIR filters' has been queued to stable release 23.11.6 Date: Thu, 25 Dec 2025 11:17:58 +0200 Message-ID: <20251225091938.345892-37-shperetz@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251225091938.345892-1-shperetz@nvidia.com> References: <20251221145746.763179-93-shperetz@nvidia.com> <20251225091938.345892-1-shperetz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PEPF0001AE16:EE_|MW4PR12MB7383:EE_ X-MS-Office365-Filtering-Correlation-Id: 8027a8d1-f62b-40e0-ce6f-08de4397208f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|36860700013|376014|13003099007|7142099003|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?C29raQhr1aOWNag1n6I0/6Sui+y4H7AMWcUcIWxp0aGyNJ9NtCIoqsl8d8yD?= =?us-ascii?Q?91sYk9q+bLjURuavis0MG++5Dc8PbRSGQhD75w97/ZmaXQPgrsfHNTbEV99t?= =?us-ascii?Q?mbfdroaT4agZAAQiOsz1Pkses1IwTkaPXxYFm/rLQ9/ty0UHEiaBVdSp9MDW?= =?us-ascii?Q?3h5Ew5gV2MQCP5CK0Ec6TtlKdi0oXVKaQ2MF8GFecxG9ZkiJ+Dc9pAO1e2gM?= =?us-ascii?Q?zAsqm80o6/IeL0pmV711UmIf05OEXZd+wFIQck/epybtryfA/e7+CcvczRAZ?= =?us-ascii?Q?PbZ2VjyzNe7xb14TeFiB1uZn6r6j4or8FHPFpPPYiDz06lm9w3wWQnviWA0k?= =?us-ascii?Q?3I/ZECvMULgBc2QPEBgYbDlGqHcbXDG4yllRCmU0+nksbiMHNkNEU/ipQDqU?= =?us-ascii?Q?pp4kHNm1DpcvctoabD8iqD1xyB1vNdQLJfet7BH70UnDCN06Y16nH9F52+lc?= =?us-ascii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DUKHLfGBb22x?= =?us-ascii?Q?NqaiOk36ioIweNz10PdjZoW4Fx6Ai7D8gm0B7bTpuRIOQIzh4ErEF3pQCBGU?= =?us-ascii?Q?fAzRJTr/6sYf7ku/N2Ll7Qsp+qmdrFFujaEdDr1YIF2GG3AzXPhfrIiU5S2q?= =?us-ascii?Q?49IshmBpzGo/msiKx6FKBlsIEMoQ4BXw4duwGxrAnTKmr0e33pML5uN9H0dt?= =?us-ascii?Q?XrfCswGUBUX9jXLBa5D68/q5CpLqsdpQ0AlXJzwd?= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014)(13003099007)(7142099003)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2025 09:22:29.8383 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8027a8d1-f62b-40e0-ce6f-08de4397208f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BY1PEPF0001AE16.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7383 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/30/25. 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/shanipr/dpdk-stable This queued commit can be viewed at: https://github.com/shanipr/dpdk-stable/commit/9fe20672013333dc02b6e2f51ae0fffea3d7b495 Thanks. Shani --- >From 9fe20672013333dc02b6e2f51ae0fffea3d7b495 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Mon, 27 Oct 2025 11:15:32 +0800 Subject: [PATCH] net/txgbe: fix maximum number of FDIR filters [ upstream commit 5b1429fe2674e331d21a8c343d4129e6b7fbcce5 ] FDIR is determined the maximum value on the hardware based on the memory space allocated (i.e. fdir_conf.pballoc). But the hash map of FDIR is created based on TXGBE_MAX_FDIR_FILTER_NUM. These two do not match. It resulted in the absence of error when creating more FDIR rules than the maximum allowed by the hardware. Fixes: 635c21354f9a ("net/txgbe: add flow director filter init and uninit") Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethdev.c | 6 ++++-- drivers/net/txgbe/txgbe_fdir.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index 22fb7fbdfd..01d9fdfb82 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -894,11 +894,13 @@ static int txgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev) static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev) { + struct rte_eth_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(eth_dev); struct txgbe_hw_fdir_info *fdir_info = TXGBE_DEV_FDIR(eth_dev); char fdir_hash_name[RTE_HASH_NAMESIZE]; + u16 max_fdir_num = (1024 << (fdir_conf->pballoc + 1)) - 2; struct rte_hash_parameters fdir_hash_params = { .name = fdir_hash_name, - .entries = TXGBE_MAX_FDIR_FILTER_NUM, + .entries = max_fdir_num, .key_len = sizeof(struct txgbe_atr_input), .hash_func = rte_hash_crc, .hash_func_init_val = 0, @@ -915,7 +917,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev) } fdir_info->hash_map = rte_zmalloc("txgbe", sizeof(struct txgbe_fdir_filter *) * - TXGBE_MAX_FDIR_FILTER_NUM, + max_fdir_num, 0); if (!fdir_info->hash_map) { PMD_INIT_LOG(ERR, diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c index 0d12fb9a11..c4cf39997c 100644 --- a/drivers/net/txgbe/txgbe_fdir.c +++ b/drivers/net/txgbe/txgbe_fdir.c @@ -965,6 +965,7 @@ txgbe_fdir_filter_restore(struct rte_eth_dev *dev) int txgbe_clear_all_fdir_filter(struct rte_eth_dev *dev) { + struct rte_eth_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev); struct txgbe_hw_fdir_info *fdir_info = TXGBE_DEV_FDIR(dev); struct txgbe_fdir_filter *fdir_filter; struct txgbe_fdir_filter *filter_flag; @@ -973,7 +974,8 @@ txgbe_clear_all_fdir_filter(struct rte_eth_dev *dev) /* flush flow director */ rte_hash_reset(fdir_info->hash_handle); memset(fdir_info->hash_map, 0, - sizeof(struct txgbe_fdir_filter *) * TXGBE_MAX_FDIR_FILTER_NUM); + sizeof(struct txgbe_fdir_filter *) * + ((1024 << (fdir_conf->pballoc + 1)) - 2)); filter_flag = TAILQ_FIRST(&fdir_info->fdir_list); while ((fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list))) { TAILQ_REMOVE(&fdir_info->fdir_list, -- 2.43.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-12-25 11:16:38.161331794 +0200 +++ 0037-net-txgbe-fix-maximum-number-of-FDIR-filters.patch 2025-12-25 11:16:35.597901000 +0200 @@ -1 +1 @@ -From 5b1429fe2674e331d21a8c343d4129e6b7fbcce5 Mon Sep 17 00:00:00 2001 +From 9fe20672013333dc02b6e2f51ae0fffea3d7b495 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5b1429fe2674e331d21a8c343d4129e6b7fbcce5 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index e9bbf8ea72..f650c5b7a4 100644 +index 22fb7fbdfd..01d9fdfb82 100644 @@ -25 +26 @@ -@@ -935,11 +935,13 @@ static int txgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev) +@@ -894,11 +894,13 @@ static int txgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev) @@ -40 +41 @@ -@@ -956,7 +958,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev) +@@ -915,7 +917,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev) @@ -50 +51 @@ -index 0efd43b59a..631dec69e8 100644 +index 0d12fb9a11..c4cf39997c 100644 @@ -53 +54 @@ -@@ -959,6 +959,7 @@ txgbe_fdir_filter_restore(struct rte_eth_dev *dev) +@@ -965,6 +965,7 @@ txgbe_fdir_filter_restore(struct rte_eth_dev *dev) @@ -61 +62 @@ -@@ -967,7 +968,8 @@ txgbe_clear_all_fdir_filter(struct rte_eth_dev *dev) +@@ -973,7 +974,8 @@ txgbe_clear_all_fdir_filter(struct rte_eth_dev *dev)