patch 'net/iavf: fix memory leaks around IRQ resources' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 5 17:42:17 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/03cdec8098165d264388bcd0cd7d786026771833
Thanks.
Luca Boccassi
---
>From 03cdec8098165d264388bcd0cd7d786026771833 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Fri, 23 Oct 2026 10:32:24 +0100
Subject: [PATCH] net/iavf: fix memory leaks around IRQ resources
[ upstream commit 57d20c5a8486666b3b376c5304890ac763afc280 ]
`iavf_config_rx_queues_irqs()` allocates a queue-vector map and may
enable eventfds and allocate an interrupt vector list. If queue startup
then fails, those resources remain allocated. The queue-vector map is
also retained after a normal stop, leaking it across start/stop cycles.
Release the resources on failed startup and free the queue-vector map
on stop.
Fixes: f593944fc988 ("net/iavf: enable IRQ mapping configuration for large VF")
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index b7476ba49f2..b1a56c0ee9a 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -820,7 +820,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
dev->data->nb_rx_queues)) {
PMD_DRV_LOG(ERR, "Failed to allocate %d rx intr_vec",
dev->data->nb_rx_queues);
- return -1;
+ goto qv_map_alloc_err;
}
}
@@ -947,6 +947,7 @@ config_irq_map_err:
qv_map_alloc_err:
rte_intr_vec_list_free(intr_handle);
+ rte_intr_efd_disable(intr_handle);
return -1;
}
@@ -1000,12 +1001,15 @@ iavf_dev_start(struct rte_eth_dev *dev)
struct rte_intr_handle *intr_handle = dev->intr_handle;
uint16_t num_queue_pairs;
uint16_t index = 0;
+ bool wb_on_itr;
PMD_INIT_FUNC_TRACE();
if (adapter->closed)
return -1;
+ wb_on_itr = (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) != 0;
+
vf->max_pkt_len = dev->data->mtu + IAVF_ETH_OVERHEAD;
vf->num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,
dev->data->nb_tx_queues);
@@ -1060,7 +1064,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
}
/* re-enable intr again, because efd assign may change */
if (dev->data->dev_conf.intr_conf.rxq != 0) {
- if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR)
+ if (wb_on_itr)
rte_intr_disable(intr_handle);
rte_intr_enable(intr_handle);
}
@@ -1079,7 +1083,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
if (iavf_start_queues(dev) != 0) {
PMD_DRV_LOG(ERR, "enable queues failed");
- goto error;
+ goto irq_error;
}
adapter->stopped = 0;
@@ -1089,6 +1093,13 @@ iavf_dev_start(struct rte_eth_dev *dev)
return 0;
+irq_error:
+ if (!wb_on_itr && dev->data->dev_conf.intr_conf.rxq != 0)
+ rte_intr_disable(intr_handle);
+ rte_intr_efd_disable(intr_handle);
+ rte_intr_vec_list_free(intr_handle);
+ rte_free(vf->qv_map);
+ vf->qv_map = NULL;
error:
return -1;
}
@@ -1119,6 +1130,8 @@ iavf_dev_stop(struct rte_eth_dev *dev)
rte_intr_vec_list_free(intr_handle);
iavf_stop_queues(dev);
+ rte_free(vf->qv_map);
+ vf->qv_map = NULL;
adapter->stopped = 1;
dev->data->dev_started = 0;
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-11-05 16:42:46.908272355 +0000
+++ 0050-net-iavf-fix-memory-leaks-around-IRQ-resources.patch 2026-11-05 16:42:44.957061862 +0000
@@ -1 +1 @@
-From 57d20c5a8486666b3b376c5304890ac763afc280 Mon Sep 17 00:00:00 2001
+From 03cdec8098165d264388bcd0cd7d786026771833 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57d20c5a8486666b3b376c5304890ac763afc280 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
- drivers/net/intel/iavf/iavf_ethdev.c | 19 ++++++++++++++++---
+ drivers/net/iavf/iavf_ethdev.c | 19 ++++++++++++++++---
@@ -23,5 +24,5 @@
-diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
-index 2300a26811..5eec34e4a1 100644
---- a/drivers/net/intel/iavf/iavf_ethdev.c
-+++ b/drivers/net/intel/iavf/iavf_ethdev.c
-@@ -871,7 +871,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
+index b7476ba49f2..b1a56c0ee9a 100644
+--- a/drivers/net/iavf/iavf_ethdev.c
++++ b/drivers/net/iavf/iavf_ethdev.c
+@@ -820,7 +820,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
@@ -36 +37 @@
-@@ -981,6 +981,7 @@ config_irq_map_err:
+@@ -947,6 +947,7 @@ config_irq_map_err:
@@ -44 +45 @@
-@@ -1034,12 +1035,15 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1000,12 +1001,15 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -60 +61 @@
-@@ -1089,7 +1093,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1060,7 +1064,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -69 +70 @@
-@@ -1107,7 +1111,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1079,7 +1083,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -77,2 +78,2 @@
- iavf_phc_sync_alarm_start(dev);
-@@ -1118,6 +1122,13 @@ iavf_dev_start(struct rte_eth_dev *dev)
+ adapter->stopped = 0;
+@@ -1089,6 +1093,13 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -92 +93 @@
-@@ -1150,6 +1161,8 @@ iavf_dev_stop(struct rte_eth_dev *dev)
+@@ -1119,6 +1130,8 @@ iavf_dev_stop(struct rte_eth_dev *dev)
More information about the stable
mailing list