aboutsummaryrefslogtreecommitdiffstats
path: root/vlib
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-11-04 11:00:27 +0100
committerDave Barach <openvpp@barachs.net>2016-11-04 14:59:42 +0000
commit87cd119ca9ff870db10b6fe1127aac8b6fc89633 (patch)
tree7cdd01d5d97bc200e45233326d2dafce083302cc /vlib
parent96e6f958bbac88e04ef6fd04bc0abda22a3b37bc (diff)
feature: store arc index in vlib_buffer
Previos implementation imposed a limit that node can be member of only one feature arc as feature arc index was stored in node runtime. Now start node stores index into vlib_buffer_t and feature nodes are taking it from there. Change-Id: I252841083bc292af7ed36bf1ac652f2b8c16bfb8 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vlib')
-rw-r--r--vlib/vlib/buffer.h12
-rw-r--r--vlib/vlib/node.c1
-rw-r--r--vlib/vlib/node.h3
3 files changed, 8 insertions, 8 deletions
diff --git a/vlib/vlib/buffer.h b/vlib/vlib/buffer.h
index 314ed193107..4ede684aa4b 100644
--- a/vlib/vlib/buffer.h
+++ b/vlib/vlib/buffer.h
@@ -125,10 +125,14 @@ typedef struct
visit enabled feature nodes
*/
- u32 dont_waste_me; /**< Available space in the (precious)
- first 32 octets of buffer metadata
- Before allocating any of it, discussion required!
- */
+ u8 feature_arc_index; /**< Used to identify feature arcs by intermediate
+ feature node
+ */
+
+ u8 dont_waste_me[3]; /**< Available space in the (precious)
+ first 32 octets of buffer metadata
+ Before allocating any of it, discussion required!
+ */
u32 opaque[8]; /**< Opaque data used by sub-graphs for their own purposes.
See .../vnet/vnet/buffer.h
diff --git a/vlib/vlib/node.c b/vlib/vlib/node.c
index 118fabe749d..23f7ea0239e 100644
--- a/vlib/vlib/node.c
+++ b/vlib/vlib/node.c
@@ -424,7 +424,6 @@ register_node (vlib_main_t * vm, vlib_node_registration_t * r)
rt->n_next_nodes = r->n_next_nodes;
rt->next_frame_index = vec_len (nm->next_frames);
- rt->feature_arc_index = ~0;
vec_resize (nm->next_frames, rt->n_next_nodes);
for (i = 0; i < rt->n_next_nodes; i++)
diff --git a/vlib/vlib/node.h b/vlib/vlib/node.h
index 251ee606d20..b624e9d636d 100644
--- a/vlib/vlib/node.h
+++ b/vlib/vlib/node.h
@@ -465,9 +465,6 @@ typedef struct vlib_node_runtime_t
/* CPU this node runs on */
u16 cpu_index;
- /* Index of feature arc in which the node participates */
- u16 feature_arc_index;
-
/* Function dependent node-runtime. */
u8 runtime_data[0];
}