aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-format6
-rw-r--r--src/vlib/buffer_funcs.c21
2 files changed, 18 insertions, 9 deletions
diff --git a/.clang-format b/.clang-format
index bce671f766c..b925f8c2f03 100644
--- a/.clang-format
+++ b/.clang-format
@@ -20,3 +20,9 @@ ForEachMacros:
- 'vlib_foreach_rx_tx'
- 'foreach_vlib_main'
+StatementMacros:
+ - 'CLIB_MULTIARCH_FN'
+ - 'VLIB_NODE_FN'
+ - 'VNET_DEVICE_CLASS_TX_FN'
+ - '__clib_section'
+ - '__clib_aligned'
diff --git a/src/vlib/buffer_funcs.c b/src/vlib/buffer_funcs.c
index 3be0914a29e..f3023a3ba27 100644
--- a/src/vlib/buffer_funcs.c
+++ b/src/vlib/buffer_funcs.c
@@ -4,9 +4,10 @@
#include <vlib/vlib.h>
-void __clib_section (".vlib_buffer_enqueue_to_next_fn") CLIB_MULTIARCH_FN (
- vlib_buffer_enqueue_to_next_fn) (vlib_main_t *vm, vlib_node_runtime_t *node,
- u32 *buffers, u16 *nexts, uword count)
+void __clib_section (".vlib_buffer_enqueue_to_next_fn")
+CLIB_MULTIARCH_FN (vlib_buffer_enqueue_to_next_fn)
+(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 *nexts,
+ uword count)
{
u32 *to_next, n_left_to_next, max;
u16 next_index;
@@ -123,12 +124,13 @@ void __clib_section (".vlib_buffer_enqueue_to_next_fn") CLIB_MULTIARCH_FN (
}
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
+
CLIB_MARCH_FN_REGISTRATION (vlib_buffer_enqueue_to_next_fn);
void __clib_section (".vlib_buffer_enqueue_to_single_next_fn")
- CLIB_MULTIARCH_FN (vlib_buffer_enqueue_to_single_next_fn) (
- vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 next_index,
- u32 count)
+CLIB_MULTIARCH_FN (vlib_buffer_enqueue_to_single_next_fn)
+(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 next_index,
+ u32 count)
{
u32 *to_next, n_left_to_next, n_enq;
@@ -159,12 +161,13 @@ next:
}
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
+
CLIB_MARCH_FN_REGISTRATION (vlib_buffer_enqueue_to_single_next_fn);
u32 __clib_section (".vlib_buffer_enqueue_to_thread_fn")
- CLIB_MULTIARCH_FN (vlib_buffer_enqueue_to_thread_fn) (
- vlib_main_t *vm, u32 frame_queue_index, u32 *buffer_indices,
- u16 *thread_indices, u32 n_packets, int drop_on_congestion)
+CLIB_MULTIARCH_FN (vlib_buffer_enqueue_to_thread_fn)
+(vlib_main_t *vm, u32 frame_queue_index, u32 *buffer_indices,
+ u16 *thread_indices, u32 n_packets, int drop_on_congestion)
{
vlib_thread_main_t *tm = vlib_get_thread_main ();
vlib_frame_queue_main_t *fqm;