-------
Declare the node dispatch function as shown, using the VLIB\_NODE\_FN macro. The
-name of the node function **MUST** match the name of the graph node.
+name of the node function **MUST** match the name of the graph node.
-::
+::
VLIB_NODE_FN (ip4_sdp_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * frame)
else
return ip46_sdp_inline (vm, node, frame, 1 /* is_ip4 */ ,
0 /* is_trace */ );
- }
+ }
We need to generate *precisely one copy* of the
vlib_node_registration_t, error strings, and packet trace decode function.
::
always_inline uword
- ip46_sdp_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
+ ip46_sdp_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * frame,
int is_ip4, int is_trace)
{ ... }
Otherwise, the compiler is highly likely NOT to build multiple
-versions of the guts of your dispatch function.
+versions of the guts of your dispatch function.
It's fairly easy to spot this mistake in "perf top." If you see, for
example, a bunch of functions with names of the form
add_vpp_plugin(myplugin
SOURCES
new_multiarch_node.c
- ...
+ ...
MULTIARCH_SOURCES
new_ multiarch_node.c