X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Fbuffer.h;h=7153f3541b164ed635f29c58216f55aa215a225d;hb=215104e67f3574e9a54684c1ed628b4690f47979;hp=9cbb402bd602a9f9b5ec4af22168f7db80c5dc5b;hpb=cb9cadad578297ffd78fa8a33670bdf1ab669e7e;p=vpp.git diff --git a/vnet/vnet/buffer.h b/vnet/vnet/buffer.h index 9cbb402bd60..7153f3541b1 100644 --- a/vnet/vnet/buffer.h +++ b/vnet/vnet/buffer.h @@ -49,24 +49,34 @@ #define IP_BUFFER_L4_CHECKSUM_COMPUTED (1 << LOG2_IP_BUFFER_L4_CHECKSUM_COMPUTED) #define IP_BUFFER_L4_CHECKSUM_CORRECT (1 << LOG2_IP_BUFFER_L4_CHECKSUM_CORRECT) -#define LOG2_HGSHM_BUFFER_USER_INDEX_VALID LOG2_VLIB_BUFFER_FLAG_USER(3) -#define VNET_HGSHM_BUFFER_USER_INDEX_VALID (1 << LOG2_HGSHM_BUFFER_USER_INDEX_VALID) +/* VLAN header flags. + * These bits are zeroed in vlib_buffer_init_for_free_list() + * meaning wherever the buffer comes from they have a reasonable + * value (eg, if ip4/ip6 generates the packet.) + */ +#define LOG2_ETH_BUFFER_VLAN_2_DEEP LOG2_VLIB_BUFFER_FLAG_USER(3) +#define LOG2_ETH_BUFFER_VLAN_1_DEEP LOG2_VLIB_BUFFER_FLAG_USER(4) +#define ETH_BUFFER_VLAN_2_DEEP (1 << LOG2_ETH_BUFFER_VLAN_2_DEEP) +#define ETH_BUFFER_VLAN_1_DEEP (1 << LOG2_ETH_BUFFER_VLAN_1_DEEP) +#define ETH_BUFFER_VLAN_BITS (ETH_BUFFER_VLAN_1_DEEP | \ + ETH_BUFFER_VLAN_2_DEEP) + #define foreach_buffer_opaque_union_subtype \ _(ethernet) \ _(ip) \ _(mcast) \ -_(lb) \ -_(dlb) \ _(swt) \ _(l2) \ _(l2t) \ -_(hgshm) \ _(gre) \ _(l2_classify) \ _(io_handoff) \ _(policer) \ -_(output_features) +_(output_features) \ +_(map) \ +_(map_t) \ +_(ip_frag) /* * vnet stack buffer opaque array overlay structure. @@ -116,7 +126,16 @@ typedef struct { u32 established_connection_index; u32 mini_connection_index; + + u32 transmit_stamp; } tcp; + + /* ICMP */ + struct { + u8 type; + u8 code; + u32 data; + } icmp; }; } ip; @@ -128,20 +147,6 @@ typedef struct { u32 original_free_list_index; } mcast; - /* ipv6 shallow-pkt-inspection load-balancer, only valid there */ - struct { - u8 lb_disable; - u8 user_to_network; - u8 was_injected; - u32 bucket_id; - } lb; - /* ipv4 DPI load-balancer, only valid there */ - struct { - u8 lb_disable; - u8 user_to_network; - u32 session_index; - } dlb; - /* ip4-in-ip6 softwire termination, only valid there */ struct { u8 swt_disable; @@ -163,12 +168,6 @@ typedef struct { u32 session_index; } l2t; - /* hgshm, valid if packet sent through iface */ - struct { - u32 pad[8 -VLIB_N_RX_TX -1]; /* to end of opaque */ - u32 user_index; /* client id borrowing buffer */ - } hgshm; - struct { u32 src, dst; } gre; @@ -286,6 +285,12 @@ typedef struct { u8 flags; //See ip_frag.h } ip_frag; + /* COP - configurable junk filter(s) */ + struct { + /* Current configuration index. */ + u32 current_config_index; + } cop; + u32 unused[6]; }; } vnet_buffer_opaque_t;