From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jfreimann@redhat.com>
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id 687A391
 for <dev@dpdk.org>; Wed, 31 Oct 2018 13:46:51 +0100 (CET)
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
 [10.5.11.13])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id 6E80231524FF;
 Wed, 31 Oct 2018 12:46:50 +0000 (UTC)
Received: from localhost (ovpn-116-128.ams2.redhat.com [10.36.116.128])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id 44B0D6091D;
 Wed, 31 Oct 2018 12:46:46 +0000 (UTC)
Date: Wed, 31 Oct 2018 13:46:45 +0100
From: Jens Freimann <jfreimann@redhat.com>
To: Tiwei Bie <tiwei.bie@intel.com>
Cc: dev@dpdk.org, maxime.coquelin@redhat.com, zhihong.wang@intel.com
Message-ID: <20181031124645.uirzcotjzlcnx7af@jenstp.localdomain>
References: <20181024143236.21271-1-jfreimann@redhat.com>
 <20181024143236.21271-7-jfreimann@redhat.com>
 <20181025093909.GF22179@debian>
 <20181025135416.n3ti672qpmoqthgg@jenstp.localdomain>
 <20181026054345.GA31861@debian>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <20181026054345.GA31861@debian>
User-Agent: NeoMutt/20180716
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.41]); Wed, 31 Oct 2018 12:46:50 +0000 (UTC)
Subject: Re: [dpdk-dev] [PATCH v9 6/8] net/virtio: implement receive path
 for packed queues
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 31 Oct 2018 12:46:51 -0000

On Fri, Oct 26, 2018 at 01:43:45PM +0800, Tiwei Bie wrote:
>On Thu, Oct 25, 2018 at 03:54:16PM +0200, Jens Freimann wrote:
>> On Thu, Oct 25, 2018 at 05:39:09PM +0800, Tiwei Bie wrote:
>> > On Wed, Oct 24, 2018 at 04:32:34PM +0200, Jens Freimann wrote:
>> > > Implement the receive part.
>> > >
>> > > Signed-off-by: Jens Freimann <jfreimann@redhat.com>
>> > > ---
>> > >  drivers/net/virtio/virtio_ethdev.c |  18 +-
>> > >  drivers/net/virtio/virtio_ethdev.h |   2 +
>> > >  drivers/net/virtio/virtio_rxtx.c   | 280 ++++++++++++++++++++++++++---
>> > >  drivers/net/virtio/virtqueue.c     |  22 +++
>> > >  drivers/net/virtio/virtqueue.h     |   2 +-
>> > >  5 files changed, 297 insertions(+), 27 deletions(-)
>> > >
>> > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
>> > > index d2118e6a9..7f81d24aa 100644
>> > > --- a/drivers/net/virtio/virtio_ethdev.c
>> > > +++ b/drivers/net/virtio/virtio_ethdev.c
>> > > @@ -384,8 +384,10 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
>> > >  	vq->hw = hw;
>> > >  	vq->vq_queue_index = vtpci_queue_idx;
>> > >  	vq->vq_nentries = vq_size;
>> > > -	if (vtpci_packed_queue(hw))
>> > > +	if (vtpci_packed_queue(hw)) {
>> > >  		vq->vq_ring.avail_wrap_counter = 1;
>> > > +		vq->vq_ring.used_wrap_counter = 1;
>> >
>> > Why just use used_wrap_counter in receive path?
>>
>> You mean add it in a previous patch?
>>
>
>Hmm, the used_wrap_counter is already used in the previous
>patch, but it wasn't initialized until the receive path
>is added. We should have a patch to introduce these packed
>ring related generic fields (e.g. the wrap counters and
>vring) in struct virtqueue and also do the corresponding
>initializations in that patch too (maybe we can do this
>in the current 1/8 patch).

sounds good, will do it like this.

regards,
Jens