aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/pg/input.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-02-28 19:22:22 +0100
committerDave Barach <openvpp@barachs.net>2017-03-01 22:06:31 +0000
commitc3a814be9dc769be942ff8029c7b6eccd4b3af05 (patch)
treedd152b3e92281ab52f806ed2ad237c9fb0607e8b /src/vnet/pg/input.c
parentf71ef1dddfc7cf34944c510b85bec074f431bb12 (diff)
dpdk: be a plugin
Change-Id: I238258cdeb77035adc5e88903d824593d0a1da90 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/pg/input.c')
-rw-r--r--src/vnet/pg/input.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vnet/pg/input.c b/src/vnet/pg/input.c
index e15faeb8564..4a65b024f6c 100644
--- a/src/vnet/pg/input.c
+++ b/src/vnet/pg/input.c
@@ -1212,10 +1212,10 @@ pg_stream_fill_helper (pg_main_t * pg,
/*
* 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);
@@ -1238,7 +1238,7 @@ pg_stream_fill_helper (pg_main_t * pg,
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,
@@ -1246,7 +1246,8 @@ pg_stream_fill_helper (pg_main_t * pg,
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);