Message ID | 20190319064312.13743-2-tiwei.bie@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Maxime Coquelin |
Headers | show |
Series | net/virtio: cleanups and fixes for packed/split ring | expand |
Context | Check | Description |
---|---|---|
ci/mellanox-Performance-Testing | success | Performance Testing PASS |
ci/intel-Performance-Testing | success | Performance Testing PASS |
ci/Intel-compilation | success | Compilation OK |
ci/checkpatch | success | coding style OK |
On Tue, Mar 19, 2019 at 02:43:03PM +0800, Tiwei Bie wrote: >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> >--- > drivers/net/virtio/virtio_ring.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Jens Freimann <jfreimann@redhat.com>
On 3/19/19 7:43 AM, Tiwei Bie wrote: > 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> > --- > drivers/net/virtio/virtio_ring.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Thanks, Maxime
diff --git a/drivers/net/virtio/virtio_ring.h b/drivers/net/virtio/virtio_ring.h index 1760823c6..5a37629fe 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); }
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> --- drivers/net/virtio/virtio_ring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)