DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Joyce Kong <joyce.kong@arm.com>,
	chenbo.xia@intel.com, honnappa.nagarahalli@arm.com,
	ruifeng.wang@arm.com
Cc: dev@dpdk.org, nd@arm.com
Subject: Re: [dpdk-dev] [PATCH v1 1/4] net/virtio: remove unnecessary rmb barrier
Date: Thu, 7 Jan 2021 15:12:16 +0100	[thread overview]
Message-ID: <c3a122df-1dd9-6348-511e-6900f9f0806c@redhat.com> (raw)
In-Reply-To: <20201221142321.51606-2-joyce.kong@arm.com>



On 12/21/20 3:23 PM, Joyce Kong wrote:
> As desc_is_used has a load-acquire or rte_io_rmb inside
> and wait for used desc in virtqueue, it is ok to remove
> virtio_rmb behind it.
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  drivers/net/virtio/virtio_ethdev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 6c233b75b..0d91f7a50 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -209,12 +209,12 @@ virtio_send_command_packed(struct virtnet_ctl *cvq,
>  	virtio_wmb(vq->hw->weak_barriers);
>  	virtqueue_notify(vq);
>  
> -	/* wait for used descriptors in virtqueue */
> +	/* wait for used desc in virtqueue
> +	 * desc_is_used has a load-acquire or rte_io_rmb inside
> +	 */
>  	while (!desc_is_used(&desc[head], vq))
>  		usleep(100);
>  
> -	virtio_rmb(vq->hw->weak_barriers);
> -
>  	/* now get used descriptors */
>  	vq->vq_free_cnt += nb_descs;
>  	vq->vq_used_cons_idx += nb_descs;
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2021-01-07 14:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 14:23 [dpdk-dev] [PATCH v1 0/4] replace smp barriers in virtio with C11 atomic Joyce Kong
2020-12-21 14:23 ` [dpdk-dev] [PATCH v1 1/4] net/virtio: remove unnecessary rmb barrier Joyce Kong
2021-01-07 14:12   ` Maxime Coquelin [this message]
2020-12-21 14:23 ` [dpdk-dev] [PATCH v1 2/4] net/virtio: replace smp barrier with IO barrier Joyce Kong
2021-01-07 14:42   ` Maxime Coquelin
2020-12-21 14:23 ` [dpdk-dev] [PATCH v1 3/4] net/virtio: replace full barrier with relaxed barrier for Arm platform Joyce Kong
2021-01-07 14:47   ` Maxime Coquelin
2020-12-21 14:23 ` [dpdk-dev] [PATCH v1 4/4] net/virtio: replace full barrier with thread fence Joyce Kong
2021-01-07 16:28   ` Maxime Coquelin
2021-01-08  9:16 ` [dpdk-dev] [PATCH v1 0/4] replace smp barriers in virtio with C11 atomic Maxime Coquelin

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=c3a122df-1dd9-6348-511e-6900f9f0806c@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=joyce.kong@arm.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.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).