* Overwrite fifo head with new data
*
* This should be typically used by dgram transport protocols that need
- * to update the dgram header after dequeueing a chunk of data. It assumes
+ * to update the dgram header after dequeuing a chunk of data. It assumes
* that the dgram header is at most spread over two chunks.
*
* @param f fifo
* Dequeue data from fifo
*
* Data is dequeued to consumer provided buffer and head is atomically
- * updated.
+ * updated. This should not be used in combination with ooo lookups. If
+ * ooo peeking of data is needed in combination with dequeuing use @ref
+ * svm_fifo_dequeue_drop.
*
* @param f fifo
* @param len length of data to dequeue
static inline void
svm_fifo_set_size (svm_fifo_t * f, u32 size)
{
+ if (size > (1 << f->fs_hdr->max_log2_chunk_size))
+ return;
+ fsh_virtual_mem_update (f->fs_hdr, f->slice_index, (int) f->size - size);
f->size = size;
}