From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [Patch v3 1/2] net/virtio: check head desc with correct wrap counter Date: Fri, 11 Jan 2019 10:03:49 +0100 Message-ID: References: <20190110214727.1142-1-jfreimann@redhat.com> <20190110214727.1142-2-jfreimann@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: tiwei.bie@intel.com To: Jens Freimann , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D4BB61B4CE for ; Fri, 11 Jan 2019 10:03:54 +0100 (CET) In-Reply-To: <20190110214727.1142-2-jfreimann@redhat.com> Content-Language: en-US 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 1/10/19 10:47 PM, Jens Freimann wrote: > In virtio_pq_send_command() we check for a used descriptor > and wait in an idle loop until it becomes used. We can't use > vq->used_wrap_counter here to check for the first descriptor > we made available because the ring could have wrapped. Let's use > the used_wrap_counter that matches the state of the head descriptor. > > Fixes: ec194c2 ("net/virtio: support packed queue in send command") > > Signed-off-by: Jens Freimann > --- > drivers/net/virtio/virtio_ethdev.c | 11 ++++++----- > drivers/net/virtio/virtqueue.h | 10 ++++++++-- > 2 files changed, 14 insertions(+), 7 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime