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 3/4] net/virtio: replace full barrier with relaxed barrier for Arm platform
Date: Thu, 7 Jan 2021 15:47:07 +0100
Message-ID: <a1beb12f-b1d8-3bcc-90d5-423c72af8c56@redhat.com> (raw)
In-Reply-To: <20201221142321.51606-4-joyce.kong@arm.com>



On 12/21/20 3:23 PM, Joyce Kong wrote:
> Relax the full write barriers to one-way barriers for virtio
> control path for Arm platform
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  drivers/net/virtio/virtio_ethdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 0d91f7a50..b3e5cba70 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -203,8 +203,8 @@ virtio_send_command_packed(struct virtnet_ctl *cvq,
>  		vq->vq_packed.cached_flags ^= VRING_PACKED_DESC_F_AVAIL_USED;
>  	}
>  
> -	virtio_wmb(vq->hw->weak_barriers);
> -	desc[head].flags = VRING_DESC_F_NEXT | flags;
> +	virtqueue_store_flags_packed(&desc[head], VRING_DESC_F_NEXT | flags,
> +			vq->hw->weak_barriers);
>  
>  	virtio_wmb(vq->hw->weak_barriers);
>  	virtqueue_notify(vq);
> 

Performance does not matter in the case of ctrl queue, but it is cleaner
to reuse existing helpers anyway:

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

Thanks,
Maxime


  reply	other threads:[~2021-01-07 14:47 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
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 [this message]
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=a1beb12f-b1d8-3bcc-90d5-423c72af8c56@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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git