The RSS kselftests fail on stmmac, and this is partly due to the driver reporting bogus data for the RSS ops : - ethtool -x reports an indirection table and a key while the hardware doesn't have any of that - ethtool -X fails with -EINVAL. Return a 0 indir size and key size when rss isn't supported, effectively meaning we don't support RSS here. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index 1cf0f8820b33..7f2a70575b83 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c @@ -927,6 +927,9 @@ static u32 stmmac_get_rxfh_key_size(struct net_device *dev) { struct stmmac_priv *priv = netdev_priv(dev); + if (!stmmac_rss_is_supported(priv)) + return 0; + return sizeof(priv->rss.key); } @@ -934,6 +937,9 @@ static u32 stmmac_get_rxfh_indir_size(struct net_device *dev) { struct stmmac_priv *priv = netdev_priv(dev); + if (!stmmac_rss_is_supported(priv)) + return 0; + return ARRAY_SIZE(priv->rss.table); } -- 2.55.0