[dpdk-dev] mempool/octeontx: use smp instead of io barrier

Message ID 20180104113912.12645-1-pbhagavatula@caviumnetworks.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Pavan Nikhilesh Jan. 4, 2018, 11:39 a.m. UTC
  Use smp barrier instead of IO barrier when sending mbox request as the
write has to be reflected between cores not IO devices.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 drivers/mempool/octeontx/octeontx_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Santosh Shukla Jan. 8, 2018, 4:05 a.m. UTC | #1
On Thursday 04 January 2018 05:09 PM, Pavan Nikhilesh wrote:
> Use smp barrier instead of IO barrier when sending mbox request as the
> write has to be reflected between cores not IO devices.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---

Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
  

Patch

diff --git a/drivers/mempool/octeontx/octeontx_mbox.c b/drivers/mempool/octeontx/octeontx_mbox.c
index 9525da1aa..6c6900389 100644
--- a/drivers/mempool/octeontx/octeontx_mbox.c
+++ b/drivers/mempool/octeontx/octeontx_mbox.c
@@ -128,7 +128,7 @@  mbox_send_request(struct mbox *m, struct octeontx_mbox_hdr *hdr,
 
 	/* Write the msg header */
 	rte_write64(new_hdr.u64, ram_mbox_hdr);
-	rte_io_wmb();
+	rte_smp_wmb();
 	/* Notify PF about the new msg - write to MBOX reg generates PF IRQ */
 	rte_write64(0, m->reg);
 }