26 #define AVF_TXQ_DESC_CMD(x) (1 << (x + 4)) 27 #define AVF_TXQ_DESC_CMD_EOP AVF_TXQ_DESC_CMD(0) 28 #define AVF_TXQ_DESC_CMD_RS AVF_TXQ_DESC_CMD(1) 29 #define AVF_TXQ_DESC_CMD_RSV AVF_TXQ_DESC_CMD(2) 34 return d->
qword[1] & 0x0f;
45 u8 qid = thread_index;
49 u32 bi0, bi1, bi2, bi3;
50 u16 n_left, n_left_to_send, n_in_batch;
60 n_left_to_send = frame->n_vectors;
68 first = slot = (next - txq->
n_enqueued) & mask;
69 d0 = txq->
descs + slot;
73 slot = (slot + 1) & mask;
74 d0 = txq->
descs + slot;
90 u16 slot0, slot1, slot2, slot3;
98 slot1 = (next + 1) & mask;
99 slot2 = (next + 2) & mask;
100 slot3 = (next + 3) & mask;
102 d0 = txq->
descs + slot0;
103 d1 = txq->
descs + slot1;
104 d2 = txq->
descs + slot2;
105 d3 = txq->
descs + slot3;
112 txq->
bufs[slot0] = bi0;
113 txq->
bufs[slot1] = bi1;
114 txq->
bufs[slot2] = bi2;
115 txq->
bufs[slot3] = bi3;
136 next = (next + 4) & mask;
144 d0 = txq->
descs + next;
146 txq->
bufs[next] = bi0;
157 next = (next + 1) & mask;
166 n_left_to_send -= n_in_batch;
175 AVF_TX_ERROR_NO_FREE_SLOTS, n_left_to_send);
180 return frame->n_vectors - n_left;
#define AVF_TXQ_DESC_CMD_RS
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
static_always_inline void clib_spinlock_unlock_if_init(clib_spinlock_t *p)
static u64 vlib_get_buffer_data_physical_address(vlib_main_t *vm, u32 buffer_index)
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
#define static_always_inline
#define vlib_prefetch_buffer_with_index(vm, bi, type)
Prefetch buffer metadata by buffer index The first 64 bytes of buffer contains most header informatio...
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
VNET_DEVICE_CLASS_TX_FN() avf_device_class(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define VNET_DEVICE_CLASS_TX_FN(devclass)
static void vlib_buffer_free_from_ring(vlib_main_t *vm, u32 *ring, u32 start, u32 ring_size, u32 n_buffers)
Free buffers from ring.
static heap_elt_t * first(heap_header_t *h)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u16 current_length
Nbytes between current data and the end of this buffer.
#define AVF_TXQ_DESC_CMD_RSV
static_always_inline u8 avf_tx_desc_get_dtyp(avf_tx_desc_t *d)
#define AVF_TXQ_DESC_CMD_EOP
static void * vlib_frame_args(vlib_frame_t *f)
Get pointer to frame scalar data.
static uword pointer_to_uword(const void *p)
#define CLIB_MEMORY_BARRIER()
static_always_inline void clib_spinlock_lock_if_init(clib_spinlock_t *p)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.