FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
buffer.h File Reference
+ Include dependency graph for buffer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vnet_buffer_opaque_t
 
struct  vnet_buffer_opaque2_t
 

Macros

#define foreach_vnet_buffer_flag
 Flags that are set in the high order bits of ((vlib_buffer*)b)->flags. More...
 
#define VNET_BUFFER_FLAGS_ALL_AVAIL
 
#define VNET_BUFFER_FLAGS_VLAN_BITS   (VNET_BUFFER_F_VLAN_1_DEEP | VNET_BUFFER_F_VLAN_2_DEEP)
 
#define foreach_buffer_opaque_union_subtype
 
#define VNET_REWRITE_TOTAL_BYTES   (VLIB_BUFFER_PRE_DATA_SIZE)
 
#define vnet_buffer(b)   ((vnet_buffer_opaque_t *) (b)->opaque)
 
#define vnet_buffer2(b)   ((vnet_buffer_opaque2_t *) (b)->opaque2)
 
#define gso_mtu_sz(b)
 

Enumerations

enum  { foreach_vnet_buffer_flag }
 
enum  { foreach_vnet_buffer_flag }
 

Functions

 STATIC_ASSERT (((VNET_BUFFER_FLAGS_ALL_AVAIL &VLIB_BUFFER_FLAGS_ALL)==0), "VLIB / VNET buffer flags overlap")
 
 STATIC_ASSERT (sizeof(vnet_buffer_opaque_t)<=STRUCT_SIZE_OF(vlib_buffer_t, opaque), "VNET buffer meta-data too large for vlib_buffer")
 
 STATIC_ASSERT (sizeof(vnet_buffer_opaque2_t)<=STRUCT_SIZE_OF(vlib_buffer_t, opaque2), "VNET buffer opaque2 meta-data too large for vlib_buffer")
 

Variables

save_rewrite_length must be aligned so that reass doesn t overwrite it
 
format_function_t format_vnet_buffer
 

Macro Definition Documentation

◆ foreach_buffer_opaque_union_subtype

#define foreach_buffer_opaque_union_subtype
Value:
_(ip) \
_(l2) \
_(l2t) \
_(l2_classify) \
_(policer) \
_(ipsec) \
_(map) \
_(map_t) \
_(ip_frag) \
_(mpls) \
_(tcp)
vl_api_address_t ip
Definition: l2.api:501

Definition at line 110 of file buffer.h.

◆ foreach_vnet_buffer_flag

foreach_vnet_buffer_flag
Value:
_( 1, L4_CHECKSUM_COMPUTED, "l4-cksum-computed", 1) \
_( 2, L4_CHECKSUM_CORRECT, "l4-cksum-correct", 1) \
_( 3, VLAN_2_DEEP, "vlan-2-deep", 1) \
_( 4, VLAN_1_DEEP, "vlan-1-deep", 1) \
_( 5, SPAN_CLONE, "span-clone", 1) \
_( 6, LOOP_COUNTER_VALID, "loop-counter-valid", 0) \
_( 7, LOCALLY_ORIGINATED, "local", 1) \
_( 8, IS_IP4, "ip4", 1) \
_( 9, IS_IP6, "ip6", 1) \
_(10, OFFLOAD_IP_CKSUM, "offload-ip-cksum", 1) \
_(11, OFFLOAD_TCP_CKSUM, "offload-tcp-cksum", 1) \
_(12, OFFLOAD_UDP_CKSUM, "offload-udp-cksum", 1) \
_(13, IS_NATED, "natted", 1) \
_(14, L2_HDR_OFFSET_VALID, "l2_hdr_offset_valid", 0) \
_(15, L3_HDR_OFFSET_VALID, "l3_hdr_offset_valid", 0) \
_(16, L4_HDR_OFFSET_VALID, "l4_hdr_offset_valid", 0) \
_(17, FLOW_REPORT, "flow-report", 1) \
_(18, IS_DVR, "dvr", 1) \
_(19, QOS_DATA_VALID, "qos-data-valid", 0) \
_(20, GSO, "gso", 0) \
_(21, AVAIL1, "avail1", 1) \
_(22, AVAIL2, "avail2", 1) \
_(23, AVAIL3, "avail3", 1) \
_(24, AVAIL4, "avail4", 1) \
_(25, AVAIL5, "avail5", 1) \
_(26, AVAIL6, "avail6", 1) \
_(27, AVAIL7, "avail7", 1)

Flags that are set in the high order bits of ((vlib_buffer*)b)->flags.

Definition at line 49 of file buffer.h.

◆ gso_mtu_sz

#define gso_mtu_sz (   b)
Value:
(vnet_buffer2(b)->gso_size + \
vnet_buffer2(b)->gso_l4_hdr_sz + \
vnet_buffer(b)->l4_hdr_offset - \
vnet_buffer (b)->l3_hdr_offset)
#define vnet_buffer2(b)
Definition: buffer.h:482

Definition at line 492 of file buffer.h.

◆ vnet_buffer

#define vnet_buffer (   b)    ((vnet_buffer_opaque_t *) (b)->opaque)

Definition at line 417 of file buffer.h.

◆ vnet_buffer2

#define vnet_buffer2 (   b)    ((vnet_buffer_opaque2_t *) (b)->opaque2)

Definition at line 482 of file buffer.h.

◆ VNET_BUFFER_FLAGS_ALL_AVAIL

#define VNET_BUFFER_FLAGS_ALL_AVAIL
Value:
(VNET_BUFFER_F_AVAIL1 | VNET_BUFFER_F_AVAIL2 | VNET_BUFFER_F_AVAIL3 | \
VNET_BUFFER_F_AVAIL4 | VNET_BUFFER_F_AVAIL5 | VNET_BUFFER_F_AVAIL6 | \
VNET_BUFFER_F_AVAIL7)

Definition at line 84 of file buffer.h.

◆ VNET_BUFFER_FLAGS_VLAN_BITS

#define VNET_BUFFER_FLAGS_VLAN_BITS   (VNET_BUFFER_F_VLAN_1_DEEP | VNET_BUFFER_F_VLAN_2_DEEP)

Definition at line 89 of file buffer.h.

◆ VNET_REWRITE_TOTAL_BYTES

#define VNET_REWRITE_TOTAL_BYTES   (VLIB_BUFFER_PRE_DATA_SIZE)

Definition at line 387 of file buffer.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
foreach_vnet_buffer_flag 

Definition at line 92 of file buffer.h.

◆ anonymous enum

anonymous enum
Enumerator
foreach_vnet_buffer_flag 

Definition at line 99 of file buffer.h.

Function Documentation

◆ STATIC_ASSERT() [1/3]

STATIC_ASSERT ( ((VNET_BUFFER_FLAGS_ALL_AVAIL &VLIB_BUFFER_FLAGS_ALL)==0)  ,
"VLIB / VNET buffer flags overlap"   
)

◆ STATIC_ASSERT() [2/3]

STATIC_ASSERT ( sizeof(vnet_buffer_opaque_t)<=STRUCT_SIZE_OF(vlib_buffer_t, opaque)  ,
"VNET buffer meta-data too large for vlib_buffer"   
)

◆ STATIC_ASSERT() [3/3]

STATIC_ASSERT ( sizeof(vnet_buffer_opaque2_t)<=STRUCT_SIZE_OF(vlib_buffer_t, opaque2)  ,
"VNET buffer opaque2 meta-data too large for vlib_buffer"   
)

Variable Documentation

◆ format_vnet_buffer

format_function_t format_vnet_buffer

Definition at line 498 of file buffer.h.

◆ it

save_rewrite_length must be aligned so that reass doesn t overwrite it

Definition at line 401 of file buffer.h.