From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C87C55F16 for ; Mon, 19 Mar 2018 09:26:39 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2018 01:26:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,329,1517904000"; d="scan'208";a="29196037" Received: from debian.sh.intel.com (HELO debian) ([10.67.104.164]) by fmsmga002.fm.intel.com with ESMTP; 19 Mar 2018 01:26:37 -0700 Date: Mon, 19 Mar 2018 16:25:03 +0800 From: Tiwei Bie To: Jens Freimann Cc: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com Message-ID: <20180319082501.xej3vh42ij7kaoxk@debian> References: <20180316152120.13199-1-jfreimann@redhat.com> <20180316152120.13199-6-jfreimann@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180316152120.13199-6-jfreimann@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 05/17] net/virtio: don't dump split virtqueue data 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:26:40 -0000 On Fri, Mar 16, 2018 at 04:21:08PM +0100, Jens Freimann wrote: > VIRTQUEUE_DUMP access split virtqueue data which is not > correct when packed virtqueues are used. > > Signed-off-by: Jens Freimann > --- > drivers/net/virtio/virtqueue.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h > index cc2e7c0..82160ca 100644 > --- a/drivers/net/virtio/virtqueue.h > +++ b/drivers/net/virtio/virtqueue.h > @@ -359,7 +359,9 @@ struct virtio_tx_region { > } > > #ifdef RTE_LIBRTE_VIRTIO_DEBUG_DUMP > -#define VIRTQUEUE_DUMP(vq) do { \ > +#define VIRTQUEUE_DUMP(vq) \ > + do { \ > + if (vtpci_packed_queue((vq)->hw)) break; \ Maybe it's better to make VIRTQUEUE_DUMP() support packed ring. Thanks > uint16_t used_idx, nused; \ > used_idx = (vq)->vq_ring.used->idx; \ > nused = (uint16_t)(used_idx - (vq)->vq_used_cons_idx); \ > -- > 1.8.3.1 >