aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
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 /vnet
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 'vnet')
-rw-r--r--vnet/vnet/ip/ip4_forward.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c
index 939835ae..45699b12 100644
--- a/vnet/vnet/ip/ip4_forward.c
+++ b/vnet/vnet/ip/ip4_forward.c
@@ -45,6 +45,10 @@
#include <vnet/srp/srp.h> /* for srp_hw_interface_class */
#include <vnet/api_errno.h> /* for API error numbers */
+/** \file
+ vnet ip4 forwarding
+*/
+
/* This is really, really simple but stupid fib. */
u32
ip4_fib_lookup_with_table (ip4_main_t * im, u32 fib_index,
@@ -1002,6 +1006,38 @@ ip4_lookup_inline (vlib_main_t * vm,
return frame->n_vectors;
}
+/** \brief IPv4 lookup node.
+ @node ip4-lookup
+
+ This is the main IPv4 lookup dispatch node.
+
+ @param vm vlib_main_t corresponding to the current thread
+ @param node vlib_node_runtime_t
+ @param frame vlib_frame_t whose contents should be dispatched
+
+ @par Graph mechanics: buffer metadata, next index usage
+
+ @em Uses:
+ - <code>vnet_buffer(b)->sw_if_index[VLIB_RX]</code>
+ - Indicates the @c sw_if_index value of the interface that the
+ packet was received on.
+ - <code>vnet_buffer(b)->sw_if_index[VLIB_TX]</code>
+ - When the value is @c ~0 then the node performs a longest prefix
+ match (LPM) for the packet destination address in the FIB attached
+ to the receive interface.
+ - Otherwise perform LPM for the packet destination address in the
+ indicated FIB. In this case <code>[VLIB_TX]</code> is a FIB index
+ value (0, 1, ...) and not a VRF id.
+
+ @em Sets:
+ - <code>vnet_buffer(b)->ip.adj_index[VLIB_TX]</code>
+ - The lookup result adjacency index.
+
+ <em>Next Index:</em>
+ - Dispatches the packet to the node index found in
+ ip_adjacency_t @c adj->lookup_next_index
+ (where @c adj is the lookup result adjacency).
+*/
static uword
ip4_lookup (vlib_main_t * vm,
vlib_node_runtime_t * node,