X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fsvm%2Fsvm_fifo.h;h=0d859513853814af5155c2a48c719fa919c79605;hb=371ca50a74a9c4f1b74c4c1b65c6fdec610fcfc3;hp=a83cd858f833d5cd867281c88937431565588b93;hpb=3eb5062b40feb3002de09a3caff86232d6e1adea;p=vpp.git diff --git a/src/svm/svm_fifo.h b/src/svm/svm_fifo.h index a83cd858f83..0d859513853 100644 --- a/src/svm/svm_fifo.h +++ b/src/svm/svm_fifo.h @@ -75,6 +75,8 @@ typedef struct _svm_fifo #if SVM_FIFO_TRACE svm_fifo_trace_elem_t *trace; #endif + u32 freelist_index; /**< aka log2(allocated_size) - const. */ + i8 refcnt; /**< reference count */ CLIB_CACHE_LINE_ALIGN_MARK (data); } svm_fifo_t; @@ -138,7 +140,7 @@ svm_fifo_t *svm_fifo_create (u32 data_size_in_bytes); void svm_fifo_free (svm_fifo_t * f); int svm_fifo_enqueue_nowait (svm_fifo_t * f, u32 max_bytes, - u8 * copy_from_here); + const u8 * copy_from_here); int svm_fifo_enqueue_with_offset (svm_fifo_t * f, u32 offset, u32 required_bytes, u8 * copy_from_here); int svm_fifo_dequeue_nowait (svm_fifo_t * f, u32 max_bytes, u8 * copy_here);