[dpdk-dev,v2] mempool/octeontx: fix improper memory barrier

Message ID 20180108044043.25596-1-pbhagavatula@caviumnetworks.com (mailing list archive)
State Accepted, 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. 8, 2018, 4:40 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.

Fixes: 6da9d24574db ("event/octeontx: add mailbox support")
Cc: stable@dpdk.org

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

Comments

Thomas Monjalon Jan. 12, 2018, 5:25 p.m. UTC | #1
08/01/2018 05:40, Pavan Nikhilesh:
> Use smp barrier instead of IO barrier when sending mbox request as the
> write has to be reflected between cores not IO devices.
> 
> Fixes: 6da9d24574db ("event/octeontx: add mailbox support")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

Applied, thanks
  

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);
 }