🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
4 messages
4 total messages Started by Jakub Kicinski Mon, 23 Nov 2026 20:55
[PATCH net 1/2] ice: don't unintentionally switch to symmetric RSS hash
#21301
Author: Jakub Kicinski
Date: Mon, 23 Nov 2026 20:55
49 lines
9515 bytes
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>
---
 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
Re: [PATCH net 1/2] ice: don't unintentionally switch to symmetric RSS hash
#21311
Author: Maciej Fijalkowski
Date: Mon, 23 Nov 2026 21:10
57 lines
21863 bytes
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
> 
> 
Re: [PATCH net 1/2] ice: don't unintentionally switch to symmetric RSS hash
#21332
Author: Jakub Kicinski
Date: Mon, 23 Nov 2026 21:41
10 lines
8185 bytes
On Mon, 23 Nov 2026 22:10:05 +0100 Maciej Fijalkowski wrote:
> Let's just get this damn thing fixed ;)

Thanks for the quick ack! 

BTW I started going down a rabbit hole of fixing more bugs in RSS
handling in these two drivers (eg ice assumes that rxfh->indir == NULL
means reset to default!?) but I gave up after 30min. There's certainly
a lot more left to do... let's see what Clashiko points out.
Re: [PATCH net 1/2] ice: don't unintentionally switch to symmetric RSS hash
#21354
Author: Jacob Keller
Date: Mon, 23 Nov 2026 22:38
14 lines
21067 bytes
On 11/23/2026 1:41 PM, Jakub Kicinski wrote:
> On Mon, 23 Nov 2026 22:10:05 +0100 Maciej Fijalkowski wrote:
>> Let's just get this damn thing fixed ;)
> 
> Thanks for the quick ack! 
> 
> BTW I started going down a rabbit hole of fixing more bugs in RSS
> handling in these two drivers (eg ice assumes that rxfh->indir == NULL
> means reset to default!?) but I gave up after 30min. There's certainly
> a lot more left to do... let's see what Clashiko points out.

Yea, we have a lot of "side quests" like that which still need a lot of
work :(
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads