net/virtio: fix typo in packed ring init

The pointer to event structure should be cast to uintptr_t first.

Fixes: f803734b0f ("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>
This commit is contained in:
Tiwei Bie 2019-03-19 14:43:03 +08:00 committed by Ferruh Yigit
parent 2f706027c8
commit ba72caa047

View 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);
}