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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b9bd25f commit 8425161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)