+ if (sm->serialize_nodes)
+ update_serialized_nodes (sm);
+
+ /* Heartbeat, so clients detect we're still here */
+ (*sm->heartbeat_ptr)++;
+}
+
+static clib_error_t *
+statseg_config (vlib_main_t * vm, unformat_input_t * input)
+{
+ stats_main_t *sm = &stats_main;
+ uword ms;
+
+ while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (input, "size %U", unformat_memory_size, &sm->memory_size))
+ ;
+ else if (unformat (input, "serialize-nodes on"))
+ sm->serialize_nodes = 1;
+ else if (unformat (input, "serialize-nodes off"))
+ sm->serialize_nodes = 0;
+ else
+ return clib_error_return (0, "unknown input `%U'",
+ format_unformat_error, input);
+ }
+
+ return 0;