summaryrefslogtreecommitdiffstats
path: root/src/plugins/gtpu/gtpu_encap.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-02-26 04:53:38 -0800
committerDamjan Marion <dmarion@me.com>2019-03-01 20:27:11 +0000
commit0333121d83287957062cdd03c6ec40e8f21e2b53 (patch)
tree0f4bf1edc14f5e89282f7e72f14ab8b9c13a06c7 /src/plugins/gtpu/gtpu_encap.c
parent84caa17a9d77e2986bb996a46d7c4a8a05fc868d (diff)
gtpu: migrate old MULTIARCH macros to VLIB_NODE_FN
Change-Id: Id6e82910f8d991e355d3f26222eea4ac3ab091b1 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/gtpu/gtpu_encap.c')
-rw-r--r--src/plugins/gtpu/gtpu_encap.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/plugins/gtpu/gtpu_encap.c b/src/plugins/gtpu/gtpu_encap.c
index 5f52d5a1543..d102a35eef9 100644
--- a/src/plugins/gtpu/gtpu_encap.c
+++ b/src/plugins/gtpu/gtpu_encap.c
@@ -48,23 +48,6 @@ typedef enum {
GTPU_ENCAP_N_NEXT,
} gtpu_encap_next_t;
-typedef struct {
- u32 tunnel_index;
- u32 teid;
-} gtpu_encap_trace_t;
-
-u8 * format_gtpu_encap_trace (u8 * s, va_list * args)
-{
- CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
- CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
- gtpu_encap_trace_t * t
- = va_arg (*args, gtpu_encap_trace_t *);
-
- s = format (s, "GTPU encap to gtpu_tunnel%d teid %d",
- t->tunnel_index, t->teid);
- return s;
-}
-
#define foreach_fixed_header4_offset \
_(0) _(1) _(2) _(3)
@@ -662,16 +645,14 @@ gtpu_encap_inline (vlib_main_t * vm,
return from_frame->n_vectors;
}
-static uword
-gtpu4_encap (vlib_main_t * vm,
+VLIB_NODE_FN (gtpu4_encap_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * from_frame)
{
return gtpu_encap_inline (vm, node, from_frame, /* is_ip4 */ 1);
}
-static uword
-gtpu6_encap (vlib_main_t * vm,
+VLIB_NODE_FN (gtpu6_encap_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
vlib_frame_t * from_frame)
{
@@ -679,7 +660,6 @@ gtpu6_encap (vlib_main_t * vm,
}
VLIB_REGISTER_NODE (gtpu4_encap_node) = {
- .function = gtpu4_encap,
.name = "gtpu4-encap",
.vector_size = sizeof (u32),
.format_trace = format_gtpu_encap_trace,
@@ -694,10 +674,7 @@ VLIB_REGISTER_NODE (gtpu4_encap_node) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (gtpu4_encap_node, gtpu4_encap)
-
VLIB_REGISTER_NODE (gtpu6_encap_node) = {
- .function = gtpu6_encap,
.name = "gtpu6-encap",
.vector_size = sizeof (u32),
.format_trace = format_gtpu_encap_trace,
@@ -712,5 +689,3 @@ VLIB_REGISTER_NODE (gtpu6_encap_node) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (gtpu6_encap_node, gtpu6_encap)
-