summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-02-02 00:15:27 +0100
committerDamjan Marion <dmarion@me.com>2019-02-02 00:45:09 +0000
commit652d2e139443cea073da9b7bef8ee21e41a14111 (patch)
treedc477b1151b19b636e01bfc207258e0555dc9b2f
parent9bb20b310280a3c9604f9dd24fbb6757d7f9ca65 (diff)
Deprecate old mutliarch code, phase 1
It is causing compilation sloness with gcc-7 so removing it before it was originally planned. So far macros are left in the tree so we can know which nodes to convert to new multiarch code. Change-Id: Idb14622ca61fdce1eba59723b20d98715b7971e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/plugins/ixge/ixge.c4
-rw-r--r--src/vlib/node.h26
-rw-r--r--src/vnet/ethernet/interface.c3
-rw-r--r--src/vnet/interface.c4
-rw-r--r--src/vnet/interface.h28
-rw-r--r--src/vnet/interface_funcs.h2
-rw-r--r--src/vnet/interface_output.c5
-rw-r--r--src/vnet/ip/ip_checksum.c23
-rw-r--r--src/vppinfra/cpu.h8
9 files changed, 14 insertions, 89 deletions
diff --git a/src/plugins/ixge/ixge.c b/src/plugins/ixge/ixge.c
index a3c0c978ab3..8faa9a91ca2 100644
--- a/src/plugins/ixge/ixge.c
+++ b/src/plugins/ixge/ixge.c
@@ -2238,8 +2238,6 @@ VLIB_REGISTER_NODE (ixge_input_node, static) = {
},
};
-VLIB_NODE_FUNCTION_MULTIARCH_CLONE (ixge_input)
-CLIB_MULTIARCH_SELECT_FN (ixge_input)
/* *INDENT-ON* */
static u8 *
@@ -2851,7 +2849,7 @@ ixge_pci_init (vlib_main_t * vm, vlib_pci_dev_handle_t h)
if (vec_len (xm->devices) == 1)
{
- ixge_input_node.function = ixge_input_multiarch_select ();
+ ixge_input_node.function = ixge_input;
}
xd->pci_dev_handle = h;
diff --git a/src/vlib/node.h b/src/vlib/node.h
index 8bb89f44bc7..e5d46d83665 100644
--- a/src/vlib/node.h
+++ b/src/vlib/node.h
@@ -217,31 +217,9 @@ CLIB_MARCH_SFX (node##_multiarch_register) (void) \
} \
uword CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (node##_fn)
-#if CLIB_DEBUG > 0
-#define VLIB_NODE_FUNCTION_CLONE_TEMPLATE(arch, fn)
-#define VLIB_NODE_FUNCTION_MULTIARCH_CLONE(fn)
+
+/* FIXME to be removed */
#define VLIB_NODE_FUNCTION_MULTIARCH(node, fn)
-#else
-#define VLIB_NODE_FUNCTION_CLONE_TEMPLATE(arch, fn, tgt) \
- uword \
- __attribute__ ((flatten)) \
- __attribute__ ((target (tgt))) \
- CLIB_CPU_OPTIMIZED \
- fn ## _ ## arch ( struct vlib_main_t * vm, \
- struct vlib_node_runtime_t * node, \
- struct vlib_frame_t * frame) \
- { return fn (vm, node, frame); }
-
-#define VLIB_NODE_FUNCTION_MULTIARCH_CLONE(fn) \
- foreach_march_variant(VLIB_NODE_FUNCTION_CLONE_TEMPLATE, fn)
-
-#define VLIB_NODE_FUNCTION_MULTIARCH(node, fn) \
- VLIB_NODE_FUNCTION_MULTIARCH_CLONE(fn) \
- CLIB_MULTIARCH_SELECT_FN(fn, static inline) \
- static void __attribute__((__constructor__)) \
- __vlib_node_function_multiarch_select_##node (void) \
- { node.function = fn ## _multiarch_select(); }
-#endif
always_inline vlib_node_registration_t *
vlib_node_next_registered (vlib_node_registration_t * c)
diff --git a/src/vnet/ethernet/interface.c b/src/vnet/ethernet/interface.c
index 408b0eb0dc4..1c13c405a61 100644
--- a/src/vnet/ethernet/interface.c
+++ b/src/vnet/ethernet/interface.c
@@ -659,9 +659,6 @@ VNET_DEVICE_CLASS (ethernet_simulated_device_class) = {
};
/* *INDENT-ON* */
-VLIB_DEVICE_TX_FUNCTION_MULTIARCH (ethernet_simulated_device_class,
- simulated_ethernet_interface_tx);
-
/*
* Maintain a bitmap of allocated loopback instance numbers.
*/
diff --git a/src/vnet/interface.c b/src/vnet/interface.c
index 37f27ea49ea..12204bd5718 100644
--- a/src/vnet/interface.c
+++ b/src/vnet/interface.c
@@ -837,7 +837,7 @@ vnet_register_interface (vnet_main_t * vnm,
/* The new class may differ from the old one.
* Functions have to be updated. */
node = vlib_get_node (vm, hw->output_node_index);
- node->function = vnet_interface_output_node_multiarch_select ();
+ node->function = vnet_interface_output_node;
node->format_trace = format_vnet_interface_output_trace;
/* *INDENT-OFF* */
foreach_vlib_main ({
@@ -887,7 +887,7 @@ vnet_register_interface (vnet_main_t * vnm,
r.flags = 0;
r.name = output_node_name;
- r.function = vnet_interface_output_node_multiarch_select ();
+ r.function = vnet_interface_output_node;
r.format_trace = format_vnet_interface_output_trace;
{
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 2e32a790996..174e5347ad2 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -302,30 +302,8 @@ CLIB_MARCH_SFX (devclass##_tx_fn_multiarch_register) (void) \
} \
uword CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (devclass##_tx_fn)
-#define VLIB_DEVICE_TX_FUNCTION_CLONE_TEMPLATE(arch, fn, tgt) \
- uword \
- __attribute__ ((flatten)) \
- __attribute__ ((target (tgt))) \
- CLIB_CPU_OPTIMIZED \
- fn ## _ ## arch ( vlib_main_t * vm, \
- vlib_node_runtime_t * node, \
- vlib_frame_t * frame) \
- { return fn (vm, node, frame); }
-
-#define VLIB_DEVICE_TX_FUNCTION_MULTIARCH_CLONE(fn) \
- foreach_march_variant(VLIB_DEVICE_TX_FUNCTION_CLONE_TEMPLATE, fn)
-
-#if CLIB_DEBUG > 0
-#define VLIB_MULTIARCH_CLONE_AND_SELECT_FN(fn,...)
+/* FIXME to be removed */
#define VLIB_DEVICE_TX_FUNCTION_MULTIARCH(dev, fn)
-#else
-#define VLIB_DEVICE_TX_FUNCTION_MULTIARCH(dev, fn) \
- VLIB_DEVICE_TX_FUNCTION_MULTIARCH_CLONE(fn) \
- CLIB_MULTIARCH_SELECT_FN(fn, static inline) \
- static void __attribute__((__constructor__)) \
- __vlib_device_tx_function_multiarch_select_##dev (void) \
- { dev.tx_function = fn ## _multiarch_select(); }
-#endif
/**
* Link Type: A description of the protocol of packets on the link.
@@ -872,6 +850,10 @@ void vnet_pcap_drop_trace_filter_add_del (u32 error_index, int is_add);
int vnet_interface_name_renumber (u32 sw_if_index, u32 new_show_dev_instance);
+uword vnet_interface_output_node (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame);
+
#endif /* included_vnet_interface_h */
/*
diff --git a/src/vnet/interface_funcs.h b/src/vnet/interface_funcs.h
index c4c66179bb5..9a674b180b9 100644
--- a/src/vnet/interface_funcs.h
+++ b/src/vnet/interface_funcs.h
@@ -418,8 +418,6 @@ typedef struct
} vnet_interface_output_runtime_t;
/* Interface output function. */
-void *vnet_interface_output_node_multiarch_select (void);
-
word vnet_sw_interface_compare (vnet_main_t * vnm, uword sw_if_index0,
uword sw_if_index1);
word vnet_hw_interface_compare (vnet_main_t * vnm, uword hw_if_index0,
diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c
index e814efa608a..beeb62a2db4 100644
--- a/src/vnet/interface_output.c
+++ b/src/vnet/interface_output.c
@@ -446,7 +446,7 @@ vnet_interface_output_node_inline (vlib_main_t * vm,
return n_buffers;
}
-static uword
+uword
vnet_interface_output_node (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
@@ -463,9 +463,6 @@ vnet_interface_output_node (vlib_main_t * vm, vlib_node_runtime_t * node,
/* do_tx_offloads */ 1);
}
-VLIB_NODE_FUNCTION_MULTIARCH_CLONE (vnet_interface_output_node);
-CLIB_MULTIARCH_SELECT_FN (vnet_interface_output_node);
-
/* Use buffer's sw_if_index[VNET_TX] to choose output interface. */
static uword
vnet_per_buffer_interface_output (vlib_main_t * vm,
diff --git a/src/vnet/ip/ip_checksum.c b/src/vnet/ip/ip_checksum.c
index 36467a2eb01..d586649646d 100644
--- a/src/vnet/ip/ip_checksum.c
+++ b/src/vnet/ip/ip_checksum.c
@@ -120,34 +120,13 @@ do { \
* function which uses the function pointer we set up in
* ip_checksum_init().
*/
-#if CLIB_DEBUG > 0
-#define IP_INCREMENTAL_CHECKSUM_CLONE_TEMPLATE(arch, fn)
-#define IP_INCREMENTAL_CHECKSUM_MULTIARCH_CLONE(fn)
-#else
-#define IP_INCREMENTAL_CHECKSUM_CLONE_TEMPLATE(arch, fn, tgt) \
- uword \
- __attribute__ ((flatten)) \
- __attribute__ ((target (tgt))) \
- CLIB_CPU_OPTIMIZED \
- fn ## _ ## arch (ip_csum_t sum, \
- void *_data, \
- uword n_bytes) \
- { return fn (sum, _data, n_bytes); }
-
-#define IP_INCREMENTAL_CHECKSUM_MULTIARCH_CLONE(fn) \
- foreach_march_variant(IP_INCREMENTAL_CHECKSUM_CLONE_TEMPLATE,fn)
-#endif
-
-IP_INCREMENTAL_CHECKSUM_MULTIARCH_CLONE (_ip_incremental_checksum);
-
-CLIB_MULTIARCH_SELECT_FN (_ip_incremental_checksum, static inline);
ip_csum_t (*vnet_incremental_checksum_fp) (ip_csum_t, void *, uword);
static clib_error_t *
ip_checksum_init (vlib_main_t * vm)
{
- vnet_incremental_checksum_fp = _ip_incremental_checksum_multiarch_select ();
+ vnet_incremental_checksum_fp = _ip_incremental_checksum;
return 0;
}
diff --git a/src/vppinfra/cpu.h b/src/vppinfra/cpu.h
index 7f0d6ad2e34..ee199e2cf32 100644
--- a/src/vppinfra/cpu.h
+++ b/src/vppinfra/cpu.h
@@ -45,12 +45,8 @@
if (clib_cpu_supports_ ## arch()) \
return & fn ## _ ##arch;
-#define CLIB_MULTIARCH_SELECT_FN(fn,...) \
- __VA_ARGS__ void * fn ## _multiarch_select(void) \
-{ \
- foreach_march_variant(CLIB_MULTIARCH_ARCH_CHECK, fn) \
- return & fn; \
-}
+/* FIXME to be removed */
+#define CLIB_MULTIARCH_SELECT_FN(fn,...)
#ifdef CLIB_MARCH_VARIANT
#define __CLIB_MULTIARCH_FN(a,b) a##_##b