aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibmemory
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-06-01 18:52:25 -0400
committerDave Barach <dave@barachs.net>2018-06-08 11:42:01 -0400
commit048a4e5a000017d0d632ebf02dcc23d9bf9ccf72 (patch)
tree5f00dd3888faae59e316059506d064ba0a17fb5a /src/vlibmemory
parent59ae61ee7587502c0446655ecbe3daa296498f56 (diff)
export counters in a memfd segment
also export per-node error counters directory entries implement object types Change-Id: I8ce8e0a754e1be9de895c44ed9be6533b4ecef0f Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlibmemory')
-rw-r--r--src/vlibmemory/memory_api.c16
-rw-r--r--src/vlibmemory/vlib_api.c6
2 files changed, 16 insertions, 6 deletions
diff --git a/src/vlibmemory/memory_api.c b/src/vlibmemory/memory_api.c
index 205bea57532..4d31b35f132 100644
--- a/src/vlibmemory/memory_api.c
+++ b/src/vlibmemory/memory_api.c
@@ -459,6 +459,22 @@ vl_mem_api_init (const char *region_name)
return 0;
}
+static clib_error_t *
+map_api_segment_init (vlib_main_t * vm)
+{
+ api_main_t *am = &api_main;
+ int rv;
+
+ if ((rv = vl_mem_api_init (am->region_name)) < 0)
+ {
+ return clib_error_return (0, "vl_mem_api_init (%s) failed",
+ am->region_name);
+ }
+ return 0;
+}
+
+VLIB_INIT_FUNCTION (map_api_segment_init);
+
static void
send_memclnt_keepalive (vl_api_registration_t * regp, f64 now)
{
diff --git a/src/vlibmemory/vlib_api.c b/src/vlibmemory/vlib_api.c
index 1067bf3b4ba..eb7655ce1a7 100644
--- a/src/vlibmemory/vlib_api.c
+++ b/src/vlibmemory/vlib_api.c
@@ -287,12 +287,6 @@ vl_api_clnt_process (vlib_main_t * vm, vlib_node_runtime_t * node,
uword *event_data = 0;
f64 now;
- if ((rv = vl_mem_api_init (am->region_name)) < 0)
- {
- clib_warning ("memory_api_init returned %d, quitting...", rv);
- return 0;
- }
-
if ((error = vl_sock_api_init (vm)))
{
clib_error_report (error);