40 #ifndef included_vnet_buffer_h 41 #define included_vnet_buffer_h 49 #define foreach_vnet_buffer_flag \ 50 _( 1, L4_CHECKSUM_COMPUTED, "l4-cksum-computed", 1) \ 51 _( 2, L4_CHECKSUM_CORRECT, "l4-cksum-correct", 1) \ 52 _( 3, VLAN_2_DEEP, "vlan-2-deep", 1) \ 53 _( 4, VLAN_1_DEEP, "vlan-1-deep", 1) \ 54 _( 5, SPAN_CLONE, "span-clone", 1) \ 55 _( 6, LOOP_COUNTER_VALID, "loop-counter-valid", 0) \ 56 _( 7, LOCALLY_ORIGINATED, "local", 1) \ 57 _( 8, IS_IP4, "ip4", 1) \ 58 _( 9, IS_IP6, "ip6", 1) \ 59 _(10, OFFLOAD_IP_CKSUM, "offload-ip-cksum", 1) \ 60 _(11, OFFLOAD_TCP_CKSUM, "offload-tcp-cksum", 1) \ 61 _(12, OFFLOAD_UDP_CKSUM, "offload-udp-cksum", 1) \ 62 _(13, IS_NATED, "natted", 1) \ 63 _(14, L2_HDR_OFFSET_VALID, "l2_hdr_offset_valid", 0) \ 64 _(15, L3_HDR_OFFSET_VALID, "l3_hdr_offset_valid", 0) \ 65 _(16, L4_HDR_OFFSET_VALID, "l4_hdr_offset_valid", 0) \ 66 _(17, FLOW_REPORT, "flow-report", 1) \ 67 _(18, IS_DVR, "dvr", 1) \ 68 _(19, QOS_DATA_VALID, "qos-data-valid", 0) \ 69 _(20, GSO, "gso", 0) \ 70 _(21, AVAIL1, "avail1", 1) \ 71 _(22, AVAIL2, "avail2", 1) \ 72 _(23, AVAIL3, "avail3", 1) \ 73 _(24, AVAIL4, "avail4", 1) \ 74 _(25, AVAIL5, "avail5", 1) \ 75 _(26, AVAIL6, "avail6", 1) \ 76 _(27, AVAIL7, "avail7", 1) 84 #define VNET_BUFFER_FLAGS_ALL_AVAIL \ 85 (VNET_BUFFER_F_AVAIL1 | VNET_BUFFER_F_AVAIL2 | VNET_BUFFER_F_AVAIL3 | \ 86 VNET_BUFFER_F_AVAIL4 | VNET_BUFFER_F_AVAIL5 | VNET_BUFFER_F_AVAIL6 | \ 89 #define VNET_BUFFER_FLAGS_VLAN_BITS \ 90 (VNET_BUFFER_F_VLAN_1_DEEP | VNET_BUFFER_F_VLAN_2_DEEP) 94 #define _(bit, name, s, v) VNET_BUFFER_F_##name = (1 << LOG2_VLIB_BUFFER_FLAG_USER(bit)), 101 #define _(bit, name, s, v) VNET_BUFFER_F_LOG2_##name = LOG2_VLIB_BUFFER_FLAG_USER(bit), 108 "VLIB / VNET buffer flags overlap");
110 #define foreach_buffer_opaque_union_subtype \ 224 u32 save_rewrite_length;
340 u32 connection_index;
367 "VNET buffer meta-data too large for vlib_buffer");
369 #define vnet_buffer(b) ((vnet_buffer_opaque_t *) (b)->opaque) 414 #if VLIB_BUFFER_TRACE_TRAJECTORY > 0 416 u16 *trajectory_trace;
428 #define vnet_buffer2(b) ((vnet_buffer_opaque2_t *) (b)->opaque2) 436 "VNET buffer opaque2 meta-data too large for vlib_buffer");
438 #define gso_mtu_sz(b) (vnet_buffer2(b)->gso_size + vnet_buffer2(b)->gso_l4_hdr_sz + vnet_buffer(b)->l4_hdr_offset)
u8 pad[3]
log2 (size of the packing page block)
#define VLIB_BUFFER_FLAGS_ALL
u16 data_offset
offset relative to ip hdr
#define VNET_BUFFER_FLAGS_ALL_AVAIL
u16 gso_size
The L4 payload size set on input on GSO enabled interfaces when we receive a GSO packet (a chain of b...
u32 tsn
Transmission Sequence Number.
STATIC_ASSERT(((VNET_BUFFER_FLAGS_ALL_AVAIL &VLIB_BUFFER_FLAGS_ALL)==0),"VLIB / VNET buffer flags overlap")
format_function_t format_vnet_buffer
u16 ssn
Stream Sequence Number.
u16 owner_feature_thread_index
VLIB buffer representation.
#define foreach_vnet_buffer_flag
Flags that are set in the high order bits of ((vlib_buffer*)b)->flags.
u16 hdr_offset
offset relative to ip hdr
#define STRUCT_SIZE_OF(t, f)
u8 subconn_idx
index of the sub_connection being used