vhost: fix guest notification setting
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 23 Jul 2020 13:08:53 +0000 (15:08 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 29 Jul 2020 22:41:24 +0000 (00:41 +0200)
commitb53a4972946d4fb82ae323ca036e8d6e61db44d6
tree7e06357a72fdf1bce55bcff8608ecc17f4f3896f
parentcf4f055a65782104274fd044f8e238a313b6f3b7
vhost: fix guest notification setting

If rte_vhost_enable_guest_notification is called before
the virtqueue is ready, the configuration is lost.

This patch fixes this by saving the guest notification
enablement value requested by the application, and apply
it before the virtqueue is made ready to the application.

Fixes: 604052ae5395 ("net/vhost: support queue update")

Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
lib/librte_vhost/vhost.c
lib/librte_vhost/vhost.h
lib/librte_vhost/vhost_user.c