Skip to content

Commit

Permalink
net/virtio: fix getting old status on reconnect
Browse files Browse the repository at this point in the history
[ upstream commit 721dbeb ]

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: 47235f1 ("net/virtio-user: set status on socket reconnect")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
  • Loading branch information
mcoquelin authored and bluca committed Feb 4, 2021
1 parent 732bdcc commit ae38535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/virtio/virtio_user_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ae38535

Please sign in to comment.