From: Bruce Richardson <bruce.richardson@intel.com>
To: Dawid Wesierski <dawid.wesierski@intel.com>
Cc: <dev@dpdk.org>, <vladimir.medvedkin@intel.com>,
<anatoly.burakov@intel.com>, <marek.kasiewicz@intel.com>,
<stable@dpdk.org>, Qi Zhang <qi.z.zhang@intel.com>,
Wenjun Wu <wenjun1.wu@intel.com>, Ting Xu <ting.xu@intel.com>
Subject: Re: [PATCH 2/3] net/iavf: fix bandwidth config of unshaped queues
Date: Tue, 20 Oct 2026 10:33:42 +0100 [thread overview]
Message-ID: <atc1dgrGiIpn3APl@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20261014122419.631288-3-dawid.wesierski@intel.com>
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: stable@dpdk.org
>
> Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
> ---
> drivers/net/intel/iavf/iavf_tm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
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
>
next prev parent reply other threads:[~2026-10-20 9:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 12:24 [PATCH 0/3] net/iavf: fix TM hierarchy commit and TM ops without QoS Dawid Wesierski
2026-10-14 12:24 ` [PATCH 1/3] net/iavf: fix invalid free of queue TC map Dawid Wesierski
2026-10-19 16:47 ` Bruce Richardson
2026-10-19 17:06 ` Bruce Richardson
2026-10-20 15:22 ` Dawid Wesierski
2026-10-14 12:24 ` [PATCH 2/3] net/iavf: fix bandwidth config of unshaped queues Dawid Wesierski
2026-10-20 9:33 ` Bruce Richardson [this message]
2026-10-20 15:22 ` Dawid Wesierski
2026-10-14 12:24 ` [PATCH 3/3] net/iavf: fix crash in TM ops without QoS capability Dawid Wesierski
2026-10-20 9:50 ` Bruce Richardson
2026-10-20 15:22 ` [PATCH v2 0/3] net/iavf: fix TM hierarchy commit and TM ops without QoS Dawid Wesierski
2026-10-20 15:22 ` [PATCH v2 1/3] net/iavf: fix invalid free of queue TC map Dawid Wesierski
2026-10-20 15:22 ` [PATCH v2 2/3] net/iavf: fix bandwidth config of unshaped queues Dawid Wesierski
2026-10-20 15:22 ` [PATCH v2 3/3] net/iavf: fix crash in TM ops without QoS capability Dawid Wesierski
2026-10-20 16:56 ` [PATCH v2 0/3] net/iavf: fix TM hierarchy commit and TM ops without QoS 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=atc1dgrGiIpn3APl@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=dawid.wesierski@intel.com \
--cc=dev@dpdk.org \
--cc=marek.kasiewicz@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=ting.xu@intel.com \
--cc=vladimir.medvedkin@intel.com \
--cc=wenjun1.wu@intel.com \
/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