svm session: document unsupported fifo deq combinations
Type: fix
- Document that ooo dequeues with ooo lookups cannot be done in
combination with in order dequeues.
- Added assert to capture this scenario and de-initialized rbtrees for
cut-through tx fifo
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic40d020b3f0391fcf022ea3c906b86121744144f
diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c
index 8e3bb0a..fda9481 100644
--- a/src/svm/svm_fifo.c
+++ b/src/svm/svm_fifo.c
@@ -1024,6 +1024,10 @@
svm_fifo_copy_from_chunk (f, f->head_chunk, head, dst, len, &f->head_chunk);
head = head + len;
+ /* In order dequeues are not supported in combination with ooo peeking.
+ * Use svm_fifo_dequeue_drop instead. */
+ ASSERT (rb_tree_n_nodes (&f->ooo_deq_lookup) <= 1);
+
if (f_pos_geq (head, f_chunk_end (f->start_chunk)))
fsh_collect_chunks (f->fs_hdr, f->slice_index,
f_unlink_chunks (f, head, 0));