DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gavin Hu (Arm Technology China)" <Gavin.Hu@arm.com>
To: Xiao Zhang <xiao.zhang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "wenzhuo.lu@intel.com" <wenzhuo.lu@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	Steve Capper <Steve.Capper@arm.com>,
	"Phil Yang (Arm Technology China)" <Phil.Yang@arm.com>,
	"Joyce Kong (Arm Technology China)" <Joyce.Kong@arm.com>,
	nd <nd@arm.com>
Subject: Re: [dpdk-dev] net/e1000: correct mb function
Date: Wed, 11 Sep 2019 03:21:37 +0000	[thread overview]
Message-ID: <VI1PR08MB537697495BDACAF0F70818488FB10@VI1PR08MB5376.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <1568137278-10066-1-git-send-email-xiao.zhang@intel.com>



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiao Zhang
> Sent: Wednesday, September 11, 2019 1:41 AM
> To: dev@dpdk.org
> Cc: wenzhuo.lu@intel.com; Xiao Zhang <xiao.zhang@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] net/e1000: correct mb function
> 
> Use rte_cio_wmb instead of rte_wmb when writing TX descriptor since it's
> CIO memory.
> Replace rte_io_wmb and E1000_PCI_REG_WRITE_RELAXED with
> E1000_PCI_REG_WRITE since it has rte_io_wmb inside, which will be more
> clear.
> 
> Fixes: 1fc9701238ed ("net/e1000: fix i219 hang on reset/close")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> ---
>  drivers/net/e1000/em_rxtx.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
> index 5925e49..49c5371 100644
> --- a/drivers/net/e1000/em_rxtx.c
> +++ b/drivers/net/e1000/em_rxtx.c
> @@ -2049,13 +2049,12 @@ e1000_flush_tx_ring(struct rte_eth_dev *dev)
>  		tx_desc->lower.data = rte_cpu_to_le_32(txd_lower | size);
>  		tx_desc->upper.data = 0;
> 
> -		rte_wmb();
> +		rte_cio_wmb();
>  		txq->tx_tail++;
>  		if (txq->tx_tail == txq->nb_tx_desc)
>  			txq->tx_tail = 0;
> -		rte_io_wmb();
>  		tdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_TDT(i));
> -		E1000_PCI_REG_WRITE_RELAXED(tdt_reg_addr, txq->tx_tail);
> +		E1000_PCI_REG_WRITE(tdt_reg_addr, txq->tx_tail);
>  		usec_delay(250);
>  	}
>  }

Reviewed-by: Gavin Hu <gavin.hu@arm.com> 
> --
> 2.7.4


  reply	other threads:[~2019-09-11  3:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 17:41 Xiao Zhang
2019-09-11  3:21 ` Gavin Hu (Arm Technology China) [this message]
2019-09-11  9:30 ` Ye Xiaolong

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=VI1PR08MB537697495BDACAF0F70818488FB10@VI1PR08MB5376.eurprd08.prod.outlook.com \
    --to=gavin.hu@arm.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=Joyce.Kong@arm.com \
    --cc=Phil.Yang@arm.com \
    --cc=Steve.Capper@arm.com \
    --cc=dev@dpdk.org \
    --cc=nd@arm.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiao.zhang@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).