ixgbe: preserve RSS indirection table across admin down/up
Subsystems (3)
PATCH v4 1/1 ixgbe: preserve RSS indirection table across admin down/up
Currently, the RSS indirection table configured by user via ethtool is reinitialized to default values during interface resets (e.g., admin down/up, MTU change). As for RSS hash key, commit 3dfbfc7ebb95 ("ixgbe:
Check for RSS key before setting value") made it persistent across interface resets.
Adopt the same approach used in igc and igb drivers which reinitializes the RSS indirection table only when the queue count changes. Since the number of RETA entries can also change in ixgbe, let's make user configuration persistent as long as both queue count and the number of RETA entries remain unchanged.
Tested on Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection.
Test:
Set custom indirection table and check the value after interface down/up
# ethtool --set-rxfh-indir ens5 equal 2 # ethtool --show-rxfh-indir ens5 | head -5
RX flow hash indirection table for ens5 with 12 RX ring(s):
0: 0 1 0 1 0 1 0 1
8: 0 1 0 1 0 1 0 1
16: 0 1 0 1 0 1 0 1
# ip link set dev ens5 down && ip link set dev ens5 upWithout patch:
# ethtool --show-rxfh-indir ens5 | head -5
RX flow hash indirection table for ens5 with 12 RX ring(s):
0: 0 1 2 3 4 5 6 7
8: 8 9 10 11 0 1 2 3
16: 4 5 6 7 8 9 10 11With patch:
# ethtool --show-rxfh-indir ens5 | head -5
RX flow hash indirection table for ens5 with 12 RX ring(s):
0: 0 1 0 1 0 1 0 1
8: 0 1 0 1 0 1 0 1
16: 0 1 0 1 0 1 0 1---
Changes:v3->v4:
- ensure rss_i is non-zero to avoid zero-divisionv2->v3: https://lore.kernel.org/intel-wired-lan/[email protected]/
- s/last_rss_i/last_rss_indices/ for clarity
- use modulo instead of top-of-loop equality test
- use ixgbe_rss_indir_tbl_entries() instead of magic numberv1->v2: https://lore.kernel.org/intel-wired-lan/[email protected]/
- remove pointless memset() in ixgbe_setup_reta()
- add check for reta_entries in addition to rss_i
- update the commit message to reflect the additional check
v1: https://lore.kernel.org/intel-wired-lan/[email protected]/
--- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 45 +++++++++++++------ 2 files changed, 33 insertions(+), 14 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe.h +2 -0
@@ -838,6 +838,8 @@ struct ixgbe_adapter {*/ #define IXGBE_MAX_RETA_ENTRIES 512u8 rss_indir_tbl[IXGBE_MAX_RETA_ENTRIES ]; +u32 last_reta_entries; +u16 last_rss_indices;#define IXGBE_RSS_KEY_SIZE 40/* size of RSS Hash Key in bytes */ u32 *rss_key;
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +31 -14
75 lines not on this page · raw message
Signature · 1 line
2.51.0
Quoted 43 lines · Kohei Enju
Currently, the RSS indirection table configured by user via ethtool is reinitialized to default values during interface resets (e.g., admin down/up, MTU change). As for RSS hash key, commit
3dfbfc7ebb95("ixgbe:
Check for RSS key before setting value") made it persistent across interface resets.Adopt the same approach used in igc and igb drivers which reinitializes the RSS indirection table only when the queue count changes. Since the number of RETA entries can also change in ixgbe, let's make user configuration persistent as long as both queue count and the number of RETA entries remain unchanged.
Tested on Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection.
Test:
Set custom indirection table and check the value after interface down/up# ethtool --set-rxfh-indir ens5 equal 2 # ethtool --show-rxfh-indir ens5 | head -5RX flow hash indirection table for ens5 with 12 RX ring(s):
0: 0 1 0 1 0 1 0 1 8: 0 1 0 1 0 1 0 1 16: 0 1 0 1 0 1 0 1 # ip link set dev ens5 down && ip link set dev ens5 upWithout patch:
# ethtool --show-rxfh-indir ens5 | head -5RX flow hash indirection table for ens5 with 12 RX ring(s):
0: 0 1 2 3 4 5 6 7 8: 8 9 10 11 0 1 2 3 16: 4 5 6 7 8 9 10 11With patch:
# ethtool --show-rxfh-indir ens5 | head -5RX flow hash indirection table for ens5 with 12 RX ring(s):
0: 0 1 0 1 0 1 0 1 8: 0 1 0 1 0 1 0 1 16: 0 1 0 1 0 1 0 1
Quoted 5 lines
Signed-off-by Kohei Enju <[email protected]>---
Changes:v3->v4:
- ensurerss_iis non-zero to avoid zero-division
Quoted 63 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Kohei Enju
Sent: 20 September 2025 15:56
To: [email protected]; [email protected]
Cc: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Loktionov, Aleksandr <[email protected]>; [email protected]; Kohei Enju <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v4] ixgbe: preserve RSS indirection table across admin down/upCurrently, the RSS indirection table configured by user via ethtool is reinitialized to default values during interface resets (e.g., admin down/up, MTU change). As for RSS hash key, commit
3dfbfc7ebb95("ixgbe:
Check for RSS key before setting value") made it persistent across interface resets.Adopt the same approach used in igc and igb drivers which reinitializes the RSS indirection table only when the queue count changes. Since the number of RETA entries can also change in ixgbe, let's make user configuration persistent as long as both queue count and the number of RETA entries remain unchanged.
Tested on Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection.
Test:
Set custom indirection table and check the value after interface down/up# ethtool --set-rxfh-indir ens5 equal 2 # ethtool --show-rxfh-indir ens5 | head -5RX flow hash indirection table for ens5 with 12 RX ring(s):
0: 0 1 0 1 0 1 0 1 8: 0 1 0 1 0 1 0 1 16: 0 1 0 1 0 1 0 1 # ip link set dev ens5 down && ip link set dev ens5 upWithout patch:
# ethtool --show-rxfh-indir ens5 | head -5RX flow hash indirection table for ens5 with 12 RX ring(s):
0: 0 1 2 3 4 5 6 7 8: 8 9 10 11 0 1 2 3 16: 4 5 6 7 8 9 10 11With patch:
# ethtool --show-rxfh-indir ens5 | head -5RX flow hash indirection table for ens5 with 12 RX ring(s):
0: 0 1 0 1 0 1 0 1 8: 0 1 0 1 0 1 0 1 16: 0 1 0 1 0 1 0 1Signed-off-by Kohei Enju <[email protected]>---
Changes:v3->v4:
- ensurerss_iis non-zero to avoid zero-divisionv2->v3:
v2->https://lore.kernel.org/intel-wired-lan/20250902121203.12454-1-enjuk v2->@amazon.com/
- s/last_rss_i/last_rss_indices/ for clarity
- use modulo instead of top-of-loop equality test
- useixgbe_rss_indir_tbl_entries()instead of magic numberv1->v2:
v1->https://lore.kernel.org/intel-wired-lan/20250828160134.81286-1-enjuk v1->@amazon.com/
- remove pointlessmemset()inixgbe_setup_reta()
- add check forreta_entriesin addition torss_i
- update the commit message to reflect the additional check
v1: https://lore.kernel.org/intel-wired-lan/[email protected]/
---drivers/net/ethernet/intel/ixgbe/ixgbe.h| 2 +drivers/net/ethernet/intel/ixgbe/ixgbe_main.c| 45 +++++++++++++------
Quoted 2 lines
2 files changed, 33 insertions(+), 14 deletions(-)