40 #ifndef included_vnet_buffer_h 41 #define included_vnet_buffer_h 45 #define foreach_vnet_buffer_field \ 46 _( 1, L4_CHECKSUM_COMPUTED, "l4-cksum-computed") \ 47 _( 2, L4_CHECKSUM_CORRECT, "l4-cksum-correct") \ 48 _( 3, VLAN_2_DEEP, "vlan-2-deep") \ 49 _( 4, VLAN_1_DEEP, "vlan-1-deep") \ 50 _( 8, SPAN_CLONE, "span-clone") \ 51 _( 6, HANDOFF_NEXT_VALID, "handoff-next-valid") \ 52 _( 7, LOCALLY_ORIGINATED, "local") \ 53 _( 8, IS_IP4, "ip4") \ 54 _( 9, IS_IP6, "ip6") \ 55 _(10, OFFLOAD_IP_CKSUM, "offload-ip-cksum") \ 56 _(11, OFFLOAD_TCP_CKSUM, "offload-tcp-cksum") \ 57 _(12, OFFLOAD_UDP_CKSUM, "offload-udp-cksum") \ 58 _(13, IS_NATED, "nated") \ 59 _(14, L2_HDR_OFFSET_VALID, 0) \ 60 _(15, L3_HDR_OFFSET_VALID, 0) \ 61 _(16, L4_HDR_OFFSET_VALID, 0) 63 #define VNET_BUFFER_FLAGS_VLAN_BITS \ 64 (VNET_BUFFER_F_VLAN_1_DEEP | VNET_BUFFER_F_VLAN_2_DEEP) 68 #define _(bit, name, v) VNET_BUFFER_F_##name = (1 << LOG2_VLIB_BUFFER_FLAG_USER(bit)), 75 #define _(bit, name, v) VNET_BUFFER_F_LOG2_##name = LOG2_VLIB_BUFFER_FLAG_USER(bit), 81 #define foreach_buffer_opaque_union_subtype \ 324 "VNET buffer meta-data too large for vlib_buffer");
326 #define vnet_buffer(b) ((vnet_buffer_opaque_t *) (b)->opaque) 333 #if VLIB_BUFFER_TRACE_TRAJECTORY > 0 337 u16 *trajectory_trace;
344 #define vnet_buffer2(b) ((vnet_buffer_opaque2_t *) (b)->opaque2) 352 "VNET buffer opaque2 meta-data too large for vlib_buffer");
u8 pad[3]
log2 (size of the packing page block)
#define foreach_vnet_buffer_field
u32 saved_next_index
saved by drivers for short-cut
u16 data_offset
offset relative to ip hdr
STATIC_ASSERT(sizeof(vnet_buffer_opaque_t)<=STRUCT_SIZE_OF(vlib_buffer_t, opaque),"VNET buffer meta-data too large for vlib_buffer")
format_function_t format_vnet_buffer
u16 hdr_offset
offset relative to ip hdr
#define STRUCT_SIZE_OF(t, f)