patch 'net/txgbe: fix maximum number of FDIR filters' has been queued to stable release 24.11.4

Kevin Traynor ktraynor at redhat.com
Fri Nov 21 12:20:13 CET 2025


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 <jiawenwu at trustnetic.com>
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 <jiawenwu at trustnetic.com>
---
 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 at 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)



More information about the stable mailing list