patch 'net/ice: fix memory leak in DCF QoS bandwidth config' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:56:47 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/22/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/b2d577314f28e8b3727266f4a7906668cef095f3
Thanks.
Luca Boccassi
---
>From b2d577314f28e8b3727266f4a7906668cef095f3 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/ice/ice_dcf_sched.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_dcf_sched.c b/drivers/net/ice/ice_dcf_sched.c
index 7967c35533..49c9959ac5 100644
--- a/drivers/net/ice/ice_dcf_sched.c
+++ b/drivers/net/ice/ice_dcf_sched.c
@@ -1,6 +1,8 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2017 Intel Corporation
*/
+#include <stdlib.h>
+
#include <rte_tm_driver.h>
#include "base/ice_sched.h"
@@ -746,8 +748,8 @@ 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;
struct ice_dcf_tm_node *tm_node;
@@ -770,12 +772,12 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
size = sizeof(struct virtchnl_dcf_bw_cfg_list) +
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;
goto fail_clear;
@@ -875,6 +877,11 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
return ret_val;
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) {
ice_dcf_tm_conf_uninit(dev);
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:47.223770459 +0000
+++ 0105-net-ice-fix-memory-leak-in-DCF-QoS-bandwidth-config.patch 2026-02-20 14:55:43.356193651 +0000
@@ -1 +1 @@
-From efd5d15a886b51f8abd2315d5666cdd78814212a Mon Sep 17 00:00:00 2001
+From b2d577314f28e8b3727266f4a7906668cef095f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efd5d15a886b51f8abd2315d5666cdd78814212a ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
- drivers/net/intel/ice/ice_dcf_sched.c | 15 +++++++++++----
+ drivers/net/ice/ice_dcf_sched.c | 15 +++++++++++----
@@ -23,4 +24,4 @@
-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
+diff --git a/drivers/net/ice/ice_dcf_sched.c b/drivers/net/ice/ice_dcf_sched.c
+index 7967c35533..49c9959ac5 100644
+--- a/drivers/net/ice/ice_dcf_sched.c
++++ b/drivers/net/ice/ice_dcf_sched.c
More information about the stable
mailing list