summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/src/libmemif.h
diff options
context:
space:
mode:
Diffstat (limited to 'extras/libmemif/src/libmemif.h')
-rw-r--r--extras/libmemif/src/libmemif.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/extras/libmemif/src/libmemif.h b/extras/libmemif/src/libmemif.h
index b55e81ae0ab..379ccd1e260 100644
--- a/extras/libmemif/src/libmemif.h
+++ b/extras/libmemif/src/libmemif.h
@@ -323,12 +323,10 @@ typedef enum
typedef struct
{
uint16_t desc_index;
- void *ring;
+ void *queue;
uint32_t len;
/** next buffer present (chained buffers) */
#define MEMIF_BUFFER_FLAG_NEXT (1 << 0)
-/** states that buffer is from rx ring */
-#define MEMIF_BUFFER_FLAG_RX (1 << 1)
uint8_t flags;
void *data;
} memif_buffer_t;
@@ -616,7 +614,8 @@ int memif_delete (memif_conn_handle_t * conn);
@param count - number of memif buffers to enqueue
@param count_out - returns number of allocated buffers
- Slave is producer of buffers.
+ Enqueue buffers to specified tx queue. Can only be used by slave.
+ Updates desc_index field for each memif buffer.
If connection handle points to master returns MEMIF_ERR_INVAL_ARG.
\return memif_err_t
@@ -625,6 +624,16 @@ int memif_buffer_enq_tx (memif_conn_handle_t conn, uint16_t qid,
memif_buffer_t * bufs, uint16_t count,
uint16_t * count_out);
+/** \brief Memif buffer enq tx at idx
+ @param conn - memif connection handle
+ @param buf_a - memif buffer
+ @param buf_b - memif buffer
+
+ Swap descriptors for provided buffers and update the buffers
+*/
+int memif_buffer_requeue (memif_conn_handle_t conn, memif_buffer_t *buf_a,
+ memif_buffer_t *buf_b);
+
/** \brief Memif buffer alloc
@param conn - memif connection handle
@param qid - number identifying queue
@@ -639,7 +648,7 @@ int memif_buffer_alloc (memif_conn_handle_t conn, uint16_t qid,
memif_buffer_t * bufs, uint16_t count,
uint16_t * count_out, uint16_t size);
-/** \brief Memif refill ring
+/** \brief Memif refill queue
@param conn - memif connection handle
@param qid - number identifying queue
@param count - number of buffers to be placed on ring