/*
* Historically, the pg maintained its own free lists and
- * device drivers tx paths would return pkts. With the DPDK,
- * that doesn't happen.
+ * device drivers tx paths would return pkts.
*/
- if (DPDK == 0 && !(s->flags & PG_STREAM_FLAGS_DISABLE_BUFFER_RECYCLE))
+ if (vm->buffer_main->extern_buffer_mgmt == 0 &&
+ !(s->flags & PG_STREAM_FLAGS_DISABLE_BUFFER_RECYCLE))
f->buffer_init_function = pg_buffer_init;
f->buffer_init_function_opaque =
(s - pg->streams) | ((bi - s->buffer_indices) << 24);
n_alloc = n_allocated;
/* Reinitialize buffers */
- if (DPDK == 0 || CLIB_DEBUG > 0
+ if (vm->buffer_main->extern_buffer_mgmt == 0 || CLIB_DEBUG > 0
|| (s->flags & PG_STREAM_FLAGS_DISABLE_BUFFER_RECYCLE))
init_buffers_inline
(vm, s,
n_alloc, (bi - s->buffer_indices) * s->buffer_bytes /* data offset */ ,
s->buffer_bytes,
/* set_data */
- DPDK == 1 || (s->flags & PG_STREAM_FLAGS_DISABLE_BUFFER_RECYCLE) != 0);
+ vm->buffer_main->extern_buffer_mgmt != 0
+ || (s->flags & PG_STREAM_FLAGS_DISABLE_BUFFER_RECYCLE) != 0);
if (next_buffers)
pg_set_next_buffer_pointers (pg, s, buffers, next_buffers, n_alloc);