DPDK patches and discussions
 help / color / mirror / Atom feed
From: John Miller <john.miller@atomicrules.com>
To: dev@dpdk.org, ferruh.yigit@intel.com
Cc: shepard.siegel@atomicrules.com,
	John Miller <john.miller@atomicrules.com>
Subject: [PATCH v3 6/7] net/ark: add memory write barriers in critical code paths
Date: Tue, 15 Feb 2022 16:19:25 -0600	[thread overview]
Message-ID: <20220215221926.409039-6-john.miller@atomicrules.com> (raw)
In-Reply-To: <20220215221926.409039-1-john.miller@atomicrules.com>

Add memory write barriers for read and wait status functions
in ddm, udm and mpu.

Signed-off-by: John Miller <john.miller@atomicrules.com>
---
 drivers/net/ark/ark_ddm.c | 1 +
 drivers/net/ark/ark_mpu.c | 1 +
 drivers/net/ark/ark_udm.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c
index 2321371572..b16c739d50 100644
--- a/drivers/net/ark/ark_ddm.c
+++ b/drivers/net/ark/ark_ddm.c
@@ -55,6 +55,7 @@ ark_ddm_stop(struct ark_ddm_t *ddm, const int wait)
 	int cnt = 0;
 
 	ddm->cfg.command = 2;
+	rte_wmb();
 	while (wait && (ddm->cfg.stop_flushed & 0x01) == 0) {
 		if (cnt++ > 1000)
 			return 1;
diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c
index 8160c1de7b..b8e94b6ed3 100644
--- a/drivers/net/ark/ark_mpu.c
+++ b/drivers/net/ark/ark_mpu.c
@@ -68,6 +68,7 @@ ark_mpu_reset(struct ark_mpu_t *mpu)
 	int cnt = 0;
 
 	mpu->cfg.command = MPU_CMD_RESET;
+	rte_wmb();
 
 	while (mpu->cfg.command != MPU_CMD_IDLE) {
 		if (cnt++ > 1000)
diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c
index 28c4500a2c..cb3cf5c941 100644
--- a/drivers/net/ark/ark_udm.c
+++ b/drivers/net/ark/ark_udm.c
@@ -34,6 +34,7 @@ ark_udm_stop(struct ark_udm_t *udm, const int wait)
 	int cnt = 0;
 
 	udm->cfg.command = 2;
+	rte_wmb();
 
 	while (wait && (udm->cfg.stop_flushed & 0x01) == 0) {
 		if (cnt++ > 1000)
-- 
2.25.1


  parent reply	other threads:[~2022-02-15 22:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220119191255.273988-ed.czeck@atomicrules.com>
2022-02-10 14:34 ` [PATCH v2 1/3] net/ark: add device capabilities record John Miller
2022-02-10 14:34   ` [PATCH v2 2/3] net/ark: support arbitrary mbuf size John Miller
2022-02-10 14:34   ` [PATCH v2 3/3] net/ark: support chunk DMA transfers John Miller
2022-02-11 11:39 ` [PATCH v2 1/3] net/ark: add device capabilities record John Miller
2022-02-11 11:39   ` [PATCH v2 2/3] net/ark: support arbitrary mbuf size John Miller
2022-02-11 11:39   ` [PATCH v2 3/3] net/ark: support chunk DMA transfers John Miller
2022-02-14 13:59     ` Ferruh Yigit
2022-02-14 14:00   ` [PATCH v2 1/3] net/ark: add device capabilities record Ferruh Yigit
2022-02-15 22:19 ` [PATCH v3 1/7] " John Miller
2022-02-15 22:19   ` [PATCH v3 2/7] net/ark: add support for new devices John Miller
2022-02-15 22:19   ` [PATCH v3 3/7] net/ark: support arbitrary mbuf size John Miller
2022-02-15 22:19   ` [PATCH v3 4/7] net/ark: packet generator and checker status update John Miller
2022-02-15 22:19   ` [PATCH v3 5/7] net/ark: support chunk DMA transfers John Miller
2022-02-15 22:19   ` John Miller [this message]
2022-02-15 22:19   ` [PATCH v3 7/7] net/ark: add performance optimizations John Miller
2022-02-16 10:25   ` [PATCH v3 1/7] net/ark: add device capabilities record Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220215221926.409039-6-john.miller@atomicrules.com \
    --to=john.miller@atomicrules.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=shepard.siegel@atomicrules.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).