X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Finterface_stats.c;h=40a22b48e8fd407056c217f487bfc8463f0f21ae;hb=287d5e109;hp=1b07552727c70a8b4fcc65fa4d163815c2d770df;hpb=871dc4287d8c05ff76106dba4f5f8654c24347fe;p=vpp.git diff --git a/src/vnet/interface_stats.c b/src/vnet/interface_stats.c index 1b07552727c..40a22b48e8f 100644 --- a/src/vnet/interface_stats.c +++ b/src/vnet/interface_stats.c @@ -20,6 +20,7 @@ #include #include +#ifndef CLIB_MARCH_VARIANT int vnet_sw_interface_stats_collect_enable_disable (u32 sw_if_index, u8 enable) { @@ -54,6 +55,7 @@ vnet_sw_interface_stats_collect_enable_disable (u32 sw_if_index, u8 enable) return (0); } +#endif /* CLIB_MARCH_VARIANT */ static u8 * format_stats_collect_trace (u8 * s, va_list * args) @@ -121,7 +123,7 @@ stats_collect_inline (vlib_main_t * vm, stats_n_bytes[b0_ctype] += vlib_buffer_length_in_chain (vm, b0); stats_n_packets[b0_ctype] += 1; - vnet_feature_next (sw_if_index, &next0, b0); + vnet_feature_next (&next0, b0); vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, bi0, next0); @@ -154,16 +156,16 @@ stats_collect_inline (vlib_main_t * vm, return frame->n_vectors; } -static uword -stats_collect_rx (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (stats_collect_rx_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { return stats_collect_inline (vm, node, frame, VLIB_RX); } -static uword -stats_collect_tx (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) +VLIB_NODE_FN (stats_collect_tx_node) (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) { return stats_collect_inline (vm, node, frame, VLIB_TX); } @@ -175,7 +177,6 @@ VLIB_REGISTER_NODE (stats_collect_rx_node) = { .type = VLIB_NODE_TYPE_INTERNAL, .n_errors = 0, .n_next_nodes = 0, - .function = stats_collect_rx, .name = "stats-collect-rx", }; @@ -185,13 +186,9 @@ VLIB_REGISTER_NODE (stats_collect_tx_node) = { .type = VLIB_NODE_TYPE_INTERNAL, .n_errors = 0, .n_next_nodes = 0, - .function = stats_collect_tx, .name = "stats-collect-tx", }; -VLIB_NODE_FUNCTION_MULTIARCH (stats_collect_rx_node, stats_collect_rx); -VLIB_NODE_FUNCTION_MULTIARCH (stats_collect_tx_node, stats_collect_tx); - VNET_FEATURE_INIT (stats_collect_rx_node, static) = { .arc_name = "device-input", .node_name = "stats-collect-rx",