summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip4_input.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-08-10 22:39:11 +0200
committerDamjan Marion <dmarion@me.com>2018-08-13 14:33:54 +0000
commit6e36351faf5b69a0bfb8235b3b06f8b2c24e5547 (patch)
tree512c92bda1a48604fbfbc7bbbb1e4b613cdba614 /src/vnet/ip/ip4_input.c
parent3bf6c2bfe59be62169a1245340722481b0b53870 (diff)
Multiarch handling in different constructor macros
This significantly reduces need for ... in multiarch code. Simply constructor macros will jost create static unused entry if CLIB_MARCH_VARIANT is defined and that will be optimized out by compiler. Change-Id: I17d1c4ac0c903adcfadaa4a07de1b854c7ab14ac Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip4_input.c')
-rw-r--r--src/vnet/ip/ip4_input.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vnet/ip/ip4_input.c b/src/vnet/ip/ip4_input.c
index d11d558eb93..1425786a4b1 100644
--- a/src/vnet/ip/ip4_input.c
+++ b/src/vnet/ip/ip4_input.c
@@ -47,7 +47,6 @@ typedef struct
u8 packet_data[64];
} ip4_input_trace_t;
-#ifndef CLIB_MARCH_VARIANT
static u8 *
format_ip4_input_trace (u8 * s, va_list * va)
{
@@ -60,7 +59,6 @@ format_ip4_input_trace (u8 * s, va_list * va)
return s;
}
-#endif
static_always_inline u32
ip4_input_set_next (u32 sw_if_index, vlib_buffer_t * b, int arc_enabled)
@@ -312,6 +310,7 @@ char *ip4_error_strings[] = {
foreach_ip4_error
#undef _
};
+#endif
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip4_input_node) = {
@@ -356,6 +355,7 @@ ip4_init (vlib_main_t * vm)
hdlc_register_input_protocol (vm, HDLC_PROTOCOL_ip4, ip4_input_node.index);
{
+ extern vlib_node_registration_t ip4_input_no_checksum_node;
pg_node_t *pn;
pn = pg_get_node (ip4_input_node.index);
pn->unformat_edit = unformat_pg_ip4_header;
@@ -405,8 +405,6 @@ ip4_main_loop_enter (vlib_main_t * vm)
VLIB_MAIN_LOOP_ENTER_FUNCTION (ip4_main_loop_enter);
-#endif
-
/*
* fd.io coding-style-patch-verification: ON
*