NAT: VPP-1531 api cleanup & update
[vpp.git] / src / vlib / buffer_node.h
index 2163b72..5ded506 100644 (file)
@@ -383,7 +383,7 @@ vlib_buffer_enqueue_to_next (vlib_main_t * vm, vlib_node_runtime_t * node,
 #ifdef CLIB_HAVE_VEC512
       if (n_enqueued >= 32)
        {
-         clib_memcpy_fast (to_next, buffers, 32 * sizeof (u32));
+         vlib_buffer_copy_indices (to_next, buffers, 32);
          nexts += 32;
          to_next += 32;
          buffers += 32;
@@ -397,7 +397,7 @@ vlib_buffer_enqueue_to_next (vlib_main_t * vm, vlib_node_runtime_t * node,
 #ifdef CLIB_HAVE_VEC256
       if (n_enqueued >= 16)
        {
-         clib_memcpy_fast (to_next, buffers, 16 * sizeof (u32));
+         vlib_buffer_copy_indices (to_next, buffers, 16);
          nexts += 16;
          to_next += 16;
          buffers += 16;
@@ -411,7 +411,7 @@ vlib_buffer_enqueue_to_next (vlib_main_t * vm, vlib_node_runtime_t * node,
 #ifdef CLIB_HAVE_VEC128
       if (n_enqueued >= 8)
        {
-         clib_memcpy_fast (to_next, buffers, 8 * sizeof (u32));
+         vlib_buffer_copy_indices (to_next, buffers, 8);
          nexts += 8;
          to_next += 8;
          buffers += 8;
@@ -424,7 +424,7 @@ vlib_buffer_enqueue_to_next (vlib_main_t * vm, vlib_node_runtime_t * node,
 
       if (n_enqueued >= 4)
        {
-         clib_memcpy_fast (to_next, buffers, 4 * sizeof (u32));
+         vlib_buffer_copy_indices (to_next, buffers, 4);
          nexts += 4;
          to_next += 4;
          buffers += 4;
@@ -459,7 +459,7 @@ vlib_buffer_enqueue_to_single_next (vlib_main_t * vm,
 
   if (PREDICT_TRUE (n_left_to_next >= count))
     {
-      clib_memcpy_fast (to_next, buffers, count * sizeof (u32));
+      vlib_buffer_copy_indices (to_next, buffers, count);
       n_left_to_next -= count;
       vlib_put_next_frame (vm, node, next_index, n_left_to_next);
       return;
@@ -467,7 +467,7 @@ vlib_buffer_enqueue_to_single_next (vlib_main_t * vm,
 
   n_enq = n_left_to_next;
 next:
-  clib_memcpy_fast (to_next, buffers, n_enq * sizeof (u32));
+  vlib_buffer_copy_indices (to_next, buffers, n_enq);
   n_left_to_next -= n_enq;
 
   if (PREDICT_FALSE (count > n_enq))
@@ -507,7 +507,6 @@ vlib_buffer_enqueue_to_thread (vlib_main_t * vm, u32 frame_queue_index,
 
       if (next_thread_index != current_thread_index)
        {
-
          if (drop_on_congestion &&
              is_vlib_frame_queue_congested
              (frame_queue_index, next_thread_index, fqm->queue_hi_thresh,
@@ -518,6 +517,7 @@ vlib_buffer_enqueue_to_thread (vlib_main_t * vm, u32 frame_queue_index,
              n_drop++;
              goto next;
            }
+         vlib_mains[next_thread_index]->check_frame_queues = 1;
 
          if (hf)
            hf->n_vectors = VLIB_FRAME_SIZE - n_left_to_next_thread;