Thanks to visit codestin.com
Credit goes to github.com

Skip to content

virtio-devices: vhost-user: Cancel reconnection if device unplugged - #8182

Merged
rbradford merged 3 commits into
cloud-hypervisor:mainfrom
rbradford:202605/vhost-user-interruptible-connect
May 11, 2026
Merged

rbradford merged 3 commits into
cloud-hypervisor:mainfrom
rbradford:202605/vhost-user-interruptible-connect

Conversation

@rbradford

Copy link
Copy Markdown
Member

If the vhost-user device receives a kill_evt (most likely because a removal has
been requested) then cancel the reconnection.

  • virtio-devices: vhost-user: Use TimerFd connect_vhost_user
  • virtio-devices: vhost-user: Abandon reconnection if kill event sent
  • virtio-devices: vhost-user: Log when attempting reconnection

rbradford added 3 commits May 9, 2026 22:15
Replace the use of sleeps with a TimerFd. Initially this is functionally
equivalent but it can be extended to also handle other events.

Signed-off-by: Rob Bradford <[email protected]>
Abandon the reconnection to the vhost-user socket if the kill_evt is
fired because e.g. a device removal request has come in during the
reconnection.

Signed-off-by: Rob Bradford <[email protected]>
Currently when the socket is disconnected by the other end there is no
logging of such an event. Add a log to aid identifying when this has
happened.

Signed-off-by: Rob Bradford <[email protected]>
@rbradford
rbradford requested a review from a team as a code owner May 9, 2026 21:48
@rbradford
rbradford added this pull request to the merge queue May 11, 2026
Merged via the queue into cloud-hypervisor:main with commit bca9b97 May 11, 2026
41 checks passed
@rbradford
rbradford deleted the 202605/vhost-user-interruptible-connect branch June 12, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants