diff options
author | Dave Barach <dave@barachs.net> | 2016-07-08 08:13:45 -0400 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-07-08 14:18:22 +0000 |
commit | 9b8ffd99fb35d37250cfb7094a0a31515f1bb577 (patch) | |
tree | 604ebcf86671a86b9e3395dda8d9fda50db2fcbc /vlib/vlib/buffer_node.h | |
parent | 0557a91ca727cee963a8179808d2d2108564ec56 (diff) |
fd-io-styleify pass
Change-Id: If2d57a213fc2fec996db26df332910c3d2105f97
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vlib/vlib/buffer_node.h')
-rw-r--r-- | vlib/vlib/buffer_node.h | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/vlib/vlib/buffer_node.h b/vlib/vlib/buffer_node.h index 5985ccf500d..f98a5408b03 100644 --- a/vlib/vlib/buffer_node.h +++ b/vlib/vlib/buffer_node.h @@ -40,13 +40,13 @@ #ifndef included_vlib_buffer_node_h #define included_vlib_buffer_node_h -/** \file +/** \file vlib buffer/node functions */ /** \brief Finish enqueueing two buffers forward in the graph. Standard dual loop boilerplate element. This is a MACRO, - with MULTIPLE SIDE EFFECTS. In the ideal case, + with MULTIPLE SIDE EFFECTS. In the ideal case, <code>next_index == next0 == next1</code>, which means that the speculative enqueue at the top of the dual loop has correctly dealt with both packets. In that case, the macro does @@ -146,20 +146,20 @@ generic_buffer_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame, uword sizeof_trace, - void * opaque1, + void *opaque1, uword opaque2, - void (* two_buffers) (vlib_main_t * vm, - void * opaque1, - uword opaque2, - vlib_buffer_t * b0, vlib_buffer_t * b1, - u32 * next0, u32 * next1), - void (* one_buffer) (vlib_main_t * vm, - void * opaque1, + void (*two_buffers) (vlib_main_t * vm, + void *opaque1, uword opaque2, vlib_buffer_t * b0, - u32 * next0)) + vlib_buffer_t * b1, + u32 * next0, u32 * next1), + void (*one_buffer) (vlib_main_t * vm, + void *opaque1, uword opaque2, + vlib_buffer_t * b0, + u32 * next0)) { - u32 n_left_from, * from, * to_next; + u32 n_left_from, *from, *to_next; u32 next_index; from = vlib_frame_vector_args (frame); @@ -174,18 +174,17 @@ generic_buffer_node_inline (vlib_main_t * vm, { u32 n_left_to_next; - vlib_get_next_frame (vm, node, next_index, - to_next, n_left_to_next); + vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next); while (n_left_from >= 4 && n_left_to_next >= 2) { - vlib_buffer_t * p0, * p1; + vlib_buffer_t *p0, *p1; u32 pi0, next0; u32 pi1, next1; /* Prefetch next iteration. */ { - vlib_buffer_t * p2, * p3; + vlib_buffer_t *p2, *p3; p2 = vlib_get_buffer (vm, from[2]); p3 = vlib_get_buffer (vm, from[3]); @@ -213,10 +212,10 @@ generic_buffer_node_inline (vlib_main_t * vm, to_next, n_left_to_next, pi0, pi1, next0, next1); } - + while (n_left_from > 0 && n_left_to_next > 0) { - vlib_buffer_t * p0; + vlib_buffer_t *p0; u32 pi0, next0; pi0 = from[0]; @@ -242,3 +241,11 @@ generic_buffer_node_inline (vlib_main_t * vm, } #endif /* included_vlib_buffer_node_h */ + +/* + * fd.io coding-style-patch-verification: ON + * + * Local Variables: + * eval: (c-set-style "gnu") + * End: + */ |