aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dev_octeon/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dev_octeon/port.c')
-rw-r--r--src/plugins/dev_octeon/port.c7
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));