Skip to content

[vsock] better handle Lifecycle#1104

Draft
papertigers wants to merge 1 commit intomasterfrom
spr/papertigers/vsock-better-handle-lifecycle
Draft

[vsock] better handle Lifecycle#1104
papertigers wants to merge 1 commit intomasterfrom
spr/papertigers/vsock-better-handle-lifecycle

Conversation

@papertigers
Copy link
Copy Markdown
Contributor

No description provided.

Created using jj-spr 0.1.0
// XXX this probably shouldn't be asynchronous?
fn reset(&self) {
self.virtio_state.reset(self);
self.backend.reset();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the impl of this should use a oneshot channel to wait for the reset to complete

"pci-virtio-socket"
}
fn pause(&self) {
let _ = self.backend.pause();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably call wait_stopped()

/// This MUST be called when reseting the virtio-socket device so
/// that we don't use stale `GuestAddr`s across device resets.
pub(crate) fn clear_rx_chain(&mut self) {
self.rx_chain = None;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future I would like to eliminate this RxPermit by possibly extending the VirtQueue to allow peek() or a method that checks if the chain has a descriptor available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant