patch 'net/i40e: fix FDIR memzone leak' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 5 17:42:26 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
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/07/26. 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/8810e48ea176681facd1230dc34c0266d6f61e60
Thanks.
Luca Boccassi
---
>From 8810e48ea176681facd1230dc34c0266d6f61e60 Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Fri, 23 Oct 2026 10:31:30 +0000
Subject: [PATCH] net/i40e: fix FDIR memzone leak
[ upstream commit d1559bcb7ed3633c01026e91b26eac89e16e0578 ]
The memzone holding the flow director programming packets is reserved
in i40e_fdir_setup() but never freed, as i40e_fdir_teardown() only
releases the FDIR queues and VSI.
It is therefore leaked when the port is closed.
Store the memzone pointer and free it on teardown.
Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
Fixes: 71d35259ff67 ("i40e: tear down flow director")
Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/i40e/i40e_ethdev.h | 1 +
drivers/net/i40e/i40e_fdir.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index f4ff945a60d..7b5b432eab1 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -742,6 +742,7 @@ struct i40e_fdir_info {
struct i40e_rx_queue *rxq;
void *prg_pkt[I40E_FDIR_PRG_PKT_CNT]; /* memory for fdir program packet */
uint64_t dma_addr[I40E_FDIR_PRG_PKT_CNT]; /* physic address of packet memory*/
+ const struct rte_memzone *prg_mz; /* memzone backing prg_pkt */
/*
* txq available buffer counter, indicates how many available buffers
* for fdir programming, initialized as I40E_FDIR_PRG_PKT_CNT
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index f66d6934a91..d21db8784a6 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -254,6 +254,8 @@ i40e_fdir_setup(struct i40e_pf *pf)
I40E_FDIR_PKT_LEN * i;
}
+ pf->fdir.prg_mz = mz;
+
pf->fdir.match_counter_index = I40E_COUNTER_INDEX_FDIR(hw->pf_id);
pf->fdir.fdir_actual_cnt = 0;
pf->fdir.fdir_guarantee_free_space =
@@ -304,6 +306,8 @@ i40e_fdir_teardown(struct i40e_pf *pf)
pf->fdir.rxq = NULL;
i40e_tx_queue_release(pf->fdir.txq);
pf->fdir.txq = NULL;
+ rte_memzone_free(pf->fdir.prg_mz);
+ pf->fdir.prg_mz = NULL;
i40e_vsi_release(vsi);
pf->fdir.fdir_vsi = NULL;
}
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-11-05 16:42:47.247101128 +0000
+++ 0059-net-i40e-fix-FDIR-memzone-leak.patch 2026-11-05 16:42:44.985062699 +0000
@@ -1 +1 @@
-From d1559bcb7ed3633c01026e91b26eac89e16e0578 Mon Sep 17 00:00:00 2001
+From 8810e48ea176681facd1230dc34c0266d6f61e60 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d1559bcb7ed3633c01026e91b26eac89e16e0578 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -20,2 +21,2 @@
- drivers/net/intel/i40e/i40e_ethdev.h | 1 +
- drivers/net/intel/i40e/i40e_fdir.c | 4 ++++
+ drivers/net/i40e/i40e_ethdev.h | 1 +
+ drivers/net/i40e/i40e_fdir.c | 4 ++++
@@ -24,6 +25,6 @@
-diff --git a/drivers/net/intel/i40e/i40e_ethdev.h b/drivers/net/intel/i40e/i40e_ethdev.h
-index 68bff99b5d..77f79fc7da 100644
---- a/drivers/net/intel/i40e/i40e_ethdev.h
-+++ b/drivers/net/intel/i40e/i40e_ethdev.h
-@@ -790,6 +790,7 @@ struct i40e_fdir_info {
- struct ci_rx_queue *rxq;
+diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
+index f4ff945a60d..7b5b432eab1 100644
+--- a/drivers/net/i40e/i40e_ethdev.h
++++ b/drivers/net/i40e/i40e_ethdev.h
+@@ -742,6 +742,7 @@ struct i40e_fdir_info {
+ struct i40e_rx_queue *rxq;
@@ -36,5 +37,5 @@
-diff --git a/drivers/net/intel/i40e/i40e_fdir.c b/drivers/net/intel/i40e/i40e_fdir.c
-index 71cab77e83..2464eb47c2 100644
---- a/drivers/net/intel/i40e/i40e_fdir.c
-+++ b/drivers/net/intel/i40e/i40e_fdir.c
-@@ -241,6 +241,8 @@ i40e_fdir_setup(struct i40e_pf *pf)
+diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
+index f66d6934a91..d21db8784a6 100644
+--- a/drivers/net/i40e/i40e_fdir.c
++++ b/drivers/net/i40e/i40e_fdir.c
+@@ -254,6 +254,8 @@ i40e_fdir_setup(struct i40e_pf *pf)
@@ -47,3 +48,3 @@
-
- PMD_DRV_LOG(INFO, "FDIR setup successfully, with programming queue %u.",
-@@ -297,6 +299,8 @@ i40e_fdir_teardown(struct i40e_pf *pf)
+ pf->fdir.fdir_actual_cnt = 0;
+ pf->fdir.fdir_guarantee_free_space =
+@@ -304,6 +306,8 @@ i40e_fdir_teardown(struct i40e_pf *pf)
More information about the stable
mailing list