diff options
author | Damjan Marion <damarion@cisco.com> | 2024-03-29 21:33:03 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2024-04-05 19:33:32 +0000 |
commit | df47a0812ab9365b2de10a7aabcf4b29a255c088 (patch) | |
tree | 176b5b7103e8716442043f7d8026ae1bf8681407 /src/plugins/dev_octeon/port.c | |
parent | d1364402b6964cc5b2e83490bfe516e0d34becd8 (diff) |
octeon: fix memory ordering issue in tx batch free
Type: fix
Fixes: 01fe7ab
Change-Id: I4425e809f0977521ddecf91b58b26fe4519dd6e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dev_octeon/port.c')
-rw-r--r-- | src/plugins/dev_octeon/port.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/dev_octeon/port.c b/src/plugins/dev_octeon/port.c index 00ad8b9c477..a82e48004b5 100644 --- a/src/plugins/dev_octeon/port.c +++ b/src/plugins/dev_octeon/port.c @@ -284,8 +284,11 @@ oct_txq_stop (vlib_main_t *vm, vnet_dev_tx_queue_t *txq) for (n = ctq->ba_num_cl, cl = ctq->ba_buffer + ctq->ba_first_cl; n; cl++, n--) { - if (cl->status.ccode != 0) - for (u32 i = 0; i < cl->status.count; i++) + oct_npa_batch_alloc_status_t st; + + st.as_u64 = __atomic_load_n (cl->iova, __ATOMIC_ACQUIRE); + if (st.status.ccode != ALLOC_CCODE_INVAL) + for (u32 i = 0; i < st.status.count; i++) { vlib_buffer_t *b = (vlib_buffer_t *) (cl->iova[i] + off); vlib_buffer_free_one (vm, vlib_get_buffer_index (vm, b)); |