summaryrefslogtreecommitdiffstats
path: root/src/vlibapi
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-06-13 09:26:05 -0400
committerDave Barach <dave@barachs.net>2018-06-13 09:26:41 -0400
commit1ddbc0138b64486b8e51e5e12fcad21fba8b8b68 (patch)
treeaf95c33e6e1681498a49b130119103b60f64db08 /src/vlibapi
parentc7d50970d4ed8a4889b4374e6a1559aef7d3dcc0 (diff)
Stat segment / client: show run" works now
Seems to have minimal-to-zero performance consequences. Data appears accurate: result match the debug CLI output. Checked at low rates, 27 MPPS sprayed across two worker threads. Change-Id: I09ede5150b88a91547feeee448a2854997613004 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlibapi')
-rw-r--r--src/vlibapi/api.h2
-rw-r--r--src/vlibapi/node_serialize.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/vlibapi/api.h b/src/vlibapi/api.h
index 48c3813452e..7238a31f2f3 100644
--- a/src/vlibapi/api.h
+++ b/src/vlibapi/api.h
@@ -117,7 +117,7 @@ void vl_msg_api_add_version (api_main_t * am, const char *string,
/* node_serialize.c prototypes */
u8 *vlib_node_serialize (vlib_main_t * vm, vlib_node_t *** node_dups,
u8 * vector, int include_nexts, int include_stats);
-vlib_node_t **vlib_node_unserialize (u8 * vector);
+vlib_node_t ***vlib_node_unserialize (u8 * vector);
u32 vl_msg_api_get_msg_length (void *msg_arg);
diff --git a/src/vlibapi/node_serialize.c b/src/vlibapi/node_serialize.c
index 575de11b8cc..b50d79e2922 100644
--- a/src/vlibapi/node_serialize.c
+++ b/src/vlibapi/node_serialize.c
@@ -124,6 +124,7 @@ vlib_node_serialize (vlib_main_t * vm, vlib_node_t *** node_dups, u8 * vector,
serialize_likely_small_unsigned_integer (sm, (u64) state_code);
serialize_likely_small_unsigned_integer (sm, n->type);
+ serialize_likely_small_unsigned_integer (sm, n->flags);
if (include_nexts)
{
@@ -152,7 +153,6 @@ vlib_node_serialize (vlib_main_t * vm, vlib_node_t *** node_dups, u8 * vector,
else /* no stats */
serialize_likely_small_unsigned_integer (sm, 0);
}
- vec_free (nodes);
}
return (serialize_close_vector (sm));
}
@@ -197,6 +197,7 @@ vlib_node_unserialize (u8 * vector)
node->state_string = (u8 *) state_strings[state_code];
node->type = unserialize_likely_small_unsigned_integer (sm);
+ node->flags = unserialize_likely_small_unsigned_integer (sm);
nnexts = unserialize_likely_small_unsigned_integer (sm);
if (nnexts > 0)
vec_validate (node->next_nodes, nnexts - 1);