61 vmxnet3_tx_comp *tx_comp;
106 vmxnet3_tx_desc *txd = 0;
107 u32 desc_idx, generation, first_idx;
109 u16 n_left = frame->n_vectors;
112 u16 qid = thread_index, produce;
130 u16 space_needed = 1,
i;
138 while (b->
flags & VLIB_BUFFER_NEXT_PRESENT)
154 VMXNET3_TX_ERROR_NO_FREE_SLOTS, 1);
171 for (
i = 0;
i < space_needed;
i++)
193 asm volatile (
"":::
"memory");
210 return (frame->n_vectors - n_left);
static_always_inline void vmxnet3_tx_ring_advance_consume(vmxnet3_txq_t *txq)
static uword vlib_buffer_get_current_pa(vlib_main_t *vm, vlib_buffer_t *b)
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
#define VMXNET3_REG_TXPROD
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)
vmxnet3_main_t vmxnet3_main
VNET_DEVICE_CLASS_TX_FN() vmxnet3_device_class(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define static_always_inline
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define VNET_DEVICE_CLASS_TX_FN(devclass)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define VMXNET3_TXC_INDEX
u16 current_length
Nbytes between current data and the end of this buffer.
static_always_inline u16 vmxnet3_tx_ring_space_left(vmxnet3_txq_t *txq)
static_always_inline void vmxnet3_tx_ring_advance_produce(vmxnet3_txq_t *txq)
vmxnet3_tx_comp_ring tx_comp_ring
vmxnet3_tx_comp * tx_comp
static_always_inline void vmxnet3_txq_release(vlib_main_t *vm, vmxnet3_device_t *vd, vmxnet3_txq_t *txq)
u32 next_buffer
Next buffer for this linked-list of buffers.
static_always_inline void vmxnet3_tx_comp_ring_advance_next(vmxnet3_txq_t *txq)
#define VLIB_BUFFER_TRACE_TRAJECTORY_INIT(b)
vmxnet3_tx_desc * tx_desc
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
vmxnet3_device_t * devices
static void vlib_buffer_free_one(vlib_main_t *vm, u32 buffer_index)
Free one buffer Shorthand to free a single buffer chain.
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
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.
static_always_inline void vmxnet3_reg_write_inline(vmxnet3_device_t *vd, u8 bar, u32 addr, u32 val)