summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/dpdk/device.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-01-04 13:19:27 +0100
committerDave Barach <openvpp@barachs.net>2017-01-14 14:17:03 +0000
commit878c609889dcdc58538d40d8b3f662320f88573d (patch)
treefa241dadbdd1db60b47fe3f077ab3392716690d5 /src/vnet/devices/dpdk/device.c
parenteea28d78a3173341727aafee4c414bcb01001339 (diff)
vlib: add buffer and thread callbacks
Change-Id: I8e2e8f94a884ab2f9909d0c83ba00edd38cdab77 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/dpdk/device.c')
-rw-r--r--src/vnet/devices/dpdk/device.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vnet/devices/dpdk/device.c b/src/vnet/devices/dpdk/device.c
index b22fbf2e69e..0deab6aa2a9 100644
--- a/src/vnet/devices/dpdk/device.c
+++ b/src/vnet/devices/dpdk/device.c
@@ -87,19 +87,18 @@ dpdk_set_mc_filter (vnet_hw_interface_t * hi,
struct rte_mbuf *
dpdk_replicate_packet_mb (vlib_buffer_t * b)
{
- vlib_main_t *vm = vlib_get_main ();
- vlib_buffer_main_t *bm = vm->buffer_main;
+ dpdk_main_t *dm = &dpdk_main;
struct rte_mbuf **mbufs = 0, *s, *d;
u8 nb_segs;
unsigned socket_id = rte_socket_id ();
int i;
- ASSERT (bm->pktmbuf_pools[socket_id]);
+ ASSERT (dm->pktmbuf_pools[socket_id]);
s = rte_mbuf_from_vlib_buffer (b);
nb_segs = s->nb_segs;
vec_validate (mbufs, nb_segs - 1);
- if (rte_pktmbuf_alloc_bulk (bm->pktmbuf_pools[socket_id], mbufs, nb_segs))
+ if (rte_pktmbuf_alloc_bulk (dm->pktmbuf_pools[socket_id], mbufs, nb_segs))
{
vec_free (mbufs);
return 0;