Skip to content

Commit d389954

Browse files
WeiFang-NXPkuba-moo
authored andcommitted
net: enetc: check whether the RSS algorithm is Toeplitz
Both ENETC v1 and v4 only provide Toeplitz RSS support. This patch adds a validation check to reject attempts to configure other RSS algorithms, avoiding misleading configuration options for users. Fixes: d382563 ("enetc: Add RFS and RSS support") Signed-off-by: Wei Fang <[email protected]> Reviewed-by: Clark Wang <[email protected]> Reviewed-by: Claudiu Manoil <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent eeee5a7 commit d389954

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/net/ethernet/freescale/enetc/enetc_ethtool.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,10 @@ static int enetc_set_rxfh(struct net_device *ndev,
795795
struct enetc_si *si = priv->si;
796796
int err = 0;
797797

798+
if (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE &&
799+
rxfh->hfunc != ETH_RSS_HASH_TOP)
800+
return -EOPNOTSUPP;
801+
798802
/* set hash key, if PF */
799803
if (rxfh->key && enetc_si_is_pf(si))
800804
enetc_set_rss_key(si, rxfh->key);

0 commit comments

Comments
 (0)