aboutsummaryrefslogtreecommitdiffstats
path: root/vlib/vlib/buffer_node.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-07-06 10:29:27 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2016-07-07 09:33:41 +0000
commit9770e20a9eded6f593dc71646ffa9f34940d794c (patch)
treee4439b307e2d602859bba284690708b931e6248c /vlib/vlib/buffer_node.h
parent1b1ee4f2e550d2cf98e5e5f718ad5543389c8c37 (diff)
Add some doxygen tags
Also add an index of node names Change-Id: Id65c2e607976d8bad73deb738035a471be077196 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Chris Luke <chrisy@flirble.org>
Diffstat (limited to 'vlib/vlib/buffer_node.h')
-rw-r--r--vlib/vlib/buffer_node.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/vlib/vlib/buffer_node.h b/vlib/vlib/buffer_node.h
index 0fa5c8093ca..5985ccf500d 100644
--- a/vlib/vlib/buffer_node.h
+++ b/vlib/vlib/buffer_node.h
@@ -40,6 +40,33 @@
#ifndef included_vlib_buffer_node_h
#define included_vlib_buffer_node_h
+/** \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,
+ <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
+ nothing at all.
+
+ @param vm vlib_main_t pointer, varies by thread
+ @param node current node vlib_node_runtime_t pointer
+ @param next_index speculated next index used for both packets
+ @param to_next speculated vector pointer used for both packets
+ @param n_left_to_next number of slots left in speculated vector
+ @param bi0 first buffer index
+ @param bi1 second buffer index
+ @param next0 actual next index to be used for the first packet
+ @param next1 actual next index to be used for the second packet
+
+ @return @c next_index -- speculative next index to be used for future packets
+ @return @c to_next -- speculative frame to be used for future packets
+ @return @c n_left_to_next -- number of slots left in speculative frame
+*/
+
#define vlib_validate_buffer_enqueue_x2(vm,node,next_index,to_next,n_left_to_next,bi0,bi1,next0,next1) \
do { \
int enqueue_code = (next0 != next_index) + 2*(next1 != next_index); \
@@ -80,6 +107,26 @@ do { \
} \
} while (0)
+/** \brief Finish enqueueing one buffer forward in the graph.
+ Standard single loop boilerplate element. This is a MACRO,
+ with MULTIPLE SIDE EFFECTS. In the ideal case,
+ <code>next_index == next0</code>,
+ which means that the speculative enqueue at the top of the single loop
+ has correctly dealt with the packet in hand. In that case, the macro does
+ nothing at all.
+
+ @param vm vlib_main_t pointer, varies by thread
+ @param node current node vlib_node_runtime_t pointer
+ @param next_index speculated next index used for both packets
+ @param to_next speculated vector pointer used for both packets
+ @param n_left_to_next number of slots left in speculated vector
+ @param bi0 first buffer index
+ @param next0 actual next index to be used for the first packet
+
+ @return @c next_index -- speculative next index to be used for future packets
+ @return @c to_next -- speculative frame to be used for future packets
+ @return @c n_left_to_next -- number of slots left in speculative frame
+*/
#define vlib_validate_buffer_enqueue_x1(vm,node,next_index,to_next,n_left_to_next,bi0,next0) \
do { \
if (PREDICT_FALSE (next0 != next_index)) \