summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_stats.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-03-04 03:33:32 -0800
committerDamjan Marion <dmarion@me.com>2019-03-06 11:42:11 +0000
commit6266877b0126045bbd309bf33dcf351db07e37d9 (patch)
treedb4481cbcf0461c8051cc4fc5612b229356d0fdc /src/vnet/interface_stats.c
parent1fc33b3d413d8868b14dbf3368fa4c155fa4e393 (diff)
interface: migrate old MULTIARCH macros to VLIB_NODE_FN
Change-Id: Ib92e338d0becbfbc38e6b9f34f262df76b63eead Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/interface_stats.c')
-rw-r--r--src/vnet/interface_stats.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/vnet/interface_stats.c b/src/vnet/interface_stats.c
index 969f8930350..40a22b48e8f 100644
--- a/src/vnet/interface_stats.c
+++ b/src/vnet/interface_stats.c
@@ -20,6 +20,7 @@
#include <vnet/feature/feature.h>
#include <vnet/ethernet/ethernet.h>
+#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)
@@ -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",