#define ETH_BUFFER_VLAN_BITS (ETH_BUFFER_VLAN_1_DEEP | \
ETH_BUFFER_VLAN_2_DEEP)
-#define LOG2_BUFFER_OUTPUT_FEAT_DONE LOG2_VLIB_BUFFER_FLAG_USER(5)
-#define BUFFER_OUTPUT_FEAT_DONE (1 << LOG2_BUFFER_OUTPUT_FEAT_DONE)
+#define LOG2_VNET_BUFFER_RTE_MBUF_VALID LOG2_VLIB_BUFFER_FLAG_USER(5)
+#define VNET_BUFFER_RTE_MBUF_VALID (1 << LOG2_VNET_BUFFER_RTE_MBUF_VALID)
#define LOG2_BUFFER_HANDOFF_NEXT_VALID LOG2_VLIB_BUFFER_FLAG_USER(6)
#define BUFFER_HANDOFF_NEXT_VALID (1 << LOG2_BUFFER_HANDOFF_NEXT_VALID)
+#define LOG2_VNET_BUFFER_LOCALLY_ORIGINATED LOG2_VLIB_BUFFER_FLAG_USER(7)
+#define VNET_BUFFER_LOCALLY_ORIGINATED (1 << LOG2_VNET_BUFFER_LOCALLY_ORIGINATED)
+
+#define LOG2_VNET_BUFFER_SPAN_CLONE LOG2_VLIB_BUFFER_FLAG_USER(8)
+#define VNET_BUFFER_SPAN_CLONE (1 << LOG2_VNET_BUFFER_SPAN_CLONE)
+
#define foreach_buffer_opaque_union_subtype \
_(ethernet) \
_(ip) \
_(l2_classify) \
_(handoff) \
_(policer) \
-_(output_features) \
+_(ipsec) \
_(map) \
_(map_t) \
_(ip_frag)
u8 code;
u32 data;
} icmp;
+
+ /* IP header offset from vlib_buffer.data - saved by ip*_local nodes */
+ i32 start_of_ip_header;
};
+
} ip;
+ /*
+ * MPLS:
+ * data copied from the MPLS header that was popped from the packet
+ * during the look-up.
+ */
+ struct
+ {
+ u8 ttl;
+ u8 exp;
+ u8 first;
+ } mpls;
+
/* Multicast replication */
struct
{
struct
{
u64 pad;
- u32 opaque_index;
u32 table_index;
+ u32 opaque_index;
u64 hash;
} l2_classify;
/* interface output features */
struct
{
- u32 ipsec_flags;
- u32 ipsec_sad_index;
- u32 unused[3];
- u32 bitmap;
- } output_features;
+ u32 flags;
+ u32 sad_index;
+ } ipsec;
/* vcgn udp inside input, only valid there */
struct
u16 overlay_afi;
} lisp;
+ /* Driver rx feature */
+ struct
+ {
+ u32 saved_next_index; /**< saved by drivers for short-cut */
+ u16 buffer_advance;
+ } device_input_feat;
+
u32 unused[6];
};
} vnet_buffer_opaque_t;
+/*
+ * The opaque field of the vlib_buffer_t is intepreted as a
+ * vnet_buffer_opaque_t. Hence it should be big enough to accommodate one.
+ */
+STATIC_ASSERT (sizeof (vnet_buffer_opaque_t) <= STRUCT_SIZE_OF (vlib_buffer_t,
+ opaque),
+ "VNET buffer meta-data too large for vlib_buffer");
+
#define vnet_buffer(b) ((vnet_buffer_opaque_t *) (b)->opaque)
/* Full cache line (64 bytes) of additional space */