diff options
author | Damjan Marion <damarion@cisco.com> | 2018-06-14 22:56:34 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-06-15 09:48:36 +0000 |
commit | c22f87b8763c844e09177e30bbb92830cd928812 (patch) | |
tree | d72a7316b8cc953dfe60ad1741513b210b531420 /src/plugins/avf/output.c | |
parent | d9778c2b196ad624dd1bf7beda888e946a01fbcf (diff) |
avf: tx node fixes
- missing RSV bit set in descriptor
- wrong buffer offset
Change-Id: I8b138266652a30a50e4541c6344e4fe3dec4d1ca
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/output.c')
-rw-r--r-- | src/plugins/avf/output.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/avf/output.c b/src/plugins/avf/output.c index ec4d7f6c0a2..d5e71d528ab 100644 --- a/src/plugins/avf/output.c +++ b/src/plugins/avf/output.c @@ -26,6 +26,7 @@ #define AVF_TXQ_DESC_CMD(x) (1 << (x + 4)) #define AVF_TXQ_DESC_CMD_EOP AVF_TXQ_DESC_CMD(0) #define AVF_TXQ_DESC_CMD_RS AVF_TXQ_DESC_CMD(1) +#define AVF_TXQ_DESC_CMD_RSV AVF_TXQ_DESC_CMD(2) static_always_inline u8 avf_tx_desc_get_dtyp (avf_tx_desc_t * d) @@ -50,6 +51,8 @@ CLIB_MULTIARCH_FN (avf_interface_tx) (vlib_main_t * vm, u16 n_left = frame->n_vectors; vlib_buffer_t *b0, *b1, *b2, *b3; u16 mask = txq->size - 1; + u64 bits = (AVF_TXQ_DESC_CMD_EOP | AVF_TXQ_DESC_CMD_RS | + AVF_TXQ_DESC_CMD_RSV); clib_spinlock_lock_if_init (&txq->lock); @@ -111,13 +114,12 @@ CLIB_MULTIARCH_FN (avf_interface_tx) (vlib_main_t * vm, d->qword[0] = vlib_get_buffer_data_physical_address (vm, bi0) + b0->current_data; #else - d0->qword[0] = pointer_to_uword (b0->data); - d1->qword[0] = pointer_to_uword (b1->data); - d2->qword[0] = pointer_to_uword (b2->data); - d3->qword[0] = pointer_to_uword (b3->data); + d0->qword[0] = pointer_to_uword (b0->data) + b0->current_data; + d1->qword[0] = pointer_to_uword (b1->data) + b1->current_data; + d2->qword[0] = pointer_to_uword (b2->data) + b2->current_data; + d3->qword[0] = pointer_to_uword (b3->data) + b3->current_data; #endif - u64 bits = AVF_TXQ_DESC_CMD_EOP | AVF_TXQ_DESC_CMD_RS; d0->qword[1] = ((u64) b0->current_length) << 34 | bits; d1->qword[1] = ((u64) b1->current_length) << 34 | bits; d2->qword[1] = ((u64) b2->current_length) << 34 | bits; @@ -140,11 +142,9 @@ CLIB_MULTIARCH_FN (avf_interface_tx) (vlib_main_t * vm, d->qword[0] = vlib_get_buffer_data_physical_address (vm, bi0) + b0->current_data; #else - d0->qword[0] = pointer_to_uword (b0->data); - + d0->qword[0] = pointer_to_uword (b0->data) + b0->current_data; #endif - d0->qword[1] = ((u64) b0->current_length) << 34; - d0->qword[1] |= AVF_TXQ_DESC_CMD_EOP | AVF_TXQ_DESC_CMD_RS; + d0->qword[1] = (((u64) b0->current_length) << 34) | bits; txq->next = (txq->next + 1) & mask; txq->n_bufs++; |