* [PATCH net-next] net: airoha: Fix channel configuration for ETS Qdisc
@ 2025-01-07 22:26 Lorenzo Bianconi
2025-01-08 7:52 ` Michal Swiatkowski
2025-01-11 21:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2025-01-07 22:26 UTC (permalink / raw)
To: Felix Fietkau, Sean Wang, Mark Lee, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: linux-arm-kernel, linux-mediatek, netdev, Lorenzo Bianconi
Limit ETS QoS channel to AIROHA_NUM_QOS_CHANNELS in
airoha_tc_setup_qdisc_ets() in order to align the configured channel to
the value set in airoha_dev_select_queue().
Fixes: 20bf7d07c956 ("net: airoha: Add sched ETS offload support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/ethernet/mediatek/airoha_eth.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c
index b9f1c42f0a40ca268506b4595dfa1902a15be26c..a30c417d66f2f9b0958fe1dd3829fb9ac530a34c 100644
--- a/drivers/net/ethernet/mediatek/airoha_eth.c
+++ b/drivers/net/ethernet/mediatek/airoha_eth.c
@@ -2840,11 +2840,14 @@ static int airoha_qdma_get_tx_ets_stats(struct airoha_gdm_port *port,
static int airoha_tc_setup_qdisc_ets(struct airoha_gdm_port *port,
struct tc_ets_qopt_offload *opt)
{
- int channel = TC_H_MAJ(opt->handle) >> 16;
+ int channel;
if (opt->parent == TC_H_ROOT)
return -EINVAL;
+ channel = TC_H_MAJ(opt->handle) >> 16;
+ channel = channel % AIROHA_NUM_QOS_CHANNELS;
+
switch (opt->command) {
case TC_ETS_REPLACE:
return airoha_qdma_set_tx_ets_sched(port, channel, opt);
---
base-commit: a1942da8a38717ddd9b4c132f59e1657c85c1432
change-id: 20250107-airoha-ets-fix-chan-e35ccac76d64
Best regards,
--
Lorenzo Bianconi <lorenzo@kernel.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: airoha: Fix channel configuration for ETS Qdisc
2025-01-07 22:26 [PATCH net-next] net: airoha: Fix channel configuration for ETS Qdisc Lorenzo Bianconi
@ 2025-01-08 7:52 ` Michal Swiatkowski
2025-01-11 21:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Michal Swiatkowski @ 2025-01-08 7:52 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: Felix Fietkau, Sean Wang, Mark Lee, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno, linux-arm-kernel, linux-mediatek,
netdev
On Tue, Jan 07, 2025 at 11:26:28PM +0100, Lorenzo Bianconi wrote:
> Limit ETS QoS channel to AIROHA_NUM_QOS_CHANNELS in
> airoha_tc_setup_qdisc_ets() in order to align the configured channel to
> the value set in airoha_dev_select_queue().
>
> Fixes: 20bf7d07c956 ("net: airoha: Add sched ETS offload support")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/ethernet/mediatek/airoha_eth.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c
> index b9f1c42f0a40ca268506b4595dfa1902a15be26c..a30c417d66f2f9b0958fe1dd3829fb9ac530a34c 100644
> --- a/drivers/net/ethernet/mediatek/airoha_eth.c
> +++ b/drivers/net/ethernet/mediatek/airoha_eth.c
> @@ -2840,11 +2840,14 @@ static int airoha_qdma_get_tx_ets_stats(struct airoha_gdm_port *port,
> static int airoha_tc_setup_qdisc_ets(struct airoha_gdm_port *port,
> struct tc_ets_qopt_offload *opt)
> {
> - int channel = TC_H_MAJ(opt->handle) >> 16;
> + int channel;
>
> if (opt->parent == TC_H_ROOT)
> return -EINVAL;
>
> + channel = TC_H_MAJ(opt->handle) >> 16;
> + channel = channel % AIROHA_NUM_QOS_CHANNELS;
> +
> switch (opt->command) {
> case TC_ETS_REPLACE:
> return airoha_qdma_set_tx_ets_sched(port, channel, opt);
>
> ---
> base-commit: a1942da8a38717ddd9b4c132f59e1657c85c1432
> change-id: 20250107-airoha-ets-fix-chan-e35ccac76d64
>
> Best regards,
> --
> Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: airoha: Fix channel configuration for ETS Qdisc
2025-01-07 22:26 [PATCH net-next] net: airoha: Fix channel configuration for ETS Qdisc Lorenzo Bianconi
2025-01-08 7:52 ` Michal Swiatkowski
@ 2025-01-11 21:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-01-11 21:20 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: nbd, sean.wang, Mark-MC.Lee, andrew+netdev, davem, edumazet, kuba,
pabeni, matthias.bgg, angelogioacchino.delregno, linux-arm-kernel,
linux-mediatek, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 07 Jan 2025 23:26:28 +0100 you wrote:
> Limit ETS QoS channel to AIROHA_NUM_QOS_CHANNELS in
> airoha_tc_setup_qdisc_ets() in order to align the configured channel to
> the value set in airoha_dev_select_queue().
>
> Fixes: 20bf7d07c956 ("net: airoha: Add sched ETS offload support")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>
> [...]
Here is the summary with links:
- [net-next] net: airoha: Fix channel configuration for ETS Qdisc
https://git.kernel.org/netdev/net-next/c/7d0da8f86234
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-11 21:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 22:26 [PATCH net-next] net: airoha: Fix channel configuration for ETS Qdisc Lorenzo Bianconi
2025-01-08 7:52 ` Michal Swiatkowski
2025-01-11 21:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).