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.
Fixes: 5779a8894d15 ("net/iavf: support queue rate limit configuration")
Cc: [email protected]
Signed-off-by: Dawid Wesierski <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
---
v2:
- Commit message from Bruce Richardson. No code change.
- Add Acked-by.
drivers/net/intel/iavf/iavf_tm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial
Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 |
Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z
dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach
handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i
moze zawierac informacje poufne. W razie przypadkowego otrzymania tej
wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie;
jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). If you are not the intended recipient, please
contact the sender and delete all copies; any review or distribution by others
is strictly prohibited.