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 <dev-boun...@dpdk.org> On Behalf Of Jens Freimann
> Sent: Friday, September 7, 2018 2:20 AM
> To: dev@dpdk.org
> Cc: tiwei....@intel.com; maxime.coque...@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 <jfreim...@redhat.com>

Acked-by: Gavin Hu <gavin...@arm.com>

> ---
>  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

Reply via email to