X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fvnet%2Fdhcp%2Fdhcp_client_detect.c;h=68f420d7c7cdc70debddaeddf7d9a3f418b46583;hb=231c4696872cb344f28648949603840136c0795d;hp=1b916cdd356f1a67500d21e6f0bf025407468d2b;hpb=54c6dc450031443663d40b836a8b0bffdcc2bdea;p=vpp.git diff --git a/src/vnet/dhcp/dhcp_client_detect.c b/src/vnet/dhcp/dhcp_client_detect.c index 1b916cdd356..68f420d7c7c 100644 --- a/src/vnet/dhcp/dhcp_client_detect.c +++ b/src/vnet/dhcp/dhcp_client_detect.c @@ -52,9 +52,9 @@ typedef struct dhcp_client_detect_trace_t_ u8 extracted; } dhcp_client_detect_trace_t; -static uword -dhcp_client_detect_node_fn (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (dhcp_client_detect_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { dhcp_client_detect_next_t next_index; u16 dhcp_client_port_network_order; @@ -131,14 +131,10 @@ dhcp_client_detect_node_fn (vlib_main_t * vm, ip2 = vlib_buffer_get_current (b2); ip3 = vlib_buffer_get_current (b2); - vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_TX], - &next0, b0); - vnet_feature_next (vnet_buffer (b1)->sw_if_index[VLIB_TX], - &next1, b1); - vnet_feature_next (vnet_buffer (b2)->sw_if_index[VLIB_TX], - &next2, b2); - vnet_feature_next (vnet_buffer (b3)->sw_if_index[VLIB_TX], - &next3, b3); + vnet_feature_next (&next0, b0); + vnet_feature_next (&next1, b1); + vnet_feature_next (&next2, b2); + vnet_feature_next (&next3, b3); if (ip0->protocol == IP_PROTOCOL_UDP) { @@ -237,8 +233,7 @@ dhcp_client_detect_node_fn (vlib_main_t * vm, * assigned) we are looking for the preverbial needle in the haystack * so assume the packet is not the one we are looking for. */ - vnet_feature_next (vnet_buffer (b0)->sw_if_index[VLIB_TX], - &next0, b0); + vnet_feature_next (&next0, b0); /* * all we are looking for here is DHCP/BOOTP packet-to-client @@ -293,7 +288,6 @@ format_dhcp_client_detect_trace (u8 * s, va_list * args) /* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcp_client_detect_node) = { - .function = dhcp_client_detect_node_fn, .name = "ip4-dhcp-client-detect", .vector_size = sizeof (u32), .format_trace = format_dhcp_client_detect_trace, @@ -312,14 +306,11 @@ VLIB_REGISTER_NODE (dhcp_client_detect_node) = { }, }; -VLIB_NODE_FUNCTION_MULTIARCH (dhcp_client_detect_node, - dhcp_client_detect_node_fn); - VNET_FEATURE_INIT (ip4_dvr_reinject_feat_node, static) = { .arc_name = "ip4-unicast", .node_name = "ip4-dhcp-client-detect", - .runs_before = VNET_FEATURES ("ip4-drop"), + .runs_before = VNET_FEATURES ("ip4-not-enabled"), }; /* *INDENT-ON* */