aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/span/node.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vnet/span/node.c b/src/vnet/span/node.c
index 67f1d6e42bb..f4be2e92895 100644
--- a/src/vnet/span/node.c
+++ b/src/vnet/span/node.c
@@ -35,7 +35,7 @@ format_span_trace (u8 * s, va_list * args)
CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
span_trace_t *t = va_arg (*args, span_trace_t *);
- vnet_main_t *vnm = &vnet_main;
+ vnet_main_t *vnm = vnet_get_main ();
s = format (s, "SPAN: mirrored %U -> %U",
format_vnet_sw_if_index_name, vnm, t->src_sw_if_index,
format_vnet_sw_if_index_name, vnm, t->mirror_sw_if_index);
@@ -67,7 +67,7 @@ span_mirror (vlib_main_t * vm, vlib_node_runtime_t * node, u32 sw_if_index0,
{
vlib_buffer_t *c0;
span_main_t *sm = &span_main;
- vnet_main_t *vnm = &vnet_main;
+ vnet_main_t *vnm = vnet_get_main ();
u32 *to_mirror_next = 0;
u32 i;
span_interface_t *si0;
@@ -92,8 +92,7 @@ span_mirror (vlib_main_t * vm, vlib_node_runtime_t * node, u32 sw_if_index0,
if (mirror_frames[i] == 0)
{
if (sf == SPAN_FEAT_L2)
- mirror_frames[i] = vlib_get_frame_to_node (vnm->vlib_main,
- l2output_node.index);
+ mirror_frames[i] = vlib_get_frame_to_node (vm, l2output_node.index);
else
mirror_frames[i] = vnet_get_frame_to_sw_interface (vnm, i);
}
@@ -134,7 +133,7 @@ span_node_inline_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
span_feat_t sf)
{
span_main_t *sm = &span_main;
- vnet_main_t *vnm = &vnet_main;
+ vnet_main_t *vnm = vnet_get_main ();
u32 n_left_from, *from, *to_next;
u32 n_span_packets = 0;
u32 next_index;
@@ -262,7 +261,7 @@ span_node_inline_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
continue;
if (sf == SPAN_FEAT_L2)
- vlib_put_frame_to_node (vnm->vlib_main, l2output_node.index, f);
+ vlib_put_frame_to_node (vm, l2output_node.index, f);
else
vnet_put_frame_to_sw_interface (vnm, sw_if_index, f);
mirror_frames[sw_if_index] = 0;