summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/memory_api.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-01-15 01:08:33 -0800
committerDave Barach <openvpp@barachs.net>2018-01-25 23:53:35 +0000
commitb384b543313b6b47a277c903e9d4fcd4343054fa (patch)
tree1996e3a25eb3a32fe5bbc405d75f38dd041a5a40 /src/vlibmemory/memory_api.h
parent4e578068fc3fe8ba176d211123ddd88962dab315 (diff)
session: add support for memfd segments
- update segment manager and session api to work with both flavors of ssvm segments - added generic ssvm slave/master init and del functions - cleanup/refactor tcp_echo - fixed uses of svm fifo pool as vector Change-Id: Ieee8b163faa407da6e77e657a2322de213a9d2a0 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vlibmemory/memory_api.h')
-rw-r--r--src/vlibmemory/memory_api.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vlibmemory/memory_api.h b/src/vlibmemory/memory_api.h
index 58f47d1313a..4cda04b3d9f 100644
--- a/src/vlibmemory/memory_api.h
+++ b/src/vlibmemory/memory_api.h
@@ -58,6 +58,13 @@ vl_msg_api_handle_from_index_and_epoch (u32 index, u32 epoch)
return handle;
}
+static inline u8
+vl_msg_api_handle_is_valid (u32 handle, u32 restarts)
+{
+ u32 epoch = vl_msg_api_handle_get_epoch (handle);
+ return ((restarts & VL_API_EPOCH_MASK) == epoch);
+}
+
#define VL_MEM_API_LOG_Q_LEN(fmt,qlen) \
if (TRACE_VLIB_MEMORY_QUEUE) \
do { \