vhost: postpone ring address translations at kick time only
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 3 Nov 2017 15:52:35 +0000 (16:52 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 7 Nov 2017 01:33:05 +0000 (02:33 +0100)
commit5a4933e56be41667c3e0b939216fecf31bfed360
tree0838040796aab249de9d552e24de92f0fff515ee
parentd04fc01de2298e2b7e405f499a919d1bd4d551f1
vhost: postpone ring address translations at kick time only

If multiple queue pairs are created but all are not used, the
device is never started, as unused queues aren't enabled and
their ring addresses aren't translated. The device is changed
to running state when all rings addresses are translated.

This patch fixes this by postponning rings addresses translation
at kick time unconditionnaly, VHOST_USER_F_PROTOCOL_FEATURES
being negotiated or not.

Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
lib/librte_vhost/vhost_user.c