From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 514F04C92 for ; Tue, 11 Sep 2018 09:16:26 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8935185745; Tue, 11 Sep 2018 07:16:25 +0000 (UTC) Received: from localhost (dhcp-192-209.str.redhat.com [10.33.192.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1EBF010EE79B; Tue, 11 Sep 2018 07:16:22 +0000 (UTC) Date: Tue, 11 Sep 2018 09:16:21 +0200 From: Jens Freimann To: Tiwei Bie Cc: "Gavin Hu (Arm Technology China)" , "dev@dpdk.org" , "maxime.coquelin@redhat.com" Message-ID: <20180911071621.pyacm7c45r6rxtsi@jenstp.localdomain> References: <20180906181947.20646-1-jfreimann@redhat.com> <20180906181947.20646-6-jfreimann@redhat.com> <20180910061817.GA10229@debian> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20180910061817.GA10229@debian> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 11 Sep 2018 07:16:25 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 11 Sep 2018 07:16:25 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jfreimann@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH v5 05/11] 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: Tue, 11 Sep 2018 07:16:26 -0000 On Mon, Sep 10, 2018 at 02:18:17PM +0800, Tiwei Bie wrote: >On Mon, Sep 10, 2018 at 06:02:19AM +0000, Gavin Hu (Arm Technology China) wrote: >> >> >> > -----Original Message----- >> > From: dev On Behalf Of Jens Freimann >> > Sent: Friday, September 7, 2018 2:20 AM >> > To: dev@dpdk.org >> > Cc: tiwei.bie@intel.com; maxime.coquelin@redhat.com >> > Subject: [dpdk-dev] [PATCH v5 05/11] net/virtio: dump packed virtqueue >> > data >> > >> > Add support to dump packed virtqueue data to the >> > VIRTQUEUE_DUMP() macro. >> > >> > Signed-off-by: Jens Freimann >> >> Acked-by: Gavin Hu >> >> > --- >> > drivers/net/virtio/virtqueue.h | 6 ++++++ >> > 1 file changed, 6 insertions(+) >> > >> > diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h >> > index 53fce61b4..531ba8c65 100644 >> > --- a/drivers/net/virtio/virtqueue.h >> > +++ b/drivers/net/virtio/virtqueue.h >> > @@ -384,6 +384,12 @@ virtqueue_notify(struct virtqueue *vq) >> > uint16_t used_idx, nused; \ >> > used_idx = (vq)->vq_ring.used->idx; \ > >The vq_ring.used doesn't exist in packed ring. > >> > nused = (uint16_t)(used_idx - (vq)->vq_used_cons_idx); \ > >The nused can't be calculated in this way in >packed ring. you're right, this doesn't work. I will fix it and test properly. regards, Jens