Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: 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,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net 2/2] iavf: don't unintentionally switch to symmetric RSS hash
Date: Mon, 23 Nov 2026 12:56:00 -0800	[thread overview]
Message-ID: <20261123205600.1794292-3-kuba@kernel.org> (raw)
In-Reply-To: <20261123205600.1794292-1-kuba@kernel.org>

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


  parent reply	other threads:[~2026-11-23 20:56 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
2026-11-23 20:56 ` Jakub Kicinski [this message]
2026-11-23 21:10   ` [PATCH net 2/2] iavf: " 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=20261123205600.1794292-3-kuba@kernel.org \
    --to=kuba@kernel.org \
    --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=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