summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ip/ip4_input.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-07-07 10:10:17 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2016-07-07 16:06:42 +0000
commit132d51d4d2f143bd5cd8d50137ff376944d0503a (patch)
tree2921a56157fff3fdf8562f79ccddaaafe660cfa1 /vnet/vnet/ip/ip4_input.c
parent708357415d3b3d6d3c2df264fc1caa04ae0e0dfe (diff)
Document more nodes
Change-Id: Ib8ef0559aa0573bf1229e9c794d48520197f9c8a Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vnet/vnet/ip/ip4_input.c')
-rw-r--r--vnet/vnet/ip/ip4_input.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/vnet/vnet/ip/ip4_input.c b/vnet/vnet/ip/ip4_input.c
index c5281c4eb1d..1c7d327dc18 100644
--- a/vnet/vnet/ip/ip4_input.c
+++ b/vnet/vnet/ip/ip4_input.c
@@ -328,6 +328,41 @@ ip4_input_inline (vlib_main_t * vm,
return frame->n_vectors;
}
+/** \brief IPv4 input node.
+ @node ip4-input
+
+ This is the IPv4 input node: validates ip4 header checksums,
+ verifies ip header lengths, discards pkts with expired TTLs,
+ and sends pkts to the set of ip feature nodes configured on
+ the rx interface.
+
+ @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:
+ - ip_config_main_t cm corresponding to each pkt's dst address unicast /
+ multicast status.
+ - <code>b->current_config_index</code> corresponding to each pkt's
+ rx sw_if_index.
+ - This sets the per-packet graph trajectory, ensuring that
+ each packet visits the per-interface features in order.
+
+ - <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.
+
+ @em Sets:
+ - <code>vnet_buffer(b)->ip.adj_index[VLIB_TX]</code>
+ - The lookup result adjacency index.
+
+ <em>Next Indices:</em>
+ - Dispatches pkts to the (first) feature node:
+ <code> vnet_get_config_data (... &next0 ...); </code>
+ or @c error-drop
+*/
static uword
ip4_input (vlib_main_t * vm,
vlib_node_runtime_t * node,