On Sat, Sep 20, 2025 at 07:25:45PM +0900, Kohei Enju wrote:
> 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
Reviewed-by: Simon Horman <[email protected]>