net/virtio: fix typo in packed ring init
authorTiwei Bie <tiwei.bie@intel.com>
Tue, 19 Mar 2019 06:43:03 +0000 (14:43 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Mar 2019 17:15:42 +0000 (18:15 +0100)
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 <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_ring.h

index 1760823..5a37629 100644 (file)
@@ -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);
 }