Thread safe internal buffer manager, take two

First attempt to make internal buffer manager thread safe was not
succesfull, so trying again. This time with more testing.

Change-Id: I01b8385a9c26d233934a3339255ea4bd31c865ac
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vlib/buffer.h b/src/vlib/buffer.h
index 9047ca9..5504bf7 100644
--- a/src/vlib/buffer.h
+++ b/src/vlib/buffer.h
@@ -350,6 +350,12 @@
   /* Vector of free buffers.  Each element is a byte offset into I/O heap. */
   u32 *buffers;
 
+  /* global vector of free buffers, used only on main thread.
+     Bufers are returned to global buffers only in case when number of
+     buffers on free buffers list grows about threshold */
+  u32 *global_buffers;
+  clib_spinlock_t global_buffers_lock;
+
   /* Memory chunks allocated for this free list
      recorded here so they can be freed when free list
      is deleted. */