Change ARP and IP6-ND nodes to use interface-output node for output
authorJohn Lo <[email protected]>
Tue, 12 Apr 2016 22:20:39 +0000 (18:20 -0400)
committerGerrit Code Review <[email protected]>
Thu, 14 Apr 2016 23:06:54 +0000 (23:06 +0000)
commitd1f5d047988655a001655357f1ce35152161bedf
treed2a3f442190a352e8ed8cbfab7fefbf58e994133
parente10e372e5a7a1be385e77a8062a2573eb58b29d8
Change ARP and IP6-ND nodes to use interface-output node for output

The current mechanism for setting up arp-input and ip6-discover-neighbor
output nodes for interfaces using their interface link up/down callback
function is inefficient and has potential timing issue, as observed for
bonded interface. Now both nodes will setup output interface sw_if_index
in the the sw_if_index[VLIB_TX] field of current packet buffer and then
use the interface-ouput node to tx the packet.

One side effect is that vlib_node_add_next_with_slot() needs to be
modified to allow the same output node-id to be put at the specified
slot, even if another slot contain that same node-id already exist. This
requirement is caused by BVI support where all loopback interfaces set
up as BVIs will have the same output node-id being l2-input while, for
output-interface node, the output slot must match the hw_if_index of the
interface.

Change-Id: I18bd1d4fe9bea047018796f7b8a4d4c20ee31d6e
Signed-off-by: John Lo <[email protected]>
vlib/vlib/node.c
vnet/vnet/ethernet/arp.c
vnet/vnet/interface_output.c
vnet/vnet/ip/ip6.h
vnet/vnet/ip/ip6_forward.c
vnet/vnet/l2/l2_input.c