MCPcopy Create free account
hub / github.com/F-Stack/f-stack / gdma_get_wqe_pointer

Function gdma_get_wqe_pointer

dpdk/drivers/net/mana/gdma.c:10–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include "mana.h"
9
10uint8_t *
11gdma_get_wqe_pointer(struct mana_gdma_queue *queue)
12{
13 uint32_t offset_in_bytes =
14 (queue->head * GDMA_WQE_ALIGNMENT_UNIT_SIZE) &
15 (queue->size - 1);
16
17 DP_LOG(DEBUG, "txq sq_head %u sq_size %u offset_in_bytes %u",
18 queue->head, queue->size, offset_in_bytes);
19
20 if (offset_in_bytes + GDMA_WQE_ALIGNMENT_UNIT_SIZE > queue->size)
21 DP_LOG(ERR, "fatal error: offset_in_bytes %u too big",
22 offset_in_bytes);
23
24 return ((uint8_t *)queue->buffer) + offset_in_bytes;
25}
26
27static uint32_t
28write_dma_client_oob(uint8_t *work_queue_buffer_pointer,

Callers 1

gdma_post_work_requestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected