net: ethtool: Unify ETHTOOL_{G,S}RXFH rxnfc copy
authorJoe Damato <jdamato@fastly.com>
Tue, 25 Jul 2023 20:56:54 +0000 (20:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jul 2023 08:35:53 +0000 (09:35 +0100)
commit801b27e88046cb0b34df7d645afb6ba5fc6f677c
tree9cff2fa117e97a282b1fe1e6c0b0b1aae5d06976
parent3d40aed862874db14e1dd41fd6f12636dcfdcc3e
net: ethtool: Unify ETHTOOL_{G,S}RXFH rxnfc copy

ETHTOOL_GRXFH correctly copies in the full struct ethtool_rxnfc when
FLOW_RSS is set; ETHTOOL_SRXFH needs a similar code path to handle the
FLOW_RSS case so that ethtool can set the flow hash for custom RSS
contexts (if supported by the driver).

The copy code from ETHTOOL_GRXFH has been pulled out in to a helper so
that it can be called in both ETHTOOL_{G,S}RXFH code paths.

Acked-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Joe Damato <jdamato@fastly.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/ioctl.c