VNET:explicitly pad l2_classify
[vpp.git] / src / vnet / buffer.h
index f08b4fc..9aba34d 100644 (file)
@@ -83,7 +83,8 @@ _(policer)                                      \
 _(ipsec)                                       \
 _(map)                                         \
 _(map_t)                                       \
-_(ip_frag)
+_(ip_frag)                                     \
+_(tcp)
 
 /*
  * vnet stack buffer opaque array overlay structure.
@@ -130,6 +131,9 @@ typedef struct
 
          /* Rewrite length */
          u32 save_rewrite_length;
+
+         /* MFIB RPF ID */
+         u32 rpf_id;
        };
 
        /* ICMP */
@@ -166,12 +170,13 @@ typedef struct
     } swt;
 
     /* l2 bridging path, only valid there */
-    struct
+    struct opaque_l2
     {
       u32 feature_bitmap;
-      u16 bd_index;            // bridge-domain index
-      u8 l2_len;               // ethernet header length
-      u8 shg;                  // split-horizon group
+      u16 bd_index;            /* bridge-domain index */
+      u8 l2_len;               /* ethernet header length */
+      u8 shg;                  /* split-horizon group */
+      u16 l2fib_sn;            /* l2fib bd/int seq_num */
     } l2;
 
     /* l2tpv3 softwire encap, only valid there */
@@ -190,9 +195,12 @@ typedef struct
     /* L2 classify */
     struct
     {
-      u64 pad;
-      u32 table_index;
-      u32 opaque_index;
+      struct opaque_l2 pad;
+      union
+      {
+       u32 table_index;
+       u32 opaque_index;
+      };
       u64 hash;
     } l2_classify;
 
@@ -274,6 +282,9 @@ typedef struct
       u32 seq_number;
       u32 seq_end;
       u32 ack_number;
+      u16 hdr_offset;          /**< offset relative to ip hdr */
+      u16 data_offset;         /**< offset relative to ip hdr */
+      u16 data_len;            /**< data len */
       u8 flags;
     } tcp;
 
@@ -285,8 +296,8 @@ typedef struct
  * 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),
+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)