#include <vnet/pg/pg.h>
#include <vnet/vxlan-gbp/vxlan_gbp.h>
-vlib_node_registration_t vxlan4_gbp_input_node;
-vlib_node_registration_t vxlan6_gbp_input_node;
-
typedef struct
{
u32 next_index;
return from_frame->n_vectors;
}
-static uword
-vxlan4_gbp_input (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * from_frame)
+VLIB_NODE_FN (vxlan4_gbp_input_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * from_frame)
{
return vxlan_gbp_input (vm, node, from_frame, /* is_ip4 */ 1);
}
-static uword
-vxlan6_gbp_input (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * from_frame)
+VLIB_NODE_FN (vxlan6_gbp_input_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * from_frame)
{
return vxlan_gbp_input (vm, node, from_frame, /* is_ip4 */ 0);
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (vxlan4_gbp_input_node) =
{
- .function = vxlan4_gbp_input,
.name = "vxlan4-gbp-input",
.vector_size = sizeof (u32),
.n_errors = VXLAN_GBP_N_ERROR,
#undef _
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (vxlan4_gbp_input_node, vxlan4_gbp_input)
VLIB_REGISTER_NODE (vxlan6_gbp_input_node) =
{
- .function = vxlan6_gbp_input,
.name = "vxlan6-gbp-input",
.vector_size = sizeof (u32),
.n_errors = VXLAN_GBP_N_ERROR,
},
.format_trace = format_vxlan_gbp_rx_trace,
};
-VLIB_NODE_FUNCTION_MULTIARCH (vxlan6_gbp_input_node, vxlan6_gbp_input)
/* *INDENT-ON* */
typedef enum
IP_VXLAN_GBP_BYPASS_NEXT_DROP,
IP_VXLAN_GBP_BYPASS_NEXT_VXLAN_GBP,
IP_VXLAN_GBP_BYPASS_N_NEXT,
-} ip_vxan_gbp_bypass_next_t;
+} ip_vxlan_gbp_bypass_next_t;
always_inline uword
ip_vxlan_gbp_bypass_inline (vlib_main_t * vm,
return frame->n_vectors;
}
-static uword
-ip4_vxlan_gbp_bypass (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (ip4_vxlan_gbp_bypass_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return ip_vxlan_gbp_bypass_inline (vm, node, frame, /* is_ip4 */ 1);
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip4_vxlan_gbp_bypass_node) =
{
- .function = ip4_vxlan_gbp_bypass,
.name = "ip4-vxlan-gbp-bypass",
.vector_size = sizeof (u32),
.n_next_nodes = IP_VXLAN_GBP_BYPASS_N_NEXT,
.format_buffer = format_ip4_header,
.format_trace = format_ip4_forward_next_trace,
};
-
-VLIB_NODE_FUNCTION_MULTIARCH (ip4_vxlan_gbp_bypass_node, ip4_vxlan_gbp_bypass)
/* *INDENT-ON* */
+#ifndef CLIB_MARCH_VARIANT
/* Dummy init function to get us linked in. */
clib_error_t *
ip4_vxlan_gbp_bypass_init (vlib_main_t * vm)
}
VLIB_INIT_FUNCTION (ip4_vxlan_gbp_bypass_init);
+#endif /* CLIB_MARCH_VARIANT */
-static uword
-ip6_vxlan_gbp_bypass (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (ip6_vxlan_gbp_bypass_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return ip_vxlan_gbp_bypass_inline (vm, node, frame, /* is_ip4 */ 0);
}
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip6_vxlan_gbp_bypass_node) =
{
- .function = ip6_vxlan_gbp_bypass,
.name = "ip6-vxlan-gbp-bypass",
.vector_size = sizeof (u32),
.n_next_nodes = IP_VXLAN_GBP_BYPASS_N_NEXT,
.format_buffer = format_ip6_header,
.format_trace = format_ip6_forward_next_trace,
};
-
-VLIB_NODE_FUNCTION_MULTIARCH (ip6_vxlan_gbp_bypass_node, ip6_vxlan_gbp_bypass)
/* *INDENT-ON* */
+#ifndef CLIB_MARCH_VARIANT
/* Dummy init function to get us linked in. */
clib_error_t *
ip6_vxlan_gbp_bypass_init (vlib_main_t * vm)
}
VLIB_INIT_FUNCTION (ip6_vxlan_gbp_bypass_init);
+#endif /* CLIB_MARCH_VARIANT */
/*
* fd.io coding-style-patch-verification: ON