summaryrefslogtreecommitdiffstats
path: root/src/svm/ssvm.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-02-28 15:15:56 -0500
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-01 20:25:48 +0000
commit68b0fb0c620c7451ef1a6380c43c39de6614db51 (patch)
treef4188fa09723152f3ebfcebbbe4cacad903e0cf1 /src/svm/ssvm.h
parentf869028740aaebeb0375077d4d84fa07a17fff1a (diff)
VPP-598: tcp stack initial commit
Change-Id: I49e5ce0aae6e4ff634024387ceaf7dbc432a0351 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/svm/ssvm.h')
-rw-r--r--src/svm/ssvm.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/svm/ssvm.h b/src/svm/ssvm.h
index 9e61b9a0827..bccfc164bef 100644
--- a/src/svm/ssvm.h
+++ b/src/svm/ssvm.h
@@ -38,7 +38,10 @@
#include <vppinfra/pool.h>
#include <vppinfra/format.h>
-#define MMAP_PAGESIZE (4<<10)
+#ifndef MMAP_PAGESIZE
+#define MMAP_PAGESIZE (clib_mem_get_page_size())
+#endif
+
#define SSVM_N_OPAQUE 7
typedef struct
@@ -125,12 +128,12 @@ ssvm_pop_heap (void *oldheap)
}
#define foreach_ssvm_api_error \
-_(NO_NAME, "No shared segment name", -10) \
-_(NO_SIZE, "Size not set (master)", -11) \
-_(CREATE_FAILURE, "Create failed", -12) \
-_(SET_SIZE, "Set size failed", -13) \
-_(MMAP, "mmap failed", -14) \
-_(SLAVE_TIMEOUT, "Slave map timeout", -15)
+_(NO_NAME, "No shared segment name", -100) \
+_(NO_SIZE, "Size not set (master)", -101) \
+_(CREATE_FAILURE, "Create failed", -102) \
+_(SET_SIZE, "Set size failed", -103) \
+_(MMAP, "mmap failed", -104) \
+_(SLAVE_TIMEOUT, "Slave map timeout", -105)
typedef enum
{
@@ -143,6 +146,7 @@ typedef enum
int ssvm_master_init (ssvm_private_t * ssvm, u32 master_index);
int ssvm_slave_init (ssvm_private_t * ssvm, int timeout_in_seconds);
+void ssvm_delete (ssvm_private_t * ssvm);
#endif /* __included_ssvm_h__ */