From fe3490e6107e10da90dee09cade35e6f4b558294 Mon Sep 17 00:00:00 2001 From: Horatiu Vultur Date: Fri, 31 May 2019 09:16:57 +0200 Subject: net: mscc: ocelot: Hardware ofload for tc flower filter Hardware offload of port filtering are now supported via tc command using flower filter. ACL rules are used to enable the hardware offload. The following keys are supported: vlan_id vlan_prio dst_mac/src_mac for non IP frames dst_ip/src_ip dst_port/src_port The following actions are supported: trap drop These filters are supported only on the ingress schedulare. Add: tc qdisc add dev eth3 ingress tc filter ad dev eth3 parent ffff: ip_proto ip flower \ ip_proto tcp dst_port 80 action drop Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller --- drivers/net/ethernet/mscc/ocelot_ace.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/net/ethernet/mscc/ocelot_ace.h') diff --git a/drivers/net/ethernet/mscc/ocelot_ace.h b/drivers/net/ethernet/mscc/ocelot_ace.h index c84e60862708..d621683643e1 100644 --- a/drivers/net/ethernet/mscc/ocelot_ace.h +++ b/drivers/net/ethernet/mscc/ocelot_ace.h @@ -224,4 +224,9 @@ int ocelot_ace_rule_stats_update(struct ocelot_ace_rule *rule); int ocelot_ace_init(struct ocelot *ocelot); void ocelot_ace_deinit(void); +int ocelot_setup_tc_block_flower_bind(struct ocelot_port *port, + struct tc_block_offload *f); +void ocelot_setup_tc_block_flower_unbind(struct ocelot_port *port, + struct tc_block_offload *f); + #endif /* _MSCC_OCELOT_ACE_H_ */ -- cgit v1.2.3-59-g8ed1b