vhost: fix enabling vring per queue
authorVictor Kaplansky <victork@redhat.com>
Tue, 24 Nov 2015 07:25:35 +0000 (15:25 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 Nov 2015 20:34:11 +0000 (21:34 +0100)
commitcd81ee7cc28b11cd698b61a1db6b99a847bb33ea
treef946bc73f4aaac53c6d198f7e7b2f1d679ccc64c
parentec09c280b83975b6444cb87eaf12fee970fde70f
vhost: fix enabling vring per queue

The VHOST_USER_SET_VRING_ENABLE request was sent for each queue-pair.
However, it's changed to be sent per queue in the queue-pair by QEMU
commit dc3db6ad ("vhost-user: start/stop all rings"). The change
is reasonable, as we send all other request per queue, instead of
queue-pair.

Hence we should do proper changes to adapt to the QEMU change here.
Otherwise, a segfault will be triggered when last TX queue was enabled.

Signed-off-by: Victor Kaplansky <victork@redhat.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/vhost_user/virtio-net-user.c