[dpdk-dev] [PATCH 11/17] vhost: move the device ready check at proper place

Maxime Coquelin maxime.coquelin at redhat.com
Tue Mar 14 13:37:59 CET 2017



On 03/03/2017 10:51 AM, Yuanhan Liu wrote:
> Currently, we check vq->desc, vq->kickfd and vq->callfd to know whether
> a virtio device is ready or not. However, we only do it when handling
> SET_VRING_KICK message, which could be wrong if a vhost-user frontend
> send SET_VRING_KICK first and SET_VRING_CALL later.
>
> To work for all possible vhost-user frontend implementations, we could
> move the ready check at the end of vhost-user message handler.
>
> Meanwhile, since we do the check more often than before, the "virtio
> not ready" message is dropped, to not flood the screen.
>
> Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> ---
>  lib/librte_vhost/vhost_user.c | 32 ++++++++++++++------------------
>  1 file changed, 14 insertions(+), 18 deletions(-)

Makes sense:
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime


More information about the dev mailing list