Skip to content

Commit 8425161

Browse files
hyperenjukuba-moo
authored andcommitted
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: 9ff304b ("nfp: add support for reporting CRC32 hash function") Signed-off-by: Kohei Enju <enjuk@amazon.com> Link: https://patch.msgid.link/20250929054230.68120-1-enjuk@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent b9bd25f commit 8425161

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1788,7 +1788,7 @@ static u32 nfp_net_get_rxfh_key_size(struct net_device *netdev)
17881788
struct nfp_net *nn = netdev_priv(netdev);
17891789

17901790
if (!(nn->cap & NFP_NET_CFG_CTRL_RSS_ANY))
1791-
return -EOPNOTSUPP;
1791+
return 0;
17921792

17931793
return nfp_net_rss_key_sz(nn);
17941794
}

0 commit comments

Comments
 (0)