mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-11-02 13:18:52 +00:00
Refresh patches 6.12 for airoha and econet Fixes:122135b964("airoha: an7581: add support for kernel 6.12") Fixes:73d0f92460("kernel: Add new platform EcoNet MIPS") Signed-off-by: Leo Barsky <leobrsky@proton.me> Link: https://github.com/openwrt/openwrt/pull/20073 Signed-off-by: Robert Marko <robimarko@gmail.com>
59 lines
2.1 KiB
Diff
59 lines
2.1 KiB
Diff
From 367579274f60cb23c570ae5348966ab51e1509a4 Mon Sep 17 00:00:00 2001
|
|
From: Lorenzo Bianconi <lorenzo@kernel.org>
|
|
Date: Mon, 31 Mar 2025 18:17:31 +0200
|
|
Subject: [PATCH 2/2] net: airoha: Fix ETS priomap validation
|
|
|
|
ETS Qdisc schedules SP bands in a priority order assigning band-0 the
|
|
highest priority (band-0 > band-1 > .. > band-n) while EN7581 arranges
|
|
SP bands in a priority order assigning band-7 the highest priority
|
|
(band-7 > band-6, .. > band-n).
|
|
Fix priomap check in airoha_qdma_set_tx_ets_sched routine in order to
|
|
align ETS Qdisc and airoha_eth driver SP priority ordering.
|
|
|
|
Fixes: b56e4d660a96 ("net: airoha: Enforce ETS Qdisc priomap")
|
|
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
|
Reviewed-by: Simon Horman <horms@kernel.org>
|
|
Reviewed-by: Davide Caratti <dcaratti@redhat.com>
|
|
Link: https://patch.msgid.link/20250331-airoha-ets-validate-priomap-v1-1-60a524488672@kernel.org
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
drivers/net/ethernet/airoha/airoha_eth.c | 16 ++++++++--------
|
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/airoha/airoha_eth.c
|
|
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
|
|
@@ -2028,7 +2028,7 @@ static int airoha_qdma_set_tx_ets_sched(
|
|
struct tc_ets_qopt_offload_replace_params *p = &opt->replace_params;
|
|
enum tx_sched_mode mode = TC_SCH_SP;
|
|
u16 w[AIROHA_NUM_QOS_QUEUES] = {};
|
|
- int i, nstrict = 0, nwrr, qidx;
|
|
+ int i, nstrict = 0;
|
|
|
|
if (p->bands > AIROHA_NUM_QOS_QUEUES)
|
|
return -EINVAL;
|
|
@@ -2046,17 +2046,17 @@ static int airoha_qdma_set_tx_ets_sched(
|
|
* lowest priorities with respect to SP ones.
|
|
* e.g: WRR0, WRR1, .., WRRm, SP0, SP1, .., SPn
|
|
*/
|
|
- nwrr = p->bands - nstrict;
|
|
- qidx = nstrict && nwrr ? nstrict : 0;
|
|
- for (i = 1; i <= p->bands; i++) {
|
|
- if (p->priomap[i % AIROHA_NUM_QOS_QUEUES] != qidx)
|
|
+ for (i = 0; i < nstrict; i++) {
|
|
+ if (p->priomap[p->bands - i - 1] != i)
|
|
return -EINVAL;
|
|
-
|
|
- qidx = i == nwrr ? 0 : qidx + 1;
|
|
}
|
|
|
|
- for (i = 0; i < nwrr; i++)
|
|
+ for (i = 0; i < p->bands - nstrict; i++) {
|
|
+ if (p->priomap[i] != nstrict + i)
|
|
+ return -EINVAL;
|
|
+
|
|
w[i] = p->weights[nstrict + i];
|
|
+ }
|
|
|
|
if (!nstrict)
|
|
mode = TC_SCH_WRR8;
|