Thanks for the response Dave.
I don't see anything in our proprietary code that would cause this behaviour. I
did a clean checkout of stable/1908 to see if the same behaviour is present
without any of our code changes and I'm able to reproduce the behaviour using
the sample-plugin provided with VPP when I update it's node's feature-arc to
ip4-output as I've done in the example above.
The only node I have added to stable/1908 is the sample node and I've modified
it to just pass packets along:
--------------
VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
u32 n_left_from, *from, *to_next;
sample_next_t next_index;
u32 pkts_swapped = 0;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
next_index = node->cached_next_index;
while (n_left_from > 0)
{
u32 n_left_to_next;
vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
while (n_left_from > 0 && n_left_to_next > 0)
{
u32 bi0;
vlib_buffer_t *b0;
u32 next0 = SAMPLE_NEXT_INTERFACE_OUTPUT;
bi0 = from[0];
to_next[0] = bi0;
from += 1;
to_next += 1;
n_left_from -= 1;
n_left_to_next -= 1;
b0 = vlib_get_buffer (vm, bi0);
ASSERT (b0->current_data == 0);
vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
to_next, n_left_to_next,
bi0, next0);
}
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
vlib_node_increment_counter (vm, sample_node.index,
SAMPLE_ERROR_SWAPPED, pkts_swapped);
return frame->n_vectors;
}
VNET_FEATURE_INIT (sample, static) =
{
.arc_name = "ip4-output",
.node_name = "sample",
.runs_before = 0,
};
vnet_feature_enable_disable ("ip4-output", "sample",
sw_if_index, enable_disable, 0, 0);
-----------------
Is there a more appropriate method of inserting this node in the graph?
ip4-mac-output needs to run before interface-output but after everything else.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17003): https://lists.fd.io/g/vpp-dev/message/17003
Mute This Topic: https://lists.fd.io/mt/75543730/21656
Mute #vpp: https://lists.fd.io/g/fdio+vpp-dev/mutehashtag/vpp
Mute #vnet: https://lists.fd.io/g/fdio+vpp-dev/mutehashtag/vnet
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-