X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fethernet%2Fp2p_ethernet_input.c;h=7e5f7cadc0d76d49762a0c487d3108adfaae0a9e;hb=bdfe5955f;hp=74e3bb883cfc88917a57391cc82e45cc589697e1;hpb=067cd6229a47ea3ba8b59a2a04090e80afb5bd2c;p=vpp.git diff --git a/src/vnet/ethernet/p2p_ethernet_input.c b/src/vnet/ethernet/p2p_ethernet_input.c index 74e3bb883cf..7e5f7cadc0d 100644 --- a/src/vnet/ethernet/p2p_ethernet_input.c +++ b/src/vnet/ethernet/p2p_ethernet_input.c @@ -24,10 +24,10 @@ #include #include -vlib_node_registration_t p2p_ethernet_input_node; +extern vlib_node_registration_t p2p_ethernet_input_node; /* packet trace format function */ -u8 * +static u8 * format_p2p_ethernet_trace (u8 * s, va_list * args) { CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); @@ -59,9 +59,9 @@ static char *p2p_ethernet_error_strings[] = { #undef _ }; -static uword -p2p_ethernet_input_node_fn (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (p2p_ethernet_input_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { u32 thread_index = vm->thread_index; u32 n_trace = vlib_get_trace_count (vm, node); @@ -107,8 +107,8 @@ p2p_ethernet_input_node_fn (vlib_main_t * vm, en1 = vlib_buffer_get_current (b1); sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX]; - vnet_feature_next (sw_if_index0, &next0, b0); - vnet_feature_next (sw_if_index1, &next1, b1); + vnet_feature_next (&next0, b0); + vnet_feature_next (&next1, b1); rx0 = p2p_ethernet_lookup (sw_if_index0, en0->src_address); rx1 = p2p_ethernet_lookup (sw_if_index1, en1->src_address); @@ -186,7 +186,7 @@ p2p_ethernet_input_node_fn (vlib_main_t * vm, en0 = vlib_buffer_get_current (b0); sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX]; - vnet_feature_next (sw_if_index0, &next0, b0); + vnet_feature_next (&next0, b0); rx0 = p2p_ethernet_lookup (sw_if_index0, en0->src_address); if (rx0 != ~0) @@ -233,11 +233,11 @@ p2p_ethernet_input_node_fn (vlib_main_t * vm, /* *INDENT-OFF* */ VLIB_REGISTER_NODE (p2p_ethernet_input_node) = { - .function = p2p_ethernet_input_node_fn, .name = "p2p-ethernet-input", .vector_size = sizeof (u32), .format_trace = format_p2p_ethernet_trace, .type = VLIB_NODE_TYPE_INTERNAL, + .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, .n_errors = ARRAY_LEN(p2p_ethernet_error_strings), .error_strings = p2p_ethernet_error_strings, @@ -251,8 +251,6 @@ VLIB_REGISTER_NODE (p2p_ethernet_input_node) = { }; /* *INDENT-ON* */ -VLIB_NODE_FUNCTION_MULTIARCH (p2p_ethernet_input_node, - p2p_ethernet_input_node_fn) /* * fd.io coding-style-patch-verification: ON *