summaryrefslogtreecommitdiff
path: root/drivers/net/virtio
diff options
context:
space:
mode:
authorTiwei Bie <tiwei.bie@intel.com>2019-01-23 01:01:43 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-01-24 10:08:31 +0100
commit0403e37a468df59707ed938cca4a507276a0befb (patch)
tree9f19b8d2f1f52e986c30d34ba5516adde3e6ce5f /drivers/net/virtio
parent18f42d78864836d25bff30714f3bc77eb2c0b67e (diff)
downloaddpdk-next-eventdev-0403e37a468df59707ed938cca4a507276a0befb.zip
dpdk-next-eventdev-0403e37a468df59707ed938cca4a507276a0befb.tar.gz
dpdk-next-eventdev-0403e37a468df59707ed938cca4a507276a0befb.tar.xz
net/virtio-user: fix used ring in cvq handling
When updating used ring, the id in used element should be the index of the first desc in the desc chain. Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'drivers/net/virtio')
-rw-r--r--drivers/net/virtio/virtio_user/virtio_user_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 89d287a..d115737 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -722,7 +722,7 @@ virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx)
/* Update used ring */
uep = &vring->used->ring[avail_idx];
- uep->id = avail_idx;
+ uep->id = desc_idx;
uep->len = n_descs;
vring->used->idx++;