summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_output.c
diff options
context:
space:
mode:
authorRadu Nicolau <radu.nicolau@intel.com>2020-12-02 11:45:11 +0000
committerRay Kinsella <mdr@ashroe.eu>2021-01-25 10:07:10 +0000
commit5f48784da3ac653b3ff0609469ebf9b99fa34322 (patch)
tree3bfd053ec64b7dc453e13e449d383bafaebbe35f /src/vnet/interface_output.c
parent9479838d080ce89d764668c2234c89b14a1ad2e4 (diff)
vlib: startup multi-arch variant configuration fix for interfaces
Propagate the multi-arch variant selection to interfaces. Type: fix Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Change-Id: I99c4a7896f172f0d14d2ded22a27383825529a7d (cherry picked from commit 5a48b3b9d88fa2793793e2bf3db8bf156fe2951f)
Diffstat (limited to 'src/vnet/interface_output.c')
-rw-r--r--src/vnet/interface_output.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c
index 3363f76b722..e79ad451c55 100644
--- a/src/vnet/interface_output.c
+++ b/src/vnet/interface_output.c
@@ -513,9 +513,35 @@ CLIB_MARCH_FN_REGISTRATION (vnet_interface_output_node);
#ifndef CLIB_MARCH_VARIANT
vlib_node_function_t *
-vnet_interface_output_node_get (void)
+vnet_interface_output_node_get (vlib_main_t * vm)
{
- return CLIB_MARCH_FN_POINTER (vnet_interface_output_node);
+ vlib_node_function_t *fn = 0;
+ vlib_node_fn_registration_t *fnr;
+ char *name = 0;
+ vlib_node_t *node = vlib_get_node_by_name (vm, (u8 *) "interface-output");
+ ASSERT (node);
+
+ /* search for the same name */
+ fnr = node->node_fn_registrations;
+ while (fnr)
+ {
+ if (fnr->function == node->function)
+ {
+ name = fnr->name;
+ break;
+ }
+ fnr = fnr->next_registration;
+ }
+
+ if (name)
+ {
+ fn = CLIB_MARCH_FN_POINTER_BY_NAME (vnet_interface_output_node, name);
+ }
+ if (!fn) /* revert to march type selection if search failed */
+ {
+ fn = CLIB_MARCH_FN_POINTER (vnet_interface_output_node);
+ }
+ return fn;
}
#endif /* CLIB_MARCH_VARIANT */