summaryrefslogtreecommitdiffstats
path: root/src/vnet/sr
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/sr
parenteea28d78a3173341727aafee4c414bcb01001339 (diff)
vlib: add buffer and thread callbacks
Change-Id: I8e2e8f94a884ab2f9909d0c83ba00edd38cdab77 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/sr')
-rw-r--r--src/vnet/sr/sr_replicate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/sr/sr_replicate.c b/src/vnet/sr/sr_replicate.c
index 5f9de5042af..fa5a68c31c2 100644
--- a/src/vnet/sr/sr_replicate.c
+++ b/src/vnet/sr/sr_replicate.c
@@ -30,6 +30,7 @@
#include <vnet/pg/pg.h>
#include <vnet/sr/sr.h>
#include <vnet/devices/dpdk/dpdk.h>
+#include <vnet/devices/dpdk/dpdk_priv.h>
#include <vnet/ip/ip.h>
#include <vnet/fib/ip6_fib.h>
@@ -142,6 +143,7 @@ static uword
sr_replicate_node_fn (vlib_main_t * vm,
vlib_node_runtime_t * node, vlib_frame_t * frame)
{
+ dpdk_main_t *dm = &dpdk_main;
u32 n_left_from, *from, *to_next;
sr_replicate_next_t next_index;
int pkts_replicated = 0;
@@ -149,7 +151,6 @@ sr_replicate_node_fn (vlib_main_t * vm,
int no_buffer_drops = 0;
vlib_buffer_free_list_t *fl;
unsigned socket_id = rte_socket_id ();
- vlib_buffer_main_t *bm = vm->buffer_main;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@ -246,13 +247,13 @@ sr_replicate_node_fn (vlib_main_t * vm,
vlib_buffer_t *clone0_c, *clone_b0;
t0 = vec_elt_at_index (sm->tunnels, pol0->tunnel_indices[i]);
- hdr_mb0 = rte_pktmbuf_alloc (bm->pktmbuf_pools[socket_id]);
+ hdr_mb0 = rte_pktmbuf_alloc (dm->pktmbuf_pools[socket_id]);
if (i < (num_replicas - 1))
{
/* Not the last tunnel to process */
clone0 = rte_pktmbuf_clone
- (orig_mb0, bm->pktmbuf_pools[socket_id]);
+ (orig_mb0, dm->pktmbuf_pools[socket_id]);
if (clone0 == 0)
goto clone_fail;
nb_seg = 0;