* [PATCH net] octeontx2-pf: Fix RSS indirection table size
@ 2026-09-26 9:14 Jari Seppälä
2026-09-27 22:48 ` Jakub Kicinski
0 siblings, 1 reply; 5+ messages in thread
From: Jari Seppälä @ 2026-09-26 9:14 UTC (permalink / raw)
To: netdev; +Cc: kuba, sgoutham, gakula, rkannoth, sbhatta, bbhushan2
The conversion to the dedicated RSS context operations replaced the
pointer to struct otx2_rss_ctx with an inline u32 ind_tbl[] array.
However, otx2_rss_init() still uses sizeof(*rss->ind_tbl) to set rss_size.
This now yields the size of one u32 (4), rather than the 256 entries in
the indirection table.
The RSS initialization and hardware programming loops use rss_size,
so only four entries are initialized and programmed despite the NIX LF
being allocated a 256-entry table. On an OCTEON CN102 with eight RX
queues, the table contained 0, 1, 2, 3 followed by zeros. Traffic was
concentrated on queue 0 and ethtool -X equal 8 did not correct the table.
Use ARRAY_SIZE() to count the indirection table entries. On the same
hardware, this restores the full table repeating queue numbers 0 through
7, and bidirectional multi-flow traffic increments multiple RX queues.
Fixes: 62e01d8c4170 ("eth: otx2: migrate to the *_rxfh_context ops")
Cc: stable@vger.kernel.org
Closes:
https://lore.kernel.org/netdev/361df563-e29e-43bf-8806-24bdfefed33d@nocloud.org/
Signed-off-by: Jari Seppälä <jase@nocloud.org>
---
This is the formal patch requested in response to the bug report with
Message-ID <361df563-e29e-43bf-8806-24bdfefed33d@nocloud.org>.
Runtime testing was on an Asterfusion ET2500 (OCTEON CN102 A0), using
Yocto BSP commit 9a05f15b453377f50632ebbb57c87b7ec3270492 plus the
existing local board/build fixes. The kernel configuration was unchanged
between the before/after tests. The resulting kernel was
6.18.52-cn102-yocto-kvm, package revision 6.18.52-5.
The table was checked with ethtool after reboot, then bidirectional
four-stream UDP traffic was used to check hardware RX queue counters.
The upstream net tree has not been boot-tested on this device. Full
upstream allyesconfig/allmodconfig W=1 builds have not been run.
The diagnosis and patch were prepared with AI assistance and validated
on the physical device as described above.
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index 175992188..0e78a0531 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -394,7 +394,7 @@ int otx2_rss_init(struct otx2_nic *pfvf)
struct otx2_rss_info *rss = &pfvf->hw.rss_info;
int idx, ret = 0;
- rss->rss_size = sizeof(*rss->ind_tbl);
+ rss->rss_size = ARRAY_SIZE(rss->ind_tbl);
/* Init RSS key if it is not setup already */
if (!rss->enable)
base-commit: a7bfaba4823e3c165bb2004c74eff7c096672bc7
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] octeontx2-pf: Fix RSS indirection table size
2026-09-26 9:14 [PATCH net] octeontx2-pf: Fix RSS indirection table size Jari Seppälä
@ 2026-09-27 22:48 ` Jakub Kicinski
2026-09-28 8:47 ` [PATCH net RESEND] " Jari Seppälä
0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2026-09-27 22:48 UTC (permalink / raw)
To: Jari Seppälä
Cc: netdev, sgoutham, gakula, rkannoth, sbhatta, bbhushan2
On Sat, 26 Sep 2026 12:14:37 +0300 Jari Seppälä wrote:
> - rss->rss_size = sizeof(*rss->ind_tbl);
> + rss->rss_size = ARRAY_SIZE(rss->ind_tbl);
The diff looks bungled up, could you send with git send-email or b4 ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net RESEND] octeontx2-pf: Fix RSS indirection table size
2026-09-27 22:48 ` Jakub Kicinski
@ 2026-09-28 8:47 ` Jari Seppälä
2026-09-29 2:36 ` Ratheesh Kannoth
2026-10-01 0:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: Jari Seppälä @ 2026-09-28 8:47 UTC (permalink / raw)
To: netdev
Cc: Jari Seppälä, kuba, sgoutham, gakula, rkannoth, sbhatta,
bbhushan2, linux-yocto
The conversion to the dedicated RSS context operations replaced the
pointer to struct otx2_rss_ctx with an inline u32 ind_tbl[] array.
However, otx2_rss_init() still uses sizeof(*rss->ind_tbl) to set rss_size.
This now yields the size of one u32 (4), rather than the 256 entries in
the indirection table.
The RSS initialization and hardware programming loops use rss_size,
so only four entries are initialized and programmed despite the NIX LF
being allocated a 256-entry table. On an OCTEON CN102 with eight RX
queues, the table contained 0, 1, 2, 3 followed by zeros. Traffic was
concentrated on queue 0 and ethtool -X equal 8 did not correct the table.
Use ARRAY_SIZE() to count the indirection table entries. On the same
hardware, this restores the full table repeating queue numbers 0 through
7, and bidirectional multi-flow traffic increments multiple RX queues.
Fixes: 62e01d8c4170 ("eth: otx2: migrate to the *_rxfh_context ops")
Cc: stable@vger.kernel.org
Closes: https://lore.kernel.org/netdev/361df563-e29e-43bf-8806-24bdfefed33d@nocloud.org/
Signed-off-by: Jari Seppälä <jase@nocloud.org>
---
Resending with git send-email because the previous email had a mangled
diff. The code change and commit message are unchanged.
This is the formal patch requested in response to the bug report with
Message-ID <361df563-e29e-43bf-8806-24bdfefed33d@nocloud.org>.
Runtime testing was on an Asterfusion ET2500 (OCTEON CN102 A0), using
Yocto BSP commit 9a05f15b453377f50632ebbb57c87b7ec3270492 plus the
existing local board/build fixes. The kernel configuration was unchanged
between the before/after tests. The resulting kernel was
6.18.52-cn102-yocto-kvm, package revision 6.18.52-5.
The table was checked with ethtool after reboot, then bidirectional
four-stream UDP traffic was used to check hardware RX queue counters.
The upstream net tree has not been boot-tested on this device. Full
upstream allyesconfig/allmodconfig W=1 builds have not been run.
The diagnosis and patch were prepared with AI assistance and validated
on the physical device as described above.
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index 175992188..0e78a0531 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -394,7 +394,7 @@ int otx2_rss_init(struct otx2_nic *pfvf)
struct otx2_rss_info *rss = &pfvf->hw.rss_info;
int idx, ret = 0;
- rss->rss_size = sizeof(*rss->ind_tbl);
+ rss->rss_size = ARRAY_SIZE(rss->ind_tbl);
/* Init RSS key if it is not setup already */
if (!rss->enable)
base-commit: a7bfaba4823e3c165bb2004c74eff7c096672bc7
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net RESEND] octeontx2-pf: Fix RSS indirection table size
2026-09-28 8:47 ` [PATCH net RESEND] " Jari Seppälä
@ 2026-09-29 2:36 ` Ratheesh Kannoth
2026-10-01 0:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: Ratheesh Kannoth @ 2026-09-29 2:36 UTC (permalink / raw)
To: Jari Seppälä
Cc: netdev, kuba, sgoutham, gakula, sbhatta, bbhushan2, linux-yocto
On 2026-09-28 at 14:17:11, Jari Seppälä (jase@nocloud.org) wrote:
> The conversion to the dedicated RSS context operations replaced the
> pointer to struct otx2_rss_ctx with an inline u32 ind_tbl[] array.
> However, otx2_rss_init() still uses sizeof(*rss->ind_tbl) to set rss_size.
> This now yields the size of one u32 (4), rather than the 256 entries in
> the indirection table.
>
> The RSS initialization and hardware programming loops use rss_size,
> so only four entries are initialized and programmed despite the NIX LF
> being allocated a 256-entry table. On an OCTEON CN102 with eight RX
> queues, the table contained 0, 1, 2, 3 followed by zeros. Traffic was
> concentrated on queue 0 and ethtool -X equal 8 did not correct the table.
>
> Use ARRAY_SIZE() to count the indirection table entries. On the same
> hardware, this restores the full table repeating queue numbers 0 through
> 7, and bidirectional multi-flow traffic increments multiple RX queues.
>
> Fixes: 62e01d8c4170 ("eth: otx2: migrate to the *_rxfh_context ops")
> Cc: stable@vger.kernel.org
> Closes: https://lore.kernel.org/netdev/361df563-e29e-43bf-8806-24bdfefed33d@nocloud.org/
> Signed-off-by: Jari Seppälä <jase@nocloud.org>
Thanks.
Reviewed-by: Ratheesh Kannoth <rkannoth@marvell.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net RESEND] octeontx2-pf: Fix RSS indirection table size
2026-09-28 8:47 ` [PATCH net RESEND] " Jari Seppälä
2026-09-29 2:36 ` Ratheesh Kannoth
@ 2026-10-01 0:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-01 0:30 UTC (permalink / raw)
To: =?utf-8?b?SmFyaSBTZXBww6Rsw6QgPGphc2VAbm9jbG91ZC5vcmc+?=
Cc: netdev, kuba, sgoutham, gakula, rkannoth, sbhatta, bbhushan2,
linux-yocto
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 28 Sep 2026 11:47:11 +0300 you wrote:
> The conversion to the dedicated RSS context operations replaced the
> pointer to struct otx2_rss_ctx with an inline u32 ind_tbl[] array.
> However, otx2_rss_init() still uses sizeof(*rss->ind_tbl) to set rss_size.
> This now yields the size of one u32 (4), rather than the 256 entries in
> the indirection table.
>
> The RSS initialization and hardware programming loops use rss_size,
> so only four entries are initialized and programmed despite the NIX LF
> being allocated a 256-entry table. On an OCTEON CN102 with eight RX
> queues, the table contained 0, 1, 2, 3 followed by zeros. Traffic was
> concentrated on queue 0 and ethtool -X equal 8 did not correct the table.
>
> [...]
Here is the summary with links:
- [net,RESEND] octeontx2-pf: Fix RSS indirection table size
https://git.kernel.org/netdev/net/c/9e792901418d
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] 5+ messages in thread
end of thread, other threads:[~2026-10-01 0:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26 9:14 [PATCH net] octeontx2-pf: Fix RSS indirection table size Jari Seppälä
2026-09-27 22:48 ` Jakub Kicinski
2026-09-28 8:47 ` [PATCH net RESEND] " Jari Seppälä
2026-09-29 2:36 ` Ratheesh Kannoth
2026-10-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