20 #include <sys/ioctl.h> 40 u8 qid = thread_index;
43 u16 n_desc = frame->
n_vectors, n_left = n_desc, n_sent = n_desc, n_done;
44 struct pp2_ppio_desc *d;
52 MRVL_PP2_TX_ERROR_PPIO_GET_NUM_OUTQ_DONE, 1);
72 pp2_ppio_outq_desc_reset (d);
73 pp2_ppio_outq_desc_set_phys_addr (d, paddr + b0->
current_data);
74 pp2_ppio_outq_desc_set_pkt_offset (d, 0);
81 if (pp2_ppio_send (ppif->ppio, ptd->
hif, qid, ptd->
descs, &n_sent))
107 (n_sent - n_copy) * sizeof (
u32));
109 outq->
head += n_sent;
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
u8 runtime_data[0]
Function dependent node-runtime data.
struct pp2_ppio_desc * descs
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
mrvl_pp2_main_t mrvl_pp2_main
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
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 vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#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.
u32 node_index
Node index.
static_always_inline uword vlib_get_thread_index(void)
#define clib_memcpy(a, b, c)
static void * vlib_frame_args(vlib_frame_t *f)
Get pointer to frame scalar data.
uword mrvl_pp2_interface_tx(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
mrvl_pp2_if_t * interfaces
mrvl_pp2_per_thread_data_t * per_thread_data
#define CLIB_CACHE_LINE_BYTES
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.