From 016d933793435c3925268dc71619166ddd5ab6fb Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Wed, 26 Jun 2019 18:55:19 +0800 Subject: [PATCH] lib/virtio: change the definition of cookie Converting to the struct virtio_req is useless. Signed-off-by: Ziye Yang Change-Id: I141268314d28cf87bdef529808c8e18bd1b41c9d Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459360 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Ben Walker --- lib/virtio/virtio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/virtio/virtio.c b/lib/virtio/virtio.c index 997de52f0..ef8353d59 100644 --- a/lib/virtio/virtio.c +++ b/lib/virtio/virtio.c @@ -384,7 +384,7 @@ virtqueue_dequeue_burst_rx(struct virtqueue *vq, void **rx_pkts, uint32_t *len, uint16_t num) { struct vring_used_elem *uep; - struct virtio_req *cookie; + void *cookie; uint16_t used_idx, desc_idx; uint16_t i; @@ -394,7 +394,7 @@ virtqueue_dequeue_burst_rx(struct virtqueue *vq, void **rx_pkts, uep = &vq->vq_ring.used->ring[used_idx]; desc_idx = (uint16_t) uep->id; len[i] = uep->len; - cookie = (struct virtio_req *)vq->vq_descx[desc_idx].cookie; + cookie = vq->vq_descx[desc_idx].cookie; if (spdk_unlikely(cookie == NULL)) { SPDK_WARNLOG("vring descriptor with no mbuf cookie at %"PRIu16"\n",