Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] eth: intel: fix unintentional symmetric RSS
@ 2026-11-23 20:55 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 20:56 ` [PATCH net 2/2] iavf: " Jakub Kicinski
  0 siblings, 2 replies; 5+ messages in thread
From: Jakub Kicinski @ 2026-11-23 20:55 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, ahmed.zaki,
	jacob.e.keller, intel-wired-lan, anthony.l.nguyen,
	przemyslaw.kitszel, Jakub Kicinski

Fix Intel drivers not handling RXH_XFRM_NO_CHANGE.

I had an urge to "fix this in the core" and hide RXH_XFRM_NO_CHANGE
from the drivers, by fetching the current config instead.
But "NO_CHANGE" values are already part of the driver facing API
(hfunc has ETH_RSS_HASH_NO_CHANGE). Besides we can't _completely_
hide RXH_XFRM_NO_CHANGE from the drivers, since we want the drivers
to be able to populate the defaults for new RSS contexts.
We need a "user didn't say" value there.

---

Matt pointed out that the upcoming RSS sizing series breaks
NIPA tests, this is because the fix we shared in June:
  https://lore.kernel.org/20260626152636.1e48330f@kernel.org
or Maciej's version:
  https://lore.kernel.org/20261007200311.730443-1-maciej.fijalkowski@intel.com
is still not upstream!?

Recent discussions suggest that Intel maintainers may be willing
to ack patches on netdev directly. Let's put that to tests.

Note that I think this is a major bug likely to bother real
users so I'm targetting net. Przemek's series will have to
wait for net->net-next merge.

Jakub Kicinski (2):
  ice: don't unintentionally switch to symmetric RSS hash
  iavf: don't unintentionally switch to symmetric RSS hash

 drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 3 ++-
 drivers/net/ethernet/intel/ice/ice_ethtool.c   | 9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

-- 
2.56.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net 1/2] ice: don't unintentionally switch to symmetric RSS hash
  2026-11-23 20:55 [PATCH net 0/2] eth: intel: fix unintentional symmetric RSS Jakub Kicinski
@ 2026-11-23 20:55 ` Jakub Kicinski
  2026-11-23 21:10   ` Maciej Fijalkowski
  2026-11-23 20:56 ` [PATCH net 2/2] iavf: " Jakub Kicinski
  1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2026-11-23 20:55 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, ahmed.zaki,
	jacob.e.keller, intel-wired-lan, anthony.l.nguyen,
	przemyslaw.kitszel, Jakub Kicinski

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 2/2] iavf: don't unintentionally switch to symmetric RSS hash
  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 20:56 ` Jakub Kicinski
  2026-11-23 21:10   ` Maciej Fijalkowski
  1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2026-11-23 20:56 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, ahmed.zaki,
	jacob.e.keller, intel-wired-lan, anthony.l.nguyen,
	przemyslaw.kitszel, Jakub Kicinski

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 <kuba@kernel.org>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net 1/2] ice: don't unintentionally switch to symmetric RSS hash
  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
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej Fijalkowski @ 2026-11-23 21:10 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, ahmed.zaki,
	jacob.e.keller, intel-wired-lan, anthony.l.nguyen,
	przemyslaw.kitszel

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
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net 2/2] iavf: don't unintentionally switch to symmetric RSS hash
  2026-11-23 20:56 ` [PATCH net 2/2] iavf: " Jakub Kicinski
@ 2026-11-23 21:10   ` Maciej Fijalkowski
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej Fijalkowski @ 2026-11-23 21:10 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, ahmed.zaki,
	jacob.e.keller, intel-wired-lan, anthony.l.nguyen,
	przemyslaw.kitszel

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 <kuba@kernel.org>

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

> ---
>  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
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-23 21:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-11-23 20:56 ` [PATCH net 2/2] iavf: " Jakub Kicinski
2026-11-23 21:10   ` Maciej Fijalkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox