From ba72caa0472f494c61573f65e41bdc6f3bdfc891 Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Tue, 19 Mar 2019 14:43:03 +0800 Subject: [PATCH] net/virtio: fix typo in packed ring init The pointer to event structure should be cast to uintptr_t first. Fixes: f803734b0f2e ("net/virtio: vring init for packed queues") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Jens Freimann Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ring.h b/drivers/net/virtio/virtio_ring.h index 1760823c65..5a37629fe5 100644 --- a/drivers/net/virtio/virtio_ring.h +++ b/drivers/net/virtio/virtio_ring.h @@ -165,7 +165,7 @@ vring_init_packed(struct vring_packed *vr, uint8_t *p, unsigned long align, vr->driver_event = (struct vring_packed_desc_event *)(p + vr->num * sizeof(struct vring_packed_desc)); vr->device_event = (struct vring_packed_desc_event *) - RTE_ALIGN_CEIL((uintptr_t)(vr->driver_event + + RTE_ALIGN_CEIL(((uintptr_t)vr->driver_event + sizeof(struct vring_packed_desc_event)), align); } -- 2.20.1