buffers: major cleanup and improvements
[vpp.git] / src / plugins / dpdk / device / device.c
index 86b9a50..e3520fc 100644 (file)
@@ -127,11 +127,9 @@ dpdk_validate_rte_mbuf (vlib_main_t * vm, vlib_buffer_t * b,
       mb->pkt_len = b->current_length;
       mb->data_off = VLIB_BUFFER_PRE_DATA_SIZE + b->current_data;
       first_mb->nb_segs++;
-      if (PREDICT_FALSE (b->n_add_refs))
-       {
-         rte_mbuf_refcnt_update (mb, b->n_add_refs);
-         b->n_add_refs = 0;
-       }
+      if (PREDICT_FALSE (b->ref_count > 1))
+       mb->pool =
+         dpdk_no_cache_mempool_by_buffer_pool_index[b->buffer_pool_index];
     }
 }