patch 'net/ice: fix memory leak in DCF QoS bandwidth config' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 26 14:10:15 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9c3b7b0e9472ff750bc367bb5314fc63911d6293

Thanks.

Kevin

---
>From 9c3b7b0e9472ff750bc367bb5314fc63911d6293 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Fri, 13 Feb 2026 09:10:13 +0000
Subject: [PATCH] net/ice: fix memory leak in DCF QoS bandwidth config

[ upstream commit efd5d15a886b51f8abd2315d5666cdd78814212a ]

Currently, when committing DCF QoS bandwidth configuration for VFs and
TCs, we are using rte_zmalloc followed by copying the data to persistent
storage and then discarding the temporary buffers. This is not needed as
these temporary buffers are not being stored anywhere, so replace them
with regular calloc. However, because the original code was missing a
corresponding `rte_free()` call for these temporary allocations, this
also fixes a memory leak.

Fixes: 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")

Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
---
 drivers/net/intel/ice/ice_dcf_sched.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/net/intel/ice/ice_dcf_sched.c b/drivers/net/intel/ice/ice_dcf_sched.c
index 2832d223d1..948774a282 100644
--- a/drivers/net/intel/ice/ice_dcf_sched.c
+++ b/drivers/net/intel/ice/ice_dcf_sched.c
@@ -2,4 +2,6 @@
  * Copyright(c) 2010-2017 Intel Corporation
  */
+#include <stdlib.h>
+
 #include <rte_tm_driver.h>
 
@@ -747,6 +749,6 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
 	struct ice_dcf_adapter *adapter = dev->data->dev_private;
 	struct ice_dcf_hw *hw = &adapter->real_hw;
-	struct virtchnl_dcf_bw_cfg_list *vf_bw;
-	struct virtchnl_dcf_bw_cfg_list *tc_bw;
+	struct virtchnl_dcf_bw_cfg_list *vf_bw = NULL;
+	struct virtchnl_dcf_bw_cfg_list *tc_bw = NULL;
 	struct ice_dcf_tm_node_list *vsi_list = &hw->tm_conf.vsi_list;
 	struct rte_tm_shaper_params *profile;
@@ -771,10 +773,10 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
 		sizeof(struct virtchnl_dcf_bw_cfg) *
 		(hw->tm_conf.nb_tc_node - 1);
-	vf_bw = rte_zmalloc("vf_bw", size, 0);
+	vf_bw = calloc(1, size);
 	if (!vf_bw) {
 		ret_val = ICE_ERR_NO_MEMORY;
 		goto fail_clear;
 	}
-	tc_bw = rte_zmalloc("tc_bw", size, 0);
+	tc_bw = calloc(1, size);
 	if (!tc_bw) {
 		ret_val = ICE_ERR_NO_MEMORY;
@@ -876,4 +878,9 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
 
 fail_clear:
+	if (vf_bw != NULL)
+		free(vf_bw);
+	if (tc_bw != NULL)
+		free(tc_bw);
+
 	/* clear all the traffic manager configuration */
 	if (clear_on_fail) {
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-02-26 10:16:52.236576336 +0000
+++ 0133-net-ice-fix-memory-leak-in-DCF-QoS-bandwidth-config.patch	2026-02-26 10:16:47.191315731 +0000
@@ -1 +1 @@
-From efd5d15a886b51f8abd2315d5666cdd78814212a Mon Sep 17 00:00:00 2001
+From 9c3b7b0e9472ff750bc367bb5314fc63911d6293 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efd5d15a886b51f8abd2315d5666cdd78814212a ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list