diff options
author | Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> | 2018-02-15 20:19:09 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-16 16:24:24 -0500 |
commit | ffa61202fe2972577794004f79652360b5f4ddb0 (patch) | |
tree | c1e93fca144dc3b2a84b550fcd0ac34f1db3a9f1 /drivers/net/ethernet/netronome/nfp/flower/cmsg.h | |
parent | 014f9008989c0d6353e15621c6d3c18d6dfc1ab2 (diff) | |
download | linux-stable-ffa61202fe2972577794004f79652360b5f4ddb0.tar.gz linux-stable-ffa61202fe2972577794004f79652360b5f4ddb0.tar.bz2 linux-stable-ffa61202fe2972577794004f79652360b5f4ddb0.zip |
nfp: flower: implement tcp flag match offload
Implement tcp flag match offloading. Current tcp flag match support include
FIN, SYN, RST, PSH and URG flags, other flags are unsupported. The PSH and
URG flags are only set in the hardware fast path when used in combination
with the SYN, RST and PSH flags.
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/flower/cmsg.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/cmsg.h b/drivers/net/ethernet/netronome/nfp/flower/cmsg.h index adfe474c2cf0..28c1cd5b823b 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/cmsg.h +++ b/drivers/net/ethernet/netronome/nfp/flower/cmsg.h @@ -61,6 +61,13 @@ #define NFP_FLOWER_MASK_MPLS_BOS BIT(8) #define NFP_FLOWER_MASK_MPLS_Q BIT(0) +/* Compressed HW representation of TCP Flags */ +#define NFP_FL_TCP_FLAG_URG BIT(4) +#define NFP_FL_TCP_FLAG_PSH BIT(3) +#define NFP_FL_TCP_FLAG_RST BIT(2) +#define NFP_FL_TCP_FLAG_SYN BIT(1) +#define NFP_FL_TCP_FLAG_FIN BIT(0) + #define NFP_FL_SC_ACT_DROP 0x80000000 #define NFP_FL_SC_ACT_USER 0x7D000000 #define NFP_FL_SC_ACT_POPV 0x6A000000 @@ -257,7 +264,7 @@ struct nfp_flower_tp_ports { * 3 2 1 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * | DSCP |ECN| protocol | reserved | + * | DSCP |ECN| protocol | ttl | flags | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | ipv4_addr_src | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -268,7 +275,7 @@ struct nfp_flower_ipv4 { u8 tos; u8 proto; u8 ttl; - u8 reserved; + u8 flags; __be32 ipv4_src; __be32 ipv4_dst; }; |