net/virtio-user: do not assume vhost status feature
authorAdrian Moreno <amorenoz@redhat.com>
Mon, 26 Oct 2020 16:39:29 +0000 (17:39 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:05 +0000 (23:35 +0100)
commit13e8bf892c2ea18c8a7ef8ec82f6dce6776c5163
treef63573cb1bfe5b74af389858ff75e45fb86f12be
parentd7e10ea92ee6676af1be36d9afcc008423ad099e
net/virtio-user: do not assume vhost status feature

There are some status reads and updates that need to happen before the
protocol features are negotiated. Therefore, assuming the backend does
support this feature can lead to failures.

On server mode, do not assume the backend supports
VHOST_USER_PROTOCOL_F_STATUS. Activate it back on reconnection and
clear it on disconnection.

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