+#define VLIB_BUFFER_FLAGS_ALL (0x0f)
+
+/** VLIB buffer representation. */
+typedef union
+{
+ struct
+ {
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
+
+ /** signed offset in data[], pre_data[] that we are currently
+ * processing. If negative current header points into predata area. */
+ i16 current_data;
+
+ /** Nbytes between current data and the end of this buffer. */
+ u16 current_length;
+
+ /** buffer flags:
+ <br> VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,
+ <br> VLIB_BUFFER_IS_TRACED: trace this buffer.
+ <br> VLIB_BUFFER_NEXT_PRESENT: this is a multi-chunk buffer.
+ <br> VLIB_BUFFER_TOTAL_LENGTH_VALID: as it says
+ <br> VLIB_BUFFER_EXT_HDR_VALID: buffer contains valid external buffer manager header,
+ set to avoid adding it to a flow report
+ <br> VLIB_BUFFER_FLAG_USER(n): user-defined bit N
+ */
+ u32 flags;
+
+ /** Generic flow identifier */
+ u32 flow_id;
+
+ /** Reference count for this buffer. */
+ volatile u8 ref_count;
+
+ /** index of buffer pool this buffer belongs. */
+ u8 buffer_pool_index;
+
+ /** Error code for buffers to be enqueued to error handler. */
+ vlib_error_t error;
+
+ /** Next buffer for this linked-list of buffers. Only valid if
+ * VLIB_BUFFER_NEXT_PRESENT flag is set. */
+ u32 next_buffer;
+
+ /** The following fields can be in a union because once a packet enters
+ * the punt path, it is no longer on a feature arc */
+ union
+ {
+ /** Used by feature subgraph arcs to visit enabled feature nodes */
+ u32 current_config_index;
+ /* the reason the packet once punted */
+ u32 punt_reason;
+ };
+
+ /** Opaque data used by sub-graphs for their own purposes. */
+ u32 opaque[10];
+
+ /** part of buffer metadata which is initialized on alloc ends here. */
+ STRUCT_MARK (template_end);
+
+ /** start of 2nd cache line */
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
+
+ /** Specifies trace buffer handle if VLIB_PACKET_IS_TRACED flag is
+ * set. */
+ u32 trace_handle;
+
+ /** Only valid for first buffer in chain. Current length plus total length
+ * given here give total number of bytes in buffer chain. */
+ u32 total_length_not_including_first_buffer;
+
+ /**< More opaque data, see ../vnet/vnet/buffer.h */
+ u32 opaque2[14];
+
+ /** start of third cache line */
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline2);