From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E3B584CB3 for ; Mon, 19 Mar 2018 09:25:05 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2018 01:25:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,329,1517904000"; d="scan'208";a="40166469" Received: from debian.sh.intel.com (HELO debian) ([10.67.104.164]) by orsmga001.jf.intel.com with ESMTP; 19 Mar 2018 01:25:03 -0700 Date: Mon, 19 Mar 2018 16:23:29 +0800 From: Tiwei Bie To: Jens Freimann Cc: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com Message-ID: <20180319082328.o4yk6ovgyvftfsd4@debian> References: <20180316152120.13199-1-jfreimann@redhat.com> <20180316152120.13199-5-jfreimann@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180316152120.13199-5-jfreimann@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 04/17] net/virtio: add packed virtqueue helpers 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: Mon, 19 Mar 2018 08:25:06 -0000 On Fri, Mar 16, 2018 at 04:21:07PM +0100, Jens Freimann wrote: > Add helper functions to set/clear and check descriptor flags. > > Signed-off-by: Jens Freimann > --- [...] > --- a/drivers/net/virtio/virtio_ring.h > +++ b/drivers/net/virtio/virtio_ring.h > @@ -74,12 +74,45 @@ struct vring_desc_packed { > > struct vring { > unsigned int num; > + unsigned int avail_wrap_counter; > struct vring_desc *desc; > struct vring_avail *avail; > struct vring_used *used; > struct vring_desc_packed *desc_packed; Maybe it's better to use anonymous union. > }; [...] > diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c > index a7d0a9c..6806056 100644 > --- a/drivers/net/virtio/virtqueue.c > +++ b/drivers/net/virtio/virtqueue.c > @@ -65,6 +65,9 @@ struct rte_mbuf * Please make sure the diff contains function name. > uint16_t used_idx, desc_idx; > uint16_t nb_used, i; > > + if (vtpci_packed_queue(vq->hw)) > + return; I guess packed-ring also needs to support virtqueue_rxvq_flush(). Thanks > + > nb_used = VIRTQUEUE_NUSED(vq); > > for (i = 0; i < nb_used; i++) { > -- > 1.8.3.1 >