summaryrefslogtreecommitdiffstats
path: root/src/svm/svm_fifo_segment.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-04-04 23:08:23 -0700
committerFlorin Coras <fcoras@cisco.com>2017-04-13 18:35:50 -0700
commit6cf30adc2cd3aa818e5d97cf71ea8b2fc2aaefa7 (patch)
tree3c4afef26295500b243f3655d96071565c2d2464 /src/svm/svm_fifo_segment.h
parent0f7d2ff58a63fdc671c1c0954ffe7c6ff0501daa (diff)
Session layer refactoring
Major refactoring of the session layer api - Add attatch api for application binding to the the session layer - Simplify listen/connect calls - Update application CLI - Add transport endpoint to accept callback - Associate segment manager to application and allow for multiple binds/connects per app Additional: - svm fifo cleanup - add fifo free, format fns - add fifo offset enqueue unit test Change-Id: Id93a65047de61afc2bf3d58c9b544339c02065af Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/svm/svm_fifo_segment.h')
-rw-r--r--src/svm/svm_fifo_segment.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/svm/svm_fifo_segment.h b/src/svm/svm_fifo_segment.h
index ecb5653aa74..9ab47a4c161 100644
--- a/src/svm/svm_fifo_segment.h
+++ b/src/svm/svm_fifo_segment.h
@@ -55,6 +55,18 @@ svm_fifo_get_segment (u32 segment_index)
return vec_elt_at_index (ssm->segments, segment_index);
}
+static inline u8
+svm_fifo_segment_has_fifos (svm_fifo_segment_private_t * fifo_segment)
+{
+ return vec_len ((svm_fifo_t **) fifo_segment->h->fifos) != 0;
+}
+
+static inline svm_fifo_t **
+svm_fifo_segment_get_fifos (svm_fifo_segment_private_t * fifo_segment)
+{
+ return (svm_fifo_t **) fifo_segment->h->fifos;
+}
+
#define foreach_ssvm_fifo_segment_api_error \
_(OUT_OF_SPACE, "Out of space in segment", -200)
@@ -73,9 +85,7 @@ svm_fifo_t *svm_fifo_segment_alloc_fifo (svm_fifo_segment_private_t * s,
u32 data_size_in_bytes);
void svm_fifo_segment_free_fifo (svm_fifo_segment_private_t * s,
svm_fifo_t * f);
-
void svm_fifo_segment_init (u64 baseva, u32 timeout_in_seconds);
-
u32 svm_fifo_segment_index (svm_fifo_segment_private_t * s);
#endif /* __included_ssvm_fifo_segment_h__ */