vcl: use events for epoll/select/read/write
[vpp.git] / src / svm / svm_fifo.c
index 10c3192..018827e 100644 (file)
@@ -179,7 +179,7 @@ format_svm_fifo (u8 * s, va_list * args)
 
   if (verbose > 1)
     s = format
-      (s, " server session %d thread %d client session %d thread %d\n",
+      (s, " vpp session %d thread %d app session %d thread %d\n",
        f->master_session_index, f->master_thread_index,
        f->client_session_index, f->client_thread_index);
 
@@ -828,6 +828,13 @@ svm_fifo_dequeue_drop (svm_fifo_t * f, u32 max_bytes)
   return total_drop_bytes;
 }
 
+void
+svm_fifo_dequeue_drop_all (svm_fifo_t * f)
+{
+  f->head = f->tail;
+  __sync_fetch_and_sub (&f->cursize, f->cursize);
+}
+
 u32
 svm_fifo_number_ooo_segments (svm_fifo_t * f)
 {