From: Maxime Coquelin Date: Tue, 26 Jan 2021 10:15:58 +0000 (+0100) Subject: net/virtio: fix getting old status on reconnect X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=721dbeb329fe3a26ec95e93f1877ec3f7184eaae;p=dpdk.git net/virtio: fix getting old status on reconnect This patch fixes getting reset status from the restarted vhost-user backend in case of reconnection, instead of the status at the time of the disconnection. This issue was not spotted earlier because Vhost-user protocol status feature was disabled in server mode. Fixes: 47235f16505f ("net/virtio-user: set status on socket reconnect") Cc: stable@dpdk.org Signed-off-by: Maxime Coquelin Reviewed-by: Chenbo Xia --- diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 308275b70e..2b8fdd0c10 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -77,7 +77,7 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev) return -1; dev->vhostfd = connectfd; - old_status = vtpci_get_status(hw); + old_status = dev->status; vtpci_reset(hw);