On Mon, Nov 23, 2026 at 12:56:00PM -0800, Jakub Kicinski wrote:
> RXH_XFRM_NO_CHANGE is 0xff, iavf looks at this field to check if
> RXH_XFRM_SYM_XOR bit is set, without first checking for the
> special NO_CHANGE value.
> 
> This causes any ethtool -X invocation without explicitly
> specifying input_xfrm to try to enable symmetric-hashing.
> On VFs without input_xfrm support, NO_CHANGE would have
> returned -EOPNOTSUPP.
> 
> NIPA HW tests would catch this but there's no runner testing iavf.
> iavf was pointed out by an LLM, fix was compile-tested only.
> 
> Fixes: 0dd415d15505 ("net: ethtool: add a NO_CHANGE uAPI for new RXFH's 
> input_xfrm")
> Signed-off-by: Jakub Kicinski <[email protected]>

Acked-by: Maciej Fijalkowski <[email protected]>

> ---
>  drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c 
> b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
> index e7cf12eaa268..d81b2d6a68ac 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
> @@ -1824,7 +1824,8 @@ static int iavf_set_rxfh(struct net_device *netdev,
>           rxfh->hfunc != ETH_RSS_HASH_TOP)
>               return -EOPNOTSUPP;
>  
> -     if ((rxfh->input_xfrm & RXH_XFRM_SYM_XOR) &&
> +     if (rxfh->input_xfrm != RXH_XFRM_NO_CHANGE &&
> +         (rxfh->input_xfrm & RXH_XFRM_SYM_XOR) &&
>           adapter->hfunc != VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC) {
>               if (!ADV_RSS_SUPPORT(adapter))
>                       return -EOPNOTSUPP;
> -- 
> 2.56.1
> 
> 

Reply via email to