Introduce l{2,3,4}_hdr_offset fields in the buffer metadata

To save space in the first cacheline following is changed:

- total_length_not_including_first_buffer moved to the 2nd cacheline.
This field is used only when VLIB_BUFFER_TOTAL_LENGTH_VALID and
VLIB_BUFFER_NEXT_PRESENT are both set.

- free_list_index is now stored in 4bits inside flags, which
allows up to 16 free lists. In case we need more we can store index
in the 2nd cachelin

Change-Id: Ic8521350819391af470d31d3fa1013e67ecb7681
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vnet/replication.c b/src/vnet/replication.c
index 1c6f28d..0fdca0b 100644
--- a/src/vnet/replication.c
+++ b/src/vnet/replication.c
@@ -43,12 +43,12 @@
   ctx_id = ctx - rm->contexts[thread_index];
 
   /* Save state from vlib buffer */
-  ctx->saved_free_list_index = b0->free_list_index;
+  ctx->saved_free_list_index = vlib_buffer_get_free_list_index (b0);
   ctx->current_data = b0->current_data;
 
   /* Set up vlib buffer hooks */
   b0->recycle_count = ctx_id;
-  b0->free_list_index = rm->recycle_list_index;
+  vlib_buffer_set_free_list_index (b0, rm->recycle_list_index);
   b0->flags |= VLIB_BUFFER_RECYCLE;
 
   /* Save feature state */
@@ -129,7 +129,7 @@
        * This is the last replication in the list.
        * Restore original buffer free functionality.
        */
-      b0->free_list_index = ctx->saved_free_list_index;
+      vlib_buffer_set_free_list_index (b0, ctx->saved_free_list_index);
       b0->flags &= ~VLIB_BUFFER_RECYCLE;
 
       /* Free context back to its pool */