fib: fix multiple dpo pool expand cases

Add dpo_pool_barrier_sync/release, use them to clean up
thread-unsafe pool expansion cases.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I09299124a25f8d541e3bb4b75375568990e9b911
diff --git a/src/vnet/dpo/lookup_dpo.c b/src/vnet/dpo/lookup_dpo.c
index daa2352..677a19f 100644
--- a/src/vnet/dpo/lookup_dpo.c
+++ b/src/vnet/dpo/lookup_dpo.c
@@ -63,8 +63,12 @@
 lookup_dpo_alloc (void)
 {
     lookup_dpo_t *lkd;
+    vlib_main_t *vm;
+    u8 did_barrier_sync;
 
+    dpo_pool_barrier_sync (vm, lookup_dpo_pool, did_barrier_sync);
     pool_get_aligned(lookup_dpo_pool, lkd, CLIB_CACHE_LINE_BYTES);
+    dpo_pool_barrier_release (vm, did_barrier_sync);
 
     return (lkd);
 }
@@ -1076,7 +1080,7 @@
              */
             if (table_from_interface)
             {
-                fib_index0 = 
+                fib_index0 =
                     mpls_fib_table_get_index_for_sw_if_index(
                         vnet_buffer(b0)->sw_if_index[VLIB_RX]);
             }
@@ -1142,9 +1146,9 @@
             if (PREDICT_FALSE(vnet_buffer2(b0)->loop_counter > MAX_LUKPS_PER_PACKET))
                 next0 = MPLS_LOOKUP_NEXT_DROP;
 
-	    if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED)) 
+	    if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED))
             {
-                lookup_trace_t *tr = vlib_add_trace (vm, node, 
+                lookup_trace_t *tr = vlib_add_trace (vm, node,
                                                      b0, sizeof (*tr));
                 tr->fib_index = fib_index0;
                 tr->lbi = lbi0;