The worker barriers order event payload writes in normal memory before the add work or tag switch store to the SSO device, so they are IO ordering: use rte_io_wmb(). The selftest barriers publish worker parameters before launching lcores; convert them to release fences.
Signed-off-by: Stephen Hemminger <[email protected]> --- drivers/event/octeontx/ssovf_evdev_selftest.c | 6 +++--- drivers/event/octeontx/ssovf_worker.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/event/octeontx/ssovf_evdev_selftest.c b/drivers/event/octeontx/ssovf_evdev_selftest.c index b54ae126d2..614f9bbaef 100644 --- a/drivers/event/octeontx/ssovf_evdev_selftest.c +++ b/drivers/event/octeontx/ssovf_evdev_selftest.c @@ -65,7 +65,7 @@ seqn_list_update(int val) return -1; seqn_list[seqn_list_index++] = val; - rte_smp_wmb(); + rte_atomic_thread_fence(rte_memory_order_release); return 0; } @@ -637,7 +637,7 @@ launch_workers_and_wait(int (*main_worker)(void *), param[0].sched_type = sched_type; param[0].port = 0; param[0].dequeue_tmo_ticks = dequeue_tmo_ticks; - rte_smp_wmb(); + rte_atomic_thread_fence(rte_memory_order_release); w_lcore = rte_get_next_lcore( /* start core */ -1, @@ -650,7 +650,7 @@ launch_workers_and_wait(int (*main_worker)(void *), param[port].sched_type = sched_type; param[port].port = port; param[port].dequeue_tmo_ticks = dequeue_tmo_ticks; - rte_smp_wmb(); + rte_atomic_thread_fence(rte_memory_order_release); w_lcore = rte_get_next_lcore(w_lcore, 1, 0); rte_eal_remote_launch(worker, ¶m[port], w_lcore); } diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c index 89b5dc056c..f3c6a0da5c 100644 --- a/drivers/event/octeontx/ssovf_worker.c +++ b/drivers/event/octeontx/ssovf_worker.c @@ -59,10 +59,10 @@ ssows_fwd_group(struct ssows *ws, const struct rte_event *ev, const uint8_t grp) newtag |= grp << 20; newtag |= tag; ssows_swtag_norm(ws, newtag, SSO_SYNC_ATOMIC); - rte_smp_wmb(); + rte_io_wmb(); ssows_swtag_wait(ws); } else { - rte_smp_wmb(); + rte_io_wmb(); } ssows_add_work(ws, event_ptr, tag, new_tt, grp); } @@ -158,7 +158,7 @@ ssows_enq_burst(void *port, const struct rte_event ev[], uint16_t nb_events) switch (ev->op) { case RTE_EVENT_OP_NEW: - rte_smp_wmb(); + rte_io_wmb(); ssows_new_event(ws, ev); break; case RTE_EVENT_OP_FORWARD: @@ -179,7 +179,7 @@ ssows_enq_new_burst(void *port, const struct rte_event ev[], uint16_t nb_events) uint16_t i; struct ssows *ws = port; - rte_smp_wmb(); + rte_io_wmb(); for (i = 0; i < nb_events; i++) ssows_new_event(ws, &ev[i]); -- 2.53.0

