DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gavin Hu <gavin.hu@arm.com>
To: dev@dpdk.org
Cc: nd@arm.com, thomas@monjalon.net, bruce.richardson@intel.com,
	yong.liu@intel.com, yinan.wang@intel.com,
	ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com,
	Honnappa.Nagarahalli@arm.com, ruifeng.wang@arm.com,
	steve.capper@arm.com
Subject: [dpdk-dev] [PATCH v2 2/5] net/ice: use relaxed and remove duplicate barrier
Date: Mon, 16 Sep 2019 19:27:15 +0800	[thread overview]
Message-ID: <1568633238-47888-3-git-send-email-gavin.hu@arm.com> (raw)
In-Reply-To: <1568633238-47888-1-git-send-email-gavin.hu@arm.com>
In-Reply-To: <1567751873-15964-1-git-send-email-gavin.hu@arm.com>

To guarantee the orderings of successive stores to CIO and MMIO memory,
a lighter weight rte_io_wmb [1] can be used instead of rte_wmb, and since
the ICE_PCI_REG_WRITE API already has an inclusive rte_io_wmb, this
explicit call can even be saved.

[1] http://git.dpdk.org/dpdk/tree/lib/librte_eal/common/include/generic/
rte_atomic.h#n98

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
---
 drivers/net/ice/ice_rxtx.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 81af814..2366119 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -363,8 +363,6 @@ ice_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		return -ENOMEM;
 	}
 
-	rte_wmb();
-
 	/* Init the RX tail register. */
 	ICE_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
 
@@ -1212,7 +1210,6 @@ ice_rx_alloc_bufs(struct ice_rx_queue *rxq)
 	}
 
 	/* Update rx tail regsiter */
-	rte_wmb();
 	ICE_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_free_trigger);
 
 	rxq->rx_free_trigger =
@@ -2132,8 +2129,6 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 					 ICE_TXD_QW1_CMD_S);
 	}
 end_of_tx:
-	rte_wmb();
-
 	/* update Tail register */
 	ICE_PCI_REG_WRITE(txq->qtx_tail, tx_id);
 	txq->tx_tail = tx_id;
@@ -2289,7 +2284,6 @@ tx_xmit_pkts(struct ice_tx_queue *txq,
 		txq->tx_tail = 0;
 
 	/* Update the tx tail register */
-	rte_wmb();
 	ICE_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail);
 
 	return nb_pkts;
-- 
2.7.4


  parent reply	other threads:[~2019-09-16 11:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06  6:37 [dpdk-dev] [PATCH] net/bnxt: fix memory barriers Gavin Hu
2019-09-16 11:27 ` [dpdk-dev] [PATCH v2 0/5] fix and optimize barriers usage with some PMDs Gavin Hu
2019-10-02 17:41   ` Ferruh Yigit
2019-09-16 11:27 ` [dpdk-dev] [PATCH v2 1/5] net/i40e: use relaxed and remove duplicate barrier Gavin Hu
2019-09-17  1:53   ` Zhang, Qi Z
2019-09-17  2:07     ` Gavin Hu (Arm Technology China)
2019-09-17  3:23       ` Gavin Hu (Arm Technology China)
2019-09-17  5:13         ` Zhang, Qi Z
2019-09-16 11:27 ` Gavin Hu [this message]
2019-09-17  1:51   ` [dpdk-dev] [PATCH v2 2/5] net/ice: " Zhang, Qi Z
2019-09-16 11:27 ` [dpdk-dev] [PATCH v2 3/5] net/bnxt: " Gavin Hu
2019-09-17  1:55   ` Ajit Khaparde
2019-09-16 11:27 ` [dpdk-dev] [PATCH v2 4/5] net/bnxt: replace with cio barrier for doorbell resp Gavin Hu
2019-09-17  1:56   ` Ajit Khaparde
2019-09-16 11:27 ` [dpdk-dev] [PATCH v2 5/5] net/bnxt: enforce io barrier for doorbell command Gavin Hu
2019-09-17  1:55   ` Ajit Khaparde

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=1568633238-47888-3-git-send-email-gavin.hu@arm.com \
    --to=gavin.hu@arm.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=steve.capper@arm.com \
    --cc=thomas@monjalon.net \
    --cc=yinan.wang@intel.com \
    --cc=yong.liu@intel.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).