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 CE5AE48B69 for ; Fri, 21 Nov 2025 12:22:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C70114026F; Fri, 21 Nov 2025 12:22:52 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 337474026F for ; Fri, 21 Nov 2025 12:22:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S2HCEucRyIOzie8KgD4WTlU9cZrCXoBMd8QZAYaIoeA=; b=bL/XaHzLVpS5Y8LG+qOywvsSDsffaFQAj7LRalJRJCgMZtXRhC0NUrTdr42+w/eN49LTJv rNfxhQm5ghLlzRacFdBDMPBk2rfaTl/OPgNLZRDffz5NGhQSC4ONij5l695rlHehdNMrUV l0H4veeValHMZiGKB2din9MJIrXRm3k= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-656-tjtY47ESOI6yIke1ec3Pug-1; Fri, 21 Nov 2025 06:22:49 -0500 X-MC-Unique: tjtY47ESOI6yIke1ec3Pug-1 X-Mimecast-MFC-AGG-ID: tjtY47ESOI6yIke1ec3Pug_1763724168 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A1942195608E; Fri, 21 Nov 2025 11:22:48 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7C43A30044E8; Fri, 21 Nov 2025 11:22:47 +0000 (UTC) From: Kevin Traynor To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/txgbe: fix maximum number of FDIR filters' has been queued to stable release 24.11.4 Date: Fri, 21 Nov 2025 11:20:13 +0000 Message-ID: <20251121112128.485623-29-ktraynor@redhat.com> In-Reply-To: <20251121112128.485623-1-ktraynor@redhat.com> References: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: TrGCBMfu-ZqpSJ1FVHmiO33IrxsMIRExXkvM41BANas_1763724168 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 24.11.4 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/26/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/cec2df5b6cf66453c1b89ceb9ae9495ed11eb709 Thanks. Kevin --- >From cec2df5b6cf66453c1b89ceb9ae9495ed11eb709 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 1a92cd26c9..7df1841561 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -896,9 +896,11 @@ 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, @@ -917,5 +919,5 @@ 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) { diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c index 0efd43b59a..631dec69e8 100644 --- a/drivers/net/txgbe/txgbe_fdir.c +++ b/drivers/net/txgbe/txgbe_fdir.c @@ -960,4 +960,5 @@ 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; @@ -968,5 +969,6 @@ txgbe_clear_all_fdir_filter(struct rte_eth_dev *dev) 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))) { -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-21 11:05:10.518395587 +0000 +++ 0029-net-txgbe-fix-maximum-number-of-FDIR-filters.patch 2025-11-21 11:05:09.418200977 +0000 @@ -1 +1 @@ -From 5b1429fe2674e331d21a8c343d4129e6b7fbcce5 Mon Sep 17 00:00:00 2001 +From cec2df5b6cf66453c1b89ceb9ae9495ed11eb709 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 1a92cd26c9..7df1841561 100644 @@ -25 +26 @@ -@@ -936,9 +936,11 @@ static int txgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev) +@@ -896,9 +896,11 @@ static int txgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev) @@ -38 +39 @@ -@@ -957,5 +959,5 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev) +@@ -917,5 +919,5 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)