net/virtio-user: do not assume features are negotiated
authorAdrian Moreno <amorenoz@redhat.com>
Mon, 26 Oct 2020 16:39:26 +0000 (17:39 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:05 +0000 (23:35 +0100)
commit0fa6d4c406892efa58a656ea0860f8422c3bf0e2
treec405d67f07805b92b51321c2aec709dc595cfb5f
parentb0395dc81844f5d5b8885ed5fa8c697c5cd7225d
net/virtio-user: do not assume features are negotiated

According to the virtio spec, ACK and DRIVER status bits should be set
before feature negotiation.

However, until the protocol features are negotiated, the driver does not
know if the device actually supports those vhost-user messages.
Therefore, until FEATURES_OK is set, the GET/SET_STATUS messages should
not be sent.

Fixes: 57912824615f ("net/virtio-user: support vhost status setting")
Cc: stable@dpdk.org
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
drivers/net/virtio/virtio_user/vhost_user.c