[dpdk-dev] [PATCH v2 03/44] net/virtio: fix getting old status on reconnect

Xia, Chenbo chenbo.xia at intel.com
Thu Jan 21 08:12:53 CET 2021


> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Wednesday, January 20, 2021 5:24 AM
> To: dev at dpdk.org; Xia, Chenbo <chenbo.xia at intel.com>; olivier.matz at 6wind.com;
> amorenoz at redhat.com; david.marchand at redhat.com
> Cc: Maxime Coquelin <maxime.coquelin at redhat.com>; stable at dpdk.org
> Subject: [PATCH v2 03/44] 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 at dpdk.org
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
>  drivers/net/virtio/virtio_user_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/virtio/virtio_user_ethdev.c
> b/drivers/net/virtio/virtio_user_ethdev.c
> index 241808cd8f..7abba1f1ee 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);
> 
> --
> 2.29.2

Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>


More information about the dev mailing list