aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/output.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-07-11 13:29:17 +0200
committerDamjan Marion <dmarion@me.com>2018-07-11 13:22:36 +0000
commit9a02c54e4f3c53cbaceee4cbb30835113f0641ce (patch)
tree2f52ef058d9c5f071fc29b4ad4ff49cdf64a5694 /src/plugins/avf/output.c
parent151b32249245880fbe4060769b7edc02026fe566 (diff)
avf: descriptor should be volatile
Change-Id: I2cb4cf2167b6e958d2e57b461848a4a189e3fda0 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/output.c')
-rw-r--r--src/plugins/avf/output.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/avf/output.c b/src/plugins/avf/output.c
index d5e71d528ab..2722c99f31c 100644
--- a/src/plugins/avf/output.c
+++ b/src/plugins/avf/output.c
@@ -57,12 +57,12 @@ CLIB_MULTIARCH_FN (avf_interface_tx) (vlib_main_t * vm,
clib_spinlock_lock_if_init (&txq->lock);
/* release cosumed bufs */
- if (txq->n_bufs)
+ if (txq->n_enqueued)
{
u16 first, slot, n_free = 0;
- first = slot = (txq->next - txq->n_bufs) & mask;
+ first = slot = (txq->next - txq->n_enqueued) & mask;
d0 = txq->descs + slot;
- while (n_free < txq->n_bufs && avf_tx_desc_get_dtyp (d0) == 0x0F)
+ while (n_free < txq->n_enqueued && avf_tx_desc_get_dtyp (d0) == 0x0F)
{
n_free++;
slot = (slot + 1) & mask;
@@ -71,7 +71,7 @@ CLIB_MULTIARCH_FN (avf_interface_tx) (vlib_main_t * vm,
if (n_free)
{
- txq->n_bufs -= n_free;;
+ txq->n_enqueued -= n_free;
vlib_buffer_free_from_ring (vm, txq->bufs, first, txq->size,
n_free);
}
@@ -126,7 +126,7 @@ CLIB_MULTIARCH_FN (avf_interface_tx) (vlib_main_t * vm,
d3->qword[1] = ((u64) b3->current_length) << 34 | bits;
txq->next = (txq->next + 4) & mask;
- txq->n_bufs += 4;
+ txq->n_enqueued += 4;
buffers += 4;
n_left -= 4;
}
@@ -147,7 +147,7 @@ CLIB_MULTIARCH_FN (avf_interface_tx) (vlib_main_t * vm,
d0->qword[1] = (((u64) b0->current_length) << 34) | bits;
txq->next = (txq->next + 1) & mask;
- txq->n_bufs++;
+ txq->n_enqueued++;
buffers++;
n_left--;
}