From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiwei Bie Subject: Re: [PATCH v9 6/8] net/virtio: implement receive path for packed queues Date: Fri, 26 Oct 2018 13:43:45 +0800 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 Cc: dev@dpdk.org, maxime.coquelin@redhat.com, zhihong.wang@intel.com To: Jens Freimann 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) Content-Disposition: inline In-Reply-To: <20181025135416.n3ti672qpmoqthgg@jenstp.localdomain> 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 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).