diff options
author | Damjan Marion <damarion@cisco.com> | 2021-03-09 16:28:15 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2021-03-10 10:45:00 +0100 |
commit | f91098e49cd9ea65cfecabf3832cbb88316c4429 (patch) | |
tree | a2f46aa082774e247486f5d8e950a58fb45f01fe /src/vnet/interface.c | |
parent | 4e4864112af5af148e929c2934ecf3d6b8a00946 (diff) |
interface: fix interface-output and interface-tx multiarch selection
Type: fix
Change-Id: I77723dcbf753c2a7f1ec00f034d8ab604f12214b
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/interface.c')
-rw-r--r-- | src/vnet/interface.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/vnet/interface.c b/src/vnet/interface.c index 862f57404aa..638dc498fb5 100644 --- a/src/vnet/interface.c +++ b/src/vnet/interface.c @@ -810,7 +810,8 @@ vnet_register_interface (vnet_main_t * vnm, vnet_config_main_t *cm; u32 hw_index, i; char *tx_node_name = NULL, *output_node_name = NULL; - vlib_node_function_t *output_node = vnet_interface_output_node_get (); + vlib_node_t *if_out_node = + vlib_get_node (vm, vnet_interface_output_node.index); pool_get (im->hw_interfaces, hw); clib_memset (hw, 0, sizeof (*hw)); @@ -896,8 +897,10 @@ vnet_register_interface (vnet_main_t * vnm, /* The new class may differ from the old one. * Functions have to be updated. */ node = vlib_get_node (vm, hw->output_node_index); - node->function = output_node; node->format_trace = format_vnet_interface_output_trace; + node->node_fn_registrations = if_out_node->node_fn_registrations; + node->function = if_out_node->function; + /* *INDENT-OFF* */ foreach_vlib_main ({ nrt = vlib_node_get_runtime (this_vlib_main, hw->output_node_index); @@ -940,7 +943,13 @@ vnet_register_interface (vnet_main_t * vnm, r.flags = VLIB_NODE_FLAG_IS_OUTPUT; r.name = tx_node_name; - r.function = dev_class->tx_function; + if (dev_class->tx_fn_registrations) + { + r.function = 0; + r.node_fn_registrations = dev_class->tx_fn_registrations; + } + else + r.function = dev_class->tx_function; hw->tx_node_index = vlib_register_node (vm, &r); @@ -950,8 +959,14 @@ vnet_register_interface (vnet_main_t * vnm, r.flags = 0; r.name = output_node_name; - r.function = output_node; r.format_trace = format_vnet_interface_output_trace; + if (if_out_node->node_fn_registrations) + { + r.function = 0; + r.node_fn_registrations = if_out_node->node_fn_registrations; + } + else + r.function = if_out_node->function; { static char *e[] = { |