Skip to contentSkip to conversation

nfp: fix RSS hash key size when RSS is not supported

PATCH Applied Kohei Enju 2 participants 2 messages Sep 29, 2025 – Sep 30, 2025

Subsystems (3)
lore
Share & tools
lore

Kohei Enju

author
#0 lore raw

PATCH 1/1 nfp: fix RSS hash key size when RSS is not supported

The nfp_net_get_rxfh_key_size() function returns -EOPNOTSUPP when devices don't support RSS, and callers treat the negative value as a large positive value since the return type is u32.

Return 0 when devices don't support RSS, aligning with the ethtool interface .get_rxfh_key_size() that requires returning 0 in such cases.

Fixes 9ff304bfaf58 ("nfp: add support for reporting CRC32 hash function")
---
 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +1 -1
index a36215195923..16c828dd5c1a 100644
@@ -1788,7 +1788,7 @@ static u32 nfp_net_get_rxfh_key_size(struct net_device *netdev)
 	struct nfp_net *nn = netdev_priv(netdev);
 
 	if (!(nn->cap & NFP_NET_CFG_CTRL_RSS_ANY))
-		return -EOPNOTSUPP;
+		return 0;
 
 	return nfp_net_rss_key_sz(nn);
 }
Signature · 1 line
2.48.1
#1 lore raw
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Mon, 29 Sep 2025 14:42:15 +0900 you wrote:

The nfp_net_get_rxfh_key_size() function returns -EOPNOTSUPP when devices don't support RSS, and callers treat the negative value as a large positive value since the return type is u32.

Return 0 when devices don't support RSS, aligning with the ethtool interface .get_rxfh_key_size() that requires returning 0 in such cases.

[...]

Here is the summary with links:
- [net,v1] nfp: fix RSS hash key size when RSS is not supported

    https://git.kernel.org/netdev/net/c/8425161ac120

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html