On Wed, Oct 14, 2026 at 12:24:17PM +0000, Dawid Wesierski wrote:
> iavf_hierarchy_commit() sends one virtchnl_queue_bw entry for each queue
> node, but it sets queue_id and tc only for a node that has a shaper
> profile. The entry of a node without a profile keeps queue_id 0 and
> tc 0. The PF then applies the default bandwidth to queue 0 once for
> each such entry, and the queue that the node describes keeps its old
> rate limit.
> 
> The ice PF keeps the queue rate limits of a VF and applies them again
> at each queue enable, also for a later process on the same VF. Thus an
> application cannot remove the rate limits of an earlier process with a
> commit of queue nodes without shaper profiles.
> 
> Set queue_id and tc for each queue node. A node without a shaper
> profile now gives the default bandwidth to its own queue.
> 
> Fixes: 5779a8894d15 ("net/iavf: support queue rate limit configuration")
> Cc: [email protected]
> 
> Signed-off-by: Dawid Wesierski <[email protected]>
> ---
>  drivers/net/intel/iavf/iavf_tm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

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

I find the commit log of this patch a bit confusing to read and understand.
I asked AI to try and make things clearer and it suggests this as a
rewording, which I personally find clearer. WDYT?

  When configuring queue bandwidth via virtchnl in iavf_hierarchy_commit(),
  an entry in the bandwidth configuration array is allocated for each queue
  node. However, the driver only populated queue_id and tc for nodes that
  had an active shaper profile.
  
  Because the configuration buffer is zero-initialized with calloc(), any
  unshaped queue node left its entry with queue_id 0, tc 0, and zero rate
  limits. Consequently, the PF interpreted each unshaped queue entry as a
  request to reset queue 0 to default bandwidth, leaving the actual target
  queue untouched on the PF. Any previously configured rate limit on that
  queue remained active, even across subsequent queue enables or process
  restarts.
  
  Fix this by setting queue_id and tc for every queue node, ensuring
  unshaped queues properly send zeroed shaper rates for their own queue ID
  so the PF restores their default bandwidth.
  


> diff --git a/drivers/net/intel/iavf/iavf_tm.c 
> b/drivers/net/intel/iavf/iavf_tm.c
> index 603da09bb5..57075ee5b8 100644
> --- a/drivers/net/intel/iavf/iavf_tm.c
> +++ b/drivers/net/intel/iavf/iavf_tm.c
> @@ -867,15 +867,15 @@ static int iavf_hierarchy_commit(struct rte_eth_dev 
> *dev,
>               }
>               q_tc_mapping->tc[tm_node->tc].req.queue_count++;
>  
> +             q_bw->cfg[node_committed].queue_id = tm_node->id;
> +             q_bw->cfg[node_committed].tc = tm_node->tc;
>               if (tm_node->shaper_profile) {
> -                     q_bw->cfg[node_committed].queue_id = tm_node->id;
>                       q_bw->cfg[node_committed].shaper.peak =
>                       tm_node->shaper_profile->profile.peak.rate /
>                       1000 * IAVF_BITS_PER_BYTE;
>                       q_bw->cfg[node_committed].shaper.committed =
>                       tm_node->shaper_profile->profile.committed.rate /
>                       1000 * IAVF_BITS_PER_BYTE;
> -                     q_bw->cfg[node_committed].tc = tm_node->tc;
>               }
>  
>               node_committed++;
> -- 
> 2.43.0
> 

Reply via email to