From: Jose Abreu Date: Fri, 10 Jan 2020 15:23:53 +0000 (+0100) Subject: net: stmmac: tc: Do not setup flower filtering if RSS is enabled X-Git-Tag: baikal/mips/sdk5.9~14532^2~40^2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=60ca0396c73abbaffc5656ac6d97f231c78efc6c;p=kernel.git net: stmmac: tc: Do not setup flower filtering if RSS is enabled RSS, when enabled, will bypass the L3 and L4 filtering causing it not to work. Add a check before trying to setup the filters. Fixes: 8aaef7e4c5cc ("net: stmmac: Implement L3/L4 Filters using TC Flower") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c index 7d972e0fd2b04..9ffae12a21227 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -577,6 +577,10 @@ static int tc_setup_cls(struct stmmac_priv *priv, { int ret = 0; + /* When RSS is enabled, the filtering will be bypassed */ + if (priv->rss.enable) + return -EBUSY; + switch (cls->command) { case FLOW_CLS_REPLACE: ret = tc_add_flow(priv, cls);