Netdev List
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<edumazet@google.com>, <pabeni@redhat.com>,
	<andrew+netdev@lunn.ch>, <horms@kernel.org>,
	<ahmed.zaki@intel.com>, <jacob.e.keller@intel.com>,
	<intel-wired-lan@lists.osuosl.org>, <anthony.l.nguyen@intel.com>,
	<przemyslaw.kitszel@intel.com>
Subject: Re: [PATCH net 1/2] ice: don't unintentionally switch to symmetric RSS hash
Date: Mon, 23 Nov 2026 22:10:05 +0100	[thread overview]
Message-ID: <awSrrR6RfQYjhPU1@boxer> (raw)
In-Reply-To: <20261123205600.1794292-2-kuba@kernel.org>

On Mon, Nov 23, 2026 at 12:55:59PM -0800, Jakub Kicinski wrote:
> RXH_XFRM_NO_CHANGE is 0xff, ice 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 enable symmetric-hashing.
> NIPA HW tests catch this, and we have been carrying
> this fix in NIPA test branches for months.
> 
> Fixes: 0dd415d15505 ("net: ethtool: add a NO_CHANGE uAPI for new RXFH's input_xfrm")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

Let's just get this damn thing fixed ;)

> ---
>  drivers/net/ethernet/intel/ice/ice_ethtool.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index dffa213734f1..8f13b7607c9f 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -3681,10 +3681,10 @@ ice_set_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rxfh,
>  	     struct netlink_ext_ack *extack)
>  {
>  	struct ice_netdev_priv *np = netdev_priv(netdev);
> -	u8 hfunc = ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ;
>  	struct ice_vsi *vsi = np->vsi;
>  	struct ice_pf *pf = vsi->back;
>  	struct device *dev;
> +	u8 hfunc;
>  	int err;
>  
>  	dev = ice_pf_to_dev(pf);
> @@ -3703,9 +3703,12 @@ ice_set_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rxfh,
>  		return -EOPNOTSUPP;
>  	}
>  
> -	/* Update the VSI's hash function */
> -	if (rxfh->input_xfrm & RXH_XFRM_SYM_XOR)
> +	if (rxfh->input_xfrm == RXH_XFRM_NO_CHANGE)
> +		hfunc = vsi->rss_hfunc;
> +	else if (rxfh->input_xfrm & RXH_XFRM_SYM_XOR)
>  		hfunc = ICE_AQ_VSI_Q_OPT_RSS_HASH_SYM_TPLZ;
> +	else /* input_xfrm == 0; core rejects any other value */
> +		hfunc = ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ;
>  
>  	err = ice_set_rss_hfunc(vsi, hfunc);
>  	if (err)
> -- 
> 2.56.1
> 
> 

  reply	other threads:[~2026-11-23 21:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 20:55 [PATCH net 0/2] eth: intel: fix unintentional symmetric RSS Jakub Kicinski
2026-11-23 20:55 ` [PATCH net 1/2] ice: don't unintentionally switch to symmetric RSS hash Jakub Kicinski
2026-11-23 21:10   ` Maciej Fijalkowski [this message]
2026-11-23 20:56 ` [PATCH net 2/2] iavf: " Jakub Kicinski
2026-11-23 21:10   ` Maciej Fijalkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awSrrR6RfQYjhPU1@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=ahmed.zaki@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox