On Fri, Sep 04, 2026 at 10:51:37AM +0000, Ciara Loftus wrote:
> commit_new_hierarchy() computes the number of usable Tx queues (nb_qps)
> by indexing the arrays nodes_created_per_level[] and hw->layer_info[] with
> a value derived from ice_get_leaf_level(). nodes_created_per_level[] is
> indexed by absolute hw scheduler layer, but ice_get_leaf_level() returns a
> value relative to the TM hierarchy's root position, so the index used was
> off by the number of hidden layers.
> 
> This under-counted the qgroup layer, causing nb_qps to be computed from a
> shallower layer than the one actually holding the committed qgroup nodes.
> In turn this caused rte_eth_dev_configure to reject any nb_tx_queues above
> the miscalculated capacity.
> 
> Fix by converting the index to an absolute layer index.
> 
> Fixes: 715d449a965b ("net/ice: enhance Tx scheduler hierarchy support")
> Cc: [email protected]
> 
> Signed-off-by: Ciara Loftus <[email protected]>
> ---

Acked-by: Bruce Richardson <[email protected]>


>  drivers/net/intel/ice/ice_tm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/intel/ice/ice_tm.c b/drivers/net/intel/ice/ice_tm.c
> index 2e6ef9c264f..651d6aa932d 100644
> --- a/drivers/net/intel/ice/ice_tm.c
> +++ b/drivers/net/intel/ice/ice_tm.c
> @@ -848,7 +848,7 @@ commit_new_hierarchy(struct rte_eth_dev *dev)
>       const uint16_t new_root_level = pf->tm_conf.hidden_layers;
>       /* count nodes per hw level, not per logical */
>       uint16_t nodes_created_per_level[ICE_TM_MAX_LAYERS] = {0};
> -     uint8_t q_lvl = ice_get_leaf_level(pf);
> +     uint8_t q_lvl = ice_get_leaf_level(pf) + pf->tm_conf.hidden_layers;
>       uint8_t qg_lvl = q_lvl - 1;
>       struct ice_sched_node *new_vsi_root = 
> hw->vsi_ctx[pf->main_vsi->idx]->sched.vsi_node[0];
>  
> -- 
> 2.43.0
> 

Reply via email to