]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: stmmac: tc: Do not setup flower filtering if RSS is enabled
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 10 Jan 2020 15:23:53 +0000 (16:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jan 2020 19:31:10 +0000 (11:31 -0800)
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 <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c

index 7d972e0fd2b04d8759a016b023e07b30381e3dd3..9ffae12a212273c8c3d85844ff0a1e0dc6efcfd3 100644 (file)
@@ -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);