summaryrefslogtreecommitdiffstats
path: root/src/svm/svm_fifo.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-07-22 12:59:30 -0700
committerDave Barach <openvpp@barachs.net>2018-07-23 20:23:58 +0000
commit8409955e4b27f9797d9e7bb1ef7064d04ff03f71 (patch)
tree7a921c69e0ac9e7aab42723e009173946c3b074c /src/svm/svm_fifo.h
parent6b9b41c832332e9e9876edad51917230e4e9a4af (diff)
session: send rx events only if session ready
Change-Id: I8d631121b104fb40c20701d4c1b428f2b71e5785 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/svm/svm_fifo.h')
-rw-r--r--src/svm/svm_fifo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/svm/svm_fifo.h b/src/svm/svm_fifo.h
index 40182901db5..40242614829 100644
--- a/src/svm/svm_fifo.h
+++ b/src/svm/svm_fifo.h
@@ -113,6 +113,12 @@ svm_fifo_is_full (svm_fifo_t * f)
return (f->cursize == f->nitems);
}
+static inline int
+svm_fifo_is_empty (svm_fifo_t * f)
+{
+ return (f->cursize == 0);
+}
+
static inline u32
svm_fifo_max_enqueue (svm_fifo_t * f)
{