From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 573C95A6A for ; Fri, 26 Oct 2018 07:45:10 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2018 22:45:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,426,1534834800"; d="scan'208";a="102809697" Received: from btwcube1.sh.intel.com (HELO debian) ([10.67.104.158]) by orsmga001.jf.intel.com with ESMTP; 25 Oct 2018 22:45:08 -0700 Date: Fri, 26 Oct 2018 13:43:45 +0800 From: Tiwei Bie To: Jens Freimann Cc: dev@dpdk.org, maxime.coquelin@redhat.com, zhihong.wang@intel.com Message-ID: <20181026054345.GA31861@debian> References: <20181024143236.21271-1-jfreimann@redhat.com> <20181024143236.21271-7-jfreimann@redhat.com> <20181025093909.GF22179@debian> <20181025135416.n3ti672qpmoqthgg@jenstp.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181025135416.n3ti672qpmoqthgg@jenstp.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 05:45:10 -0000 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 > > > --- > > > 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).