net/virtio-user: fix control VQ
authorTiwei Bie <tiwei.bie@intel.com>
Tue, 22 Jan 2019 17:01:41 +0000 (01:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 24 Jan 2019 09:08:31 +0000 (10:08 +0100)
commit45c224e73a3057bf62cb04f83fc1e97457a21ffa
tree972174a222c0fa25f544ef3e56d9c3d79adb242e
parent2923b8f9c41da37d63bd196ba2f037c154a6ebd5
net/virtio-user: fix control VQ

This patch fixed below issues in the packed ring based control
vq support in virtio user:

1. The idx_hdr should be used_idx instead of the id in the desc;
2. We just need to write out a single used descriptor for each
   descriptor list;
3. The avail/used bits should be initialized to 0;

Meanwhile, make the function name consistent with other parts.

Fixes: 48a4464029a7 ("net/virtio-user: support control VQ for packed")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_ethdev.c
drivers/net/virtio/virtio_user/virtio_user_dev.c
drivers/net/virtio/virtio_user_ethdev.c