diff options
author | Edward Cree <ecree.xilinx@gmail.com> | 2022-11-03 15:27:29 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-04 19:54:23 -0700 |
commit | c178dff3f92d4416b43f3a376174357549a0d347 (patch) | |
tree | 0698a8b64ccb25017299408993c52e4aa92664cb /drivers/net/ethernet/sfc/tc.h | |
parent | 6d1c604d1098d5c1d355950989945941fa3b315e (diff) |
sfc: add Layer 3 matches to ef100 TC offload
Support matching on IP protocol, Type of Service, Time To Live, source
and destination addresses, with masking if supported by the hardware.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/sfc/tc.h')
-rw-r--r-- | drivers/net/ethernet/sfc/tc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/tc.h b/drivers/net/ethernet/sfc/tc.h index 272efbabd6be..aebe9c251b2c 100644 --- a/drivers/net/ethernet/sfc/tc.h +++ b/drivers/net/ethernet/sfc/tc.h @@ -15,6 +15,8 @@ #include <linux/rhashtable.h> #include "net_driver.h" +#define IS_ALL_ONES(v) (!(typeof (v))~(v)) + struct efx_tc_action_set { u16 deliver:1; u32 dest_mport; @@ -30,6 +32,12 @@ struct efx_tc_match_fields { __be16 eth_proto; __be16 vlan_tci[2], vlan_proto[2]; u8 eth_saddr[ETH_ALEN], eth_daddr[ETH_ALEN]; + /* L3 (when IP) */ + u8 ip_proto, ip_tos, ip_ttl; + __be32 src_ip, dst_ip; +#ifdef CONFIG_IPV6 + struct in6_addr src_ip6, dst_ip6; +#endif }; struct efx_tc_match { |