From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 642A2A0524; Thu, 7 Jan 2021 15:12:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02F8D140F86; Thu, 7 Jan 2021 15:12:26 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 78836140F85 for ; Thu, 7 Jan 2021 15:12:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610028743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FfFfVqKyGvfwKeRQNhdD55bv4WxpcGEXA+wNooxTHpE=; b=aGw3WfC0dn7qriTJApmFCSJjykICtWZb7ILo7gZmC/XslISW5uWCy2koQz0+pF5SFh2gk0 PzKf5o8SLz4JIrSJkPdZnnXZ0WAt/M0O4ZVkJLmJc/Q77IlmquL0qYQoDziBlotH1TT8yw d/13F4iMaxnoi74TfQCQUrQpXccBA54= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-103-oIOraUFoORS9EXFTu_HB4w-1; Thu, 07 Jan 2021 09:12:21 -0500 X-MC-Unique: oIOraUFoORS9EXFTu_HB4w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79D5C180E461; Thu, 7 Jan 2021 14:12:20 +0000 (UTC) Received: from [10.36.110.9] (unknown [10.36.110.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFEFC5B6AF; Thu, 7 Jan 2021 14:12:18 +0000 (UTC) To: Joyce Kong , chenbo.xia@intel.com, honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com Cc: dev@dpdk.org, nd@arm.com References: <20201221142321.51606-1-joyce.kong@arm.com> <20201221142321.51606-2-joyce.kong@arm.com> From: Maxime Coquelin Message-ID: Date: Thu, 7 Jan 2021 15:12:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201221142321.51606-2-joyce.kong@arm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1 1/4] net/virtio: remove unnecessary rmb barrier X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > Reviewed-by: Ruifeng Wang > --- > 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 Thanks, Maxime