summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'vnet/vnet/buffer.h')
-rw-r--r--vnet/vnet/buffer.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/vnet/vnet/buffer.h b/vnet/vnet/buffer.h
index 2ae4f1ccb70..b3c71c127cc 100644
--- a/vnet/vnet/buffer.h
+++ b/vnet/vnet/buffer.h
@@ -143,6 +143,18 @@ typedef struct
};
} 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
{
@@ -331,6 +343,14 @@ typedef struct
};
} 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 */