From: Ciara Loftus <ciara.loftus@intel.com>
To: dev@dpdk.org
Cc: Mukul Katiyar <mukul@versa-networks.com>,
stable@dpdk.org, Ciara Loftus <ciara.loftus@intel.com>
Subject: [PATCH v2 1/2] net/ice: properly handle TM hierarchy deletion
Date: Thu, 7 May 2026 12:59:29 +0000 [thread overview]
Message-ID: <20260507125930.1668860-1-ciara.loftus@intel.com> (raw)
From: Mukul Katiyar <mukul@versa-networks.com>
When a TM hierarchy is fully deleted and then committed, the hardware
scheduler nodes may be left with any bandwidth limits that were
programmed by the previous hierarchy commit. These stale limits may
remain in effect the next time the device starts, permanently throttling
traffic even though the TM hierarchy was removed.
Fix this by resetting all descendant hardware scheduler nodes to their
default state when committing an empty hierarchy. Also restore the port
queue count to its hardware default and clear the committed flag so the
port starts cleanly without any TM configuration applied.
Fixes: 715d449a965b ("net/ice: enhance Tx scheduler hierarchy support")
Cc: stable@dpdk.org
Signed-off-by: Mukul Katiyar <mukul@versa-networks.com>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
v2:
* Ensure restore is only performed if a hierarchy has already been
committed
---
.mailmap | 1 +
drivers/net/intel/ice/ice_tm.c | 24 ++++++++++++++++++++++--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index 22476860ed..2f96e80f16 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1132,6 +1132,7 @@ Moti Haimovsky <motih@mellanox.com>
Muhammad Ahmad <muhammad.ahmad@emumba.com>
Muhammad Bilal <m.bilal@emumba.com>
Mukesh Dua <mukesh.dua81@gmail.com>
+Mukul Katiyar <mukul@versa-networks.com>
Murphy Yang <murphyx.yang@intel.com>
Murthy NSSR <nidadavolu.murthy@caviumnetworks.com>
Muthurajan Jayakumar <muthurajan.jayakumar@intel.com>
diff --git a/drivers/net/intel/ice/ice_tm.c b/drivers/net/intel/ice/ice_tm.c
index ff53f2acfd..2bb684bb02 100644
--- a/drivers/net/intel/ice/ice_tm.c
+++ b/drivers/net/intel/ice/ice_tm.c
@@ -805,6 +805,19 @@ create_sched_node_recursive(struct ice_pf *pf, struct ice_port_info *pi,
return 0;
}
+static void
+reset_hw_node_recursive(struct ice_hw *hw, struct ice_sched_node *node)
+{
+ uint16_t i;
+
+ for (i = 0; i < node->num_children; i++) {
+ reset_hw_node_recursive(hw, node->children[i]);
+ if (ice_cfg_hw_node(hw, NULL, node->children[i]))
+ PMD_DRV_LOG(WARNING, "Failed to reset node %u to default configuration",
+ node->children[i]->info.node_teid);
+ }
+}
+
static int
commit_new_hierarchy(struct rte_eth_dev *dev)
{
@@ -820,8 +833,15 @@ commit_new_hierarchy(struct rte_eth_dev *dev)
struct ice_sched_node *new_vsi_root = hw->vsi_ctx[pf->main_vsi->idx]->sched.vsi_node[0];
if (sw_root == NULL) {
- PMD_DRV_LOG(ERR, "No root node defined in TM hierarchy");
- return -1;
+ if (!pf->tm_conf.committed) {
+ PMD_DRV_LOG(ERR, "No root node defined in TM hierarchy");
+ return -EINVAL;
+ }
+ /* TM hierarchy deleted. Restore default scheduler state. */
+ reset_hw_node_recursive(hw, hw->vsi_ctx[pf->main_vsi->idx]->sched.vsi_node[0]);
+ pf->main_vsi->nb_qps = pf->lan_nb_qps;
+ pf->tm_conf.committed = false;
+ return ice_alloc_lan_q_ctx(hw, 0, 0, pf->main_vsi->nb_qps);
}
/* handle case where VSI node needs to move DOWN the hierarchy */
--
2.43.0
next reply other threads:[~2026-05-07 13:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 12:59 Ciara Loftus [this message]
2026-05-07 12:59 ` [PATCH v2 2/2] net/ice: fix shaper profile reference count tracking Ciara Loftus
2026-05-07 13:11 ` [PATCH v2 1/2] net/ice: properly handle TM hierarchy deletion Bruce Richardson
2026-05-07 13:39 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260507125930.1668860-1-ciara.loftus@intel.com \
--to=ciara.loftus@intel.com \
--cc=dev@dpdk.org \
--cc=mukul@versa-networks.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox