> -----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/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 up
>
> Without 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    11
>
> With 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
>
> Signed-off-by: Kohei Enju <[email protected]>
> ---
> Changes:
> v3->v4:
>  - ensure rss_i is non-zero to avoid zero-division
> v2->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
>  - use ixgbe_rss_indir_tbl_entries() instead of magic number
> v1->v2: 
> v1->https://lore.kernel.org/intel-wired-lan/20250828160134.81286-1-enjuk
> v1->@amazon.com/
>  - 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(-)
>

Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)

Reply via email to