patch 'net/txgbe: fix maximum number of FDIR filters' has been queued to stable release 22.11.11
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Wed Nov 12 17:52:35 CET 2025
Hi,
FYI, your patch has been queued to stable release 22.11.11
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/14/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1e189319a19d2c048873177a0e4d5a7cdc0a8a9d
Thanks.
Luca Boccassi
---
>From 1e189319a19d2c048873177a0e4d5a7cdc0a8a9d 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 0213159954..8b4a134b08 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -893,11 +893,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,
@@ -914,7 +916,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 0efd43b59a..631dec69e8 100644
--- a/drivers/net/txgbe/txgbe_fdir.c
+++ b/drivers/net/txgbe/txgbe_fdir.c
@@ -959,6 +959,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;
@@ -967,7 +968,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.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-11-12 16:20:41.755377381 +0000
+++ 0021-net-txgbe-fix-maximum-number-of-FDIR-filters.patch 2025-11-12 16:20:40.911716551 +0000
@@ -1 +1 @@
-From 5b1429fe2674e331d21a8c343d4129e6b7fbcce5 Mon Sep 17 00:00:00 2001
+From 1e189319a19d2c048873177a0e4d5a7cdc0a8a9d 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 0213159954..8b4a134b08 100644
@@ -25 +26 @@
-@@ -935,11 +935,13 @@ static int txgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev)
+@@ -893,11 +893,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)
+@@ -914,7 +916,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
More information about the stable
mailing list