Netdev List
 help / color / mirror / Atom feed
* [PATCH net] cxgb4: Fix decode strings dump for T6 adapters
@ 2026-06-29 13:08 Markov Gleb
  2026-06-30  8:35 ` Potnuri Bharat Teja
  2026-07-01  0:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Markov Gleb @ 2026-06-29 13:08 UTC (permalink / raw)
  To: Potnuri Bharat Teja
  Cc: Gleb Markov, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, open list, lvc-project

From: Gleb Markov <markov.gi@npc-ksb.ru>

Depending on the value of chip_version, the correct decode set is selected.
However, the subsequent matching with the t4 encoding type in the if-else
block results in a reassignment, which leads to the loss of support for
t6_decode as well as reinitializing of values t4_decode and t5_decode.

The component history shows that the if-else block previously used for
this purpose, as well as the execution order, was not affected by the
change.
Furthermore, it is suggested by the execution order that the scenario with
overwriting and loss of support will be implemented.

Delete the if-else block.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 6df397539cb0 ("cxgb4: Update correct encoding of SGE Ingress DMA States for T6 adapter")
Signed-off-by: Gleb Markov <markov.gi@npc-ksb.ru>
---
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 8d719f82854a..f3e8153a7a0b 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -6735,14 +6735,6 @@ void t4_sge_decode_idma_state(struct adapter *adapter, int state)
 		return;
 	}
 
-	if (is_t4(adapter->params.chip)) {
-		sge_idma_decode = (const char **)t4_decode;
-		sge_idma_decode_nstates = ARRAY_SIZE(t4_decode);
-	} else {
-		sge_idma_decode = (const char **)t5_decode;
-		sge_idma_decode_nstates = ARRAY_SIZE(t5_decode);
-	}
-
 	if (state < sge_idma_decode_nstates)
 		CH_WARN(adapter, "idma state %s\n", sge_idma_decode[state]);
 	else
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] cxgb4: Fix decode strings dump for T6 adapters
  2026-06-29 13:08 [PATCH net] cxgb4: Fix decode strings dump for T6 adapters Markov Gleb
@ 2026-06-30  8:35 ` Potnuri Bharat Teja
  2026-07-01  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Potnuri Bharat Teja @ 2026-06-30  8:35 UTC (permalink / raw)
  To: Markov Gleb
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev@vger.kernel.org, open list,
	lvc-project@linuxtesting.org

On Monday, June 06/29/26, 2026 at 18:38:54 +0530, Markov Gleb wrote:
> From: Gleb Markov <markov.gi@npc-ksb.ru>
> 
> Depending on the value of chip_version, the correct decode set is selected.
> However, the subsequent matching with the t4 encoding type in the if-else
> block results in a reassignment, which leads to the loss of support for
> t6_decode as well as reinitializing of values t4_decode and t5_decode.
> 
> The component history shows that the if-else block previously used for
> this purpose, as well as the execution order, was not affected by the
> change.
> Furthermore, it is suggested by the execution order that the scenario with
> overwriting and loss of support will be implemented.
> 
> Delete the if-else block.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 6df397539cb0 ("cxgb4: Update correct encoding of SGE Ingress DMA States for T6 adapter")
> Signed-off-by: Gleb Markov <markov.gi@npc-ksb.ru>
> ---

Thank you, This redundant code can be removed.

Reviewed-by: Potnuri Bharat Teja <bharat@chelsio.com>

>  drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> index 8d719f82854a..f3e8153a7a0b 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> @@ -6735,14 +6735,6 @@ void t4_sge_decode_idma_state(struct adapter *adapter, int state)
>  		return;
>  	}
>  
> -	if (is_t4(adapter->params.chip)) {
> -		sge_idma_decode = (const char **)t4_decode;
> -		sge_idma_decode_nstates = ARRAY_SIZE(t4_decode);
> -	} else {
> -		sge_idma_decode = (const char **)t5_decode;
> -		sge_idma_decode_nstates = ARRAY_SIZE(t5_decode);
> -	}
> -
>  	if (state < sge_idma_decode_nstates)
>  		CH_WARN(adapter, "idma state %s\n", sge_idma_decode[state]);
>  	else
> -- 
> 2.43.0
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] cxgb4: Fix decode strings dump for T6 adapters
  2026-06-29 13:08 [PATCH net] cxgb4: Fix decode strings dump for T6 adapters Markov Gleb
  2026-06-30  8:35 ` Potnuri Bharat Teja
@ 2026-07-01  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-07-01  0:30 UTC (permalink / raw)
  To: Markov Gleb
  Cc: bharat, andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel, lvc-project

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 29 Jun 2026 16:08:54 +0300 you wrote:
> From: Gleb Markov <markov.gi@npc-ksb.ru>
> 
> Depending on the value of chip_version, the correct decode set is selected.
> However, the subsequent matching with the t4 encoding type in the if-else
> block results in a reassignment, which leads to the loss of support for
> t6_decode as well as reinitializing of values t4_decode and t5_decode.
> 
> [...]

Here is the summary with links:
  - [net] cxgb4: Fix decode strings dump for T6 adapters
    https://git.kernel.org/netdev/net/c/5d6dc22d6268

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:[~2026-07-01  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-29 13:08 [PATCH net] cxgb4: Fix decode strings dump for T6 adapters Markov Gleb
2026-06-30  8:35 ` Potnuri Bharat Teja
2026-07-01  0:30 ` 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