diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2021-06-17 14:33:03 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-07-16 12:02:53 +0000 |
commit | 537e955545c54820e9a6a54225bfb280f7cd7763 (patch) | |
tree | a0e421b92d1b9357e8a1b2e9b6010ec9b2ef14f2 /src/vnet/buffer.h | |
parent | 9a554eea0e5b3e2b36c30ce2725f364380bdd55c (diff) |
vlib: add tunnel offload flags for vlib_buffer_t
Type: improvement
Change-Id: Iaad50b2044702c46eff287708dfcb24e61022104
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/buffer.h')
-rw-r--r-- | src/vnet/buffer.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/buffer.h b/src/vnet/buffer.h index 0798de4cf63..600782c3864 100644 --- a/src/vnet/buffer.h +++ b/src/vnet/buffer.h @@ -112,8 +112,9 @@ STATIC_ASSERT (((VNET_BUFFER_FLAGS_ALL_AVAIL & VLIB_BUFFER_FLAGS_ALL) == 0), _ (1, TCP_CKSUM, "offload-tcp-cksum", 1) \ _ (2, UDP_CKSUM, "offload-udp-cksum", 1) \ _ (3, OUTER_IP_CKSUM, "offload-outer-ip-cksum", 1) \ - _ (4, OUTER_TCP_CKSUM, "offload-outer-tcp-cksum", 1) \ - _ (5, OUTER_UDP_CKSUM, "offload-outer-udp-cksum", 1) + _ (4, OUTER_UDP_CKSUM, "offload-outer-udp-cksum", 1) \ + _ (5, TNL_VXLAN, "offload-vxlan-tunnel", 1) \ + _ (6, TNL_IPIP, "offload-ipip-tunnel", 1) typedef enum { @@ -122,6 +123,9 @@ typedef enum #undef _ } vnet_buffer_oflags_t; +#define VNET_BUFFER_OFFLOAD_F_TNL_MASK \ + (VNET_BUFFER_OFFLOAD_F_TNL_VXLAN | VNET_BUFFER_OFFLOAD_F_TNL_IPIP) + #define foreach_buffer_opaque_union_subtype \ _(ip) \ _(l2) \ @@ -473,6 +477,8 @@ typedef struct u16 gso_size; /* size of L4 prototol header */ u16 gso_l4_hdr_sz; + i16 outer_l3_hdr_offset; + i16 outer_l4_hdr_offset; }; struct |