From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5038E293B; Fri, 25 Jan 2019 13:43:15 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D8BEDAC61E; Fri, 25 Jan 2019 12:43:13 +0000 (UTC) Received: from localhost (unknown [10.40.205.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 096196019F; Fri, 25 Jan 2019 12:43:04 +0000 (UTC) Date: Fri, 25 Jan 2019 13:43:03 +0100 From: Jens Freimann To: Ilya Maximets Cc: dev@dpdk.org, Maxime Coquelin , "Michael S . Tsirkin" , Tiwei Bie , Zhihong Wang , stable@dpdk.org Message-ID: <20190125124303.3ucuwd47ikikn3u6@jenstp.localdomain> References: <20190124165902.24178-1-i.maximets@samsung.com> <20190124165902.24178-2-i.maximets@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190124165902.24178-2-i.maximets@samsung.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 25 Jan 2019 12:43:14 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 1/3] net/virtio: fix improper read barriers on packed Tx cleanup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 12:43:15 -0000 On Thu, Jan 24, 2019 at 07:59:00PM +0300, Ilya Maximets wrote: >Read barrier must be implied between reading descriptor flags >and descriptor id. Otherwise, in case of reordering, we could >read wrong descriptor id. > >For the reference, similar barrier for split rings is the read >barrier between VIRTQUEUE_NUSED (reading the used->idx) and >the call to the virtio_xmit_cleanup(). > >Additionally removed double update of 'used_idx'. It's enough >to set it in the end of the loop. > >Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues") >Cc: stable@dpdk.org > >Signed-off-by: Ilya Maximets >--- > drivers/net/virtio/virtio_rxtx.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by: Jens Freimann