X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fbuffer.h;h=6518fb6701614f8d8c4a7fcbf86b063305c6fcee;hb=ad0c77f163472e0715c167aec59a26bcd34d649b;hp=52dada30ba8a9f6897e954c98cc0c3793b27dc81;hpb=213b5aae860c2a9d5de8d4d070d0d2091af699f5;p=vpp.git diff --git a/src/vnet/buffer.h b/src/vnet/buffer.h index 52dada30ba8..6518fb67016 100644 --- a/src/vnet/buffer.h +++ b/src/vnet/buffer.h @@ -47,9 +47,15 @@ _( 2, L4_CHECKSUM_CORRECT) \ _( 3, VLAN_2_DEEP) \ _( 4, VLAN_1_DEEP) \ + _( 8, SPAN_CLONE) \ _( 6, HANDOFF_NEXT_VALID) \ _( 7, LOCALLY_ORIGINATED) \ - _( 8, SPAN_CLONE) + _( 8, IS_IP4) \ + _( 9, IS_IP6) \ + _(10, OFFLOAD_IP_CKSUM) \ + _(11, OFFLOAD_TCP_CKSUM) \ + _(12, OFFLOAD_UDP_CKSUM) \ + _(13, IS_NATED) #define VNET_BUFFER_FLAGS_VLAN_BITS \ (VNET_BUFFER_F_VLAN_1_DEEP | VNET_BUFFER_F_VLAN_2_DEEP) @@ -82,6 +88,8 @@ _(ipsec) \ _(map) \ _(map_t) \ _(ip_frag) \ +_(mpls) \ +_(bier) \ _(tcp) /* @@ -120,8 +128,14 @@ typedef struct protocol and ports. */ u32 flow_hash; - /* next protocol */ - u32 save_protocol; + union + { + /* next protocol */ + u32 save_protocol; + + /* Hint for transport protocols */ + u32 fib_index; + }; /* Rewrite length */ u32 save_rewrite_length; @@ -153,6 +167,16 @@ typedef struct u8 first; } mpls; + /* + * BIER - the nubmer of bytes in the header. + * the len field inthe header is not authoritative. It's the + * value in the table that counts. + */ + struct + { + u8 n_bytes; + } bier; + /* ip4-in-ip6 softwire termination, only valid there */ struct { @@ -168,6 +192,7 @@ typedef struct u8 l2_len; /* ethernet header length */ u8 shg; /* split-horizon group */ u16 l2fib_sn; /* l2fib bd/int seq_num */ + u8 bd_age; /* aging enabled */ } l2; /* l2tpv3 softwire encap, only valid there */ @@ -279,6 +304,12 @@ typedef struct u8 flags; } tcp; + /* SNAT */ + struct + { + u32 flags; + } snat; + u32 unused[6]; }; } vnet_buffer_opaque_t; @@ -298,9 +329,26 @@ typedef struct { union { +#if VLIB_BUFFER_TRACE_TRAJECTORY > 0 + /* buffer trajectory tracing */ + struct + { + u16 *trajectory_trace; + }; +#endif + u32 unused[12]; }; } vnet_buffer_opaque2_t; +#define vnet_buffer2(b) ((vnet_buffer_opaque2_t *) (b)->opaque2) + +/* + * The opaque2 field of the vlib_buffer_t is intepreted as a + * vnet_buffer_opaque2_t. Hence it should be big enough to accommodate one. + */ +STATIC_ASSERT (sizeof (vnet_buffer_opaque2_t) <= + STRUCT_SIZE_OF (vlib_buffer_t, opaque2), + "VNET buffer opaque2 meta-data too large for vlib_buffer"); #endif /* included_vnet_buffer_h */