2023-07-05 06:09:15

by Klaus Kudielka

[permalink] [raw]
Subject: [PATCH net] net: mvneta: fix txq_map in case of txq_number==1

If we boot with mvneta.txq_number=1, the txq_map is set incorrectly:
MVNETA_CPU_TXQ_ACCESS(1) refers to TX queue 1, but only TX queue 0 is
initialized. Fix this.

Fixes: 50bf8cb6fc9c ("net: mvneta: Configure XPS support")
Signed-off-by: Klaus Kudielka <[email protected]>
---
drivers/net/ethernet/marvell/mvneta.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 2cad76d0a50e..4401fad31fb9 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1505,7 +1505,7 @@ static void mvneta_defaults_set(struct mvneta_port *pp)
*/
if (txq_number == 1)
txq_map = (cpu == pp->rxq_def) ?
- MVNETA_CPU_TXQ_ACCESS(1) : 0;
+ MVNETA_CPU_TXQ_ACCESS(0) : 0;

} else {
txq_map = MVNETA_CPU_TXQ_ACCESS_ALL_MASK;
@@ -4295,7 +4295,7 @@ static void mvneta_percpu_elect(struct mvneta_port *pp)
*/
if (txq_number == 1)
txq_map = (cpu == elected_cpu) ?
- MVNETA_CPU_TXQ_ACCESS(1) : 0;
+ MVNETA_CPU_TXQ_ACCESS(0) : 0;
else
txq_map = mvreg_read(pp, MVNETA_CPU_MAP(cpu)) &
MVNETA_CPU_TXQ_ACCESS_ALL_MASK;
--
2.40.1



2023-07-05 18:47:27

by Michal Kubiak

[permalink] [raw]
Subject: Re: [PATCH net] net: mvneta: fix txq_map in case of txq_number==1

On Wed, Jul 05, 2023 at 07:37:12AM +0200, Klaus Kudielka wrote:
> If we boot with mvneta.txq_number=1, the txq_map is set incorrectly:
> MVNETA_CPU_TXQ_ACCESS(1) refers to TX queue 1, but only TX queue 0 is
> initialized. Fix this.
>
> Fixes: 50bf8cb6fc9c ("net: mvneta: Configure XPS support")
> Signed-off-by: Klaus Kudielka <[email protected]>

LGTM

Thanks,
Reviewed-by: Michal Kubiak <[email protected]>


2023-07-06 09:20:48

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net] net: mvneta: fix txq_map in case of txq_number==1

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

On Wed, 5 Jul 2023 07:37:12 +0200 you wrote:
> If we boot with mvneta.txq_number=1, the txq_map is set incorrectly:
> MVNETA_CPU_TXQ_ACCESS(1) refers to TX queue 1, but only TX queue 0 is
> initialized. Fix this.
>
> Fixes: 50bf8cb6fc9c ("net: mvneta: Configure XPS support")
> Signed-off-by: Klaus Kudielka <[email protected]>
>
> [...]

Here is the summary with links:
- [net] net: mvneta: fix txq_map in case of txq_number==1
https://git.kernel.org/netdev/net/c/21327f81db63

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html