lib/virtio: change the definition of cookie
Converting to the struct virtio_req is useless. Signed-off-by: Ziye Yang <ziye.yang@intel.com> Change-Id: I141268314d28cf87bdef529808c8e18bd1b41c9d Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459360 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
e8356fd233
commit
016d933793
@ -384,7 +384,7 @@ virtqueue_dequeue_burst_rx(struct virtqueue *vq, void **rx_pkts,
|
|||||||
uint32_t *len, uint16_t num)
|
uint32_t *len, uint16_t num)
|
||||||
{
|
{
|
||||||
struct vring_used_elem *uep;
|
struct vring_used_elem *uep;
|
||||||
struct virtio_req *cookie;
|
void *cookie;
|
||||||
uint16_t used_idx, desc_idx;
|
uint16_t used_idx, desc_idx;
|
||||||
uint16_t i;
|
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];
|
uep = &vq->vq_ring.used->ring[used_idx];
|
||||||
desc_idx = (uint16_t) uep->id;
|
desc_idx = (uint16_t) uep->id;
|
||||||
len[i] = uep->len;
|
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)) {
|
if (spdk_unlikely(cookie == NULL)) {
|
||||||
SPDK_WARNLOG("vring descriptor with no mbuf cookie at %"PRIu16"\n",
|
SPDK_WARNLOG("vring descriptor with no mbuf cookie at %"PRIu16"\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user