From thomas at monjalon.net Fri May 1 07:52:09 2026 From: thomas at monjalon.net (Thomas Monjalon) Date: Fri, 01 May 2026 07:52:09 +0200 Subject: [PATCH v2] devtools: fix SPDX tag check In-Reply-To: References: <20260429130935.3681177-1-thomas@monjalon.net> <20260430131600.329636-1-thomas@monjalon.net> Message-ID: <15732573.JCcGWNJJiE@thomas> 30/04/2026 15:30, Marat Khalili: > > diff --git a/devtools/check-spdx-tag.sh b/devtools/check-spdx-tag.sh > > index 2390941c74..41fc1fe01d 100755 > > --- a/devtools/check-spdx-tag.sh > > +++ b/devtools/check-spdx-tag.sh > > @@ -39,10 +39,8 @@ check_spdx() { > > fi > > > > files_without_spdx=$(cat $tmpfile) > > - git grep -LE '(/\*|#|;|\.\.) *SPDX-License-Identifier: [A-Z(]' -- $no_license_list > $tmpfile > > - for file in $files_without_spdx ; do > > - sed -i "/^$file$/d" $tmpfile > > - done > > + git grep -LE '(/\*|#|;|\.\.) *SPDX-License-Identifier: [A-Z(]' -- $no_license_list | > > + grep -vF "$files_without_spdx" > $tmpfile > > > > warnings=$(($warnings + $(wc -l < $tmpfile))) > > $quiet || cat $tmpfile > > -- > > 2.53.0 > > Sorry for forgetting to mention it right away, some kind of sentinel or if > condition is needed if $files_without_spdx can be empty, don't know how > realistic it is in practice and whether other parts are ready to handle this > case. E.g. `files_without_spdx=$(echo //sentinel; cat $tmpfile)`. I hope it > won't make the whole thing too complicated and not worth it. Sorry I don't understand the need for a sentinel. The script is working fine with an empty files_without_spdx. From marat.khalili at huawei.com Fri May 1 11:55:29 2026 From: marat.khalili at huawei.com (Marat Khalili) Date: Fri, 1 May 2026 09:55:29 +0000 Subject: [PATCH v2] devtools: fix SPDX tag check In-Reply-To: <15732573.JCcGWNJJiE@thomas> References: <20260429130935.3681177-1-thomas@monjalon.net> <20260430131600.329636-1-thomas@monjalon.net> <15732573.JCcGWNJJiE@thomas> Message-ID: <67049e0367f2462bade5c2fe837e8173@huawei.com> > Sorry I don't understand the need for a sentinel. > The script is working fine with an empty files_without_spdx. It may filter out everything instead of nothing in that case. From ciara.loftus at intel.com Fri May 1 12:57:54 2026 From: ciara.loftus at intel.com (Ciara Loftus) Date: Fri, 1 May 2026 10:57:54 +0000 Subject: [PATCH 1/2] net/ice: properly handle TM hierarchy deletion Message-ID: <20260501105755.1136087-1-ciara.loftus@intel.com> From: Mukul Katiyar 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 at dpdk.org Signed-off-by: Mukul Katiyar Signed-off-by: Ciara Loftus --- .mailmap | 1 + drivers/net/intel/ice/ice_tm.c | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index 7e23e2f528..e65a0c6b20 100644 --- a/.mailmap +++ b/.mailmap @@ -1129,6 +1129,7 @@ Moti Haimovsky Muhammad Ahmad Muhammad Bilal Mukesh Dua +Mukul Katiyar Murphy Yang Murthy NSSR Muthurajan Jayakumar diff --git a/drivers/net/intel/ice/ice_tm.c b/drivers/net/intel/ice/ice_tm.c index ff53f2acfd..4dcfb15c27 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,11 @@ 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; + /* 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 From ciara.loftus at intel.com Fri May 1 12:57:55 2026 From: ciara.loftus at intel.com (Ciara Loftus) Date: Fri, 1 May 2026 10:57:55 +0000 Subject: [PATCH 2/2] net/ice: fix shaper profile reference count tracking In-Reply-To: <20260501105755.1136087-1-ciara.loftus@intel.com> References: <20260501105755.1136087-1-ciara.loftus@intel.com> Message-ID: <20260501105755.1136087-2-ciara.loftus@intel.com> Currently, when a TM node is added with a shaper profile assigned, the profile's reference count is not incremented. Equally, when a node is deleted, the count is not decremented. As a result, the guard that blocks deletion of an in-use profile never triggers, allowing the profile to be freed while nodes still hold a pointer to it. Fix by maintaining the reference count correctly when nodes take or release a shaper profile, so that deletion of an in-use profile is properly rejected. Fixes: 8c481c3bb65b ("net/ice: support queue and queue group bandwidth limit") Cc: stable at dpdk.org Signed-off-by: Ciara Loftus --- drivers/net/intel/ice/ice_tm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/intel/ice/ice_tm.c b/drivers/net/intel/ice/ice_tm.c index 4dcfb15c27..d1f3d80ac7 100644 --- a/drivers/net/intel/ice/ice_tm.c +++ b/drivers/net/intel/ice/ice_tm.c @@ -456,6 +456,8 @@ ice_tm_node_add(struct rte_eth_dev *dev, uint32_t node_id, tm_node->parent = NULL; tm_node->reference_count = 0; tm_node->shaper_profile = shaper_profile; + if (shaper_profile != NULL) + shaper_profile->reference_count++; tm_node->children = RTE_PTR_ADD(tm_node, sizeof(struct ice_tm_node)); tm_node->params = *params; pf->tm_conf.root = tm_node; @@ -518,6 +520,8 @@ ice_tm_node_add(struct rte_eth_dev *dev, uint32_t node_id, tm_node->parent = parent_node; tm_node->level = level_id; tm_node->shaper_profile = shaper_profile; + if (shaper_profile != NULL) + shaper_profile->reference_count++; tm_node->children = RTE_PTR_ADD(tm_node, sizeof(struct ice_tm_node)); tm_node->parent->children[tm_node->parent->reference_count++] = tm_node; tm_node->params = *params; @@ -568,6 +572,8 @@ ice_tm_node_delete(struct rte_eth_dev *dev, uint32_t node_id, /* root node */ if (tm_node->level == 0) { + if (tm_node->shaper_profile != NULL) + tm_node->shaper_profile->reference_count--; rte_free(tm_node); pf->tm_conf.root = NULL; return 0; @@ -582,6 +588,8 @@ ice_tm_node_delete(struct rte_eth_dev *dev, uint32_t node_id, tm_node->parent->children[j] = tm_node->parent->children[j + 1]; tm_node->parent->reference_count--; + if (tm_node->shaper_profile != NULL) + tm_node->shaper_profile->reference_count--; rte_free(tm_node); return 0; -- 2.43.0