diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2019-09-04 15:16:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-05 12:19:54 +0200 |
commit | 425eabddaf0f6e81756720f60a838a3941a6ceb8 (patch) | |
tree | 52ff558ec0328bb067df8f58d814131ecc369cb8 /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |
parent | c104891c4b1f559d4e6a469a5d5f4c509a862676 (diff) | |
download | lwn-425eabddaf0f6e81756720f60a838a3941a6ceb8.tar.gz lwn-425eabddaf0f6e81756720f60a838a3941a6ceb8.zip |
net: stmmac: Implement L3/L4 Filters using TC Flower
Implement filters for Layer 3 and Layer 4 using TC Flower API. Add the
corresponding callbacks in XGMAC core.
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 06ccd216ae90..c59c232aca64 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3931,12 +3931,17 @@ static int stmmac_setup_tc_block_cb(enum tc_setup_type type, void *type_data, struct stmmac_priv *priv = cb_priv; int ret = -EOPNOTSUPP; + if (!tc_cls_can_offload_and_chain0(priv->dev, type_data)) + return ret; + stmmac_disable_all_queues(priv); switch (type) { case TC_SETUP_CLSU32: - if (tc_cls_can_offload_and_chain0(priv->dev, type_data)) - ret = stmmac_tc_setup_cls_u32(priv, priv, type_data); + ret = stmmac_tc_setup_cls_u32(priv, priv, type_data); + break; + case TC_SETUP_CLSFLOWER: + ret = stmmac_tc_setup_cls(priv, priv, type_data); break; default: break; |