aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/devices/af_packet/node.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-11-09 11:59:42 +0100
committerDave Barach <openvpp@barachs.net>2016-11-09 14:03:25 +0000
commit51327ac5f9ffbe74eb32f26697c563b92eadc3ce (patch)
tree164fbf4e4448553900a232b13334e3a9ef01b142 /vnet/vnet/devices/af_packet/node.c
parent66bcab2fff54531a126ddabe3b377df3fc536731 (diff)
devices: create dummy device-input node to keep nexts in sync
device-input feature arc requires that all input-nodes have nexts in sync. packet-generator tends to call vlib_node_add_next when new stream is created and that puts nexts out of sync. With this change all input node are siblings of device-input node so call to vlib_node_add_next(...) will install same next to the whole family. Change-Id: I33d79492e5f30f348af19e527f36fe0222c524d7 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet/vnet/devices/af_packet/node.c')
-rw-r--r--vnet/vnet/devices/af_packet/node.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vnet/vnet/devices/af_packet/node.c b/vnet/vnet/devices/af_packet/node.c
index 29fdc7142e8..083c5581c2d 100644
--- a/vnet/vnet/devices/af_packet/node.c
+++ b/vnet/vnet/devices/af_packet/node.c
@@ -283,14 +283,12 @@ af_packet_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
VLIB_REGISTER_NODE (af_packet_input_node) = {
.function = af_packet_input_fn,
.name = "af-packet-input",
+ .sibling_of = "device-input",
.format_trace = format_af_packet_input_trace,
.type = VLIB_NODE_TYPE_INPUT,
.state = VLIB_NODE_STATE_INTERRUPT,
.n_errors = AF_PACKET_INPUT_N_ERROR,
.error_strings = af_packet_input_error_strings,
-
- .n_next_nodes = VNET_DEVICE_INPUT_N_NEXT_NODES,
- .next_nodes = VNET_DEVICE_INPUT_NEXT_NODES,
};
VLIB_NODE_FUNCTION_MULTIARCH (af_packet_input_node, af_packet_input_fn)