aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-10-26 11:27:13 +0100
committerOle Tr�an <otroan@employees.org>2020-10-26 14:16:59 +0000
commitbcaa44ced6fe456835f3f73d184ab2345e39d367 (patch)
treeb493d09d2494eb87a8424fc86c7e0db9e26f2dbd
parentefe4331450326eb090e9844d3a22d05c5f3750fe (diff)
avf: use atomic store instead of barrier
Type: improvement Change-Id: Ifea5f0c2fecb99fd320a2e1141f4b4f0d6a793ca Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/plugins/avf/input.c3
-rw-r--r--src/plugins/avf/output.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/avf/input.c b/src/plugins/avf/input.c
index 0ccf7721835..9d677ab96d5 100644
--- a/src/plugins/avf/input.c
+++ b/src/plugins/avf/input.c
@@ -125,8 +125,7 @@ avf_rxq_refill (vlib_main_t * vm, vlib_node_runtime_t * node, avf_rxq_t * rxq,
n_alloc -= 8;
}
- CLIB_MEMORY_STORE_BARRIER ();
- *(rxq->qrx_tail) = slot;
+ clib_atomic_store_rel_n (rxq->qrx_tail, slot);
}
diff --git a/src/plugins/avf/output.c b/src/plugins/avf/output.c
index e5b53ba5457..de645319e73 100644
--- a/src/plugins/avf/output.c
+++ b/src/plugins/avf/output.c
@@ -257,8 +257,8 @@ avf_tx_enqueue (vlib_main_t * vm, vlib_node_runtime_t * node, avf_txq_t * txq,
d[0].qword[1] |= AVF_TXD_CMD_RS;
}
- CLIB_MEMORY_BARRIER ();
- *(txq->qtx_tail) = txq->next = next & mask;
+ txq->next = next & mask;
+ clib_atomic_store_rel_n (txq->qtx_tail, txq->next);
txq->n_enqueued += n_desc;
return n_packets - n_packets_left;
}