From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 4992B4C99 for ; Thu, 25 Oct 2018 11:27:04 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2018 02:27:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,423,1534834800"; d="scan'208";a="102354405" Received: from btwcube1.sh.intel.com (HELO debian) ([10.67.104.158]) by fmsmga001.fm.intel.com with ESMTP; 25 Oct 2018 02:27:02 -0700 Date: Thu, 25 Oct 2018 17:25:40 +0800 From: Tiwei Bie To: Jens Freimann Cc: dev@dpdk.org, maxime.coquelin@redhat.com, zhihong.wang@intel.com Message-ID: <20181025092539.GD22179@debian> References: <20181024143236.21271-1-jfreimann@redhat.com> <20181024143236.21271-5-jfreimann@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181024143236.21271-5-jfreimann@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v9 4/8] net/virtio: dump packed 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: Thu, 25 Oct 2018 09:27:04 -0000 On Wed, Oct 24, 2018 at 04:32:32PM +0200, Jens Freimann wrote: > Add support to dump packed virtqueue data to the > VIRTQUEUE_DUMP() macro. > > Signed-off-by: Jens Freimann > Reviewed-by: Maxime Coquelin > --- > drivers/net/virtio/virtqueue.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h > index 3d512fe30..2af1bc259 100644 > --- a/drivers/net/virtio/virtqueue.h > +++ b/drivers/net/virtio/virtqueue.h > @@ -368,6 +368,15 @@ virtqueue_notify(struct virtqueue *vq) > uint16_t used_idx, nused; \ > used_idx = (vq)->vq_ring.used->idx; \ > nused = (uint16_t)(used_idx - (vq)->vq_used_cons_idx); \ > + if (vtpci_packed_queue((vq)->hw)) { \ > + PMD_INIT_LOG(DEBUG, \ > + "VQ: - size=%d; free=%d; used_cons_idx=%d; avail_idx=%d;" \ > + "VQ: - avail_wrap_counter=%d; used_wrap_counter=%d", \ Please remove the second "VQ: -" as they are on the same line. > + (vq)->vq_nentries, (vq)->vq_free_cnt, (vq)->vq_used_cons_idx, \ > + (vq)->vq_avail_idx, (vq)->vq_ring.avail_wrap_counter, \ > + (vq)->vq_ring.used_wrap_counter); \ > + break; \ > + } \ > PMD_INIT_LOG(DEBUG, \ > "VQ: - size=%d; free=%d; used=%d; desc_head_idx=%d;" \ > " avail.idx=%d; used_cons_idx=%d; used.idx=%d;" \ > -- > 2.17.1 >