Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/executor/vsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ async fn vsock_run() {
} else if op == Op::Response && type_ == Type::Stream {
if raw.remote_cid == header_cid && raw.state == VsockState::Connecting {
raw.state = VsockState::Connected;
raw.peer_buf_alloc = header.buf_alloc.to_ne();
raw.peer_fwd_cnt = header.fwd_cnt.to_ne();
raw.tx_waker.wake();
}
} else if raw.remote_cid == header_cid {
hdr = Some(*header);
Expand Down
2 changes: 1 addition & 1 deletion src/fd/socket/vsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl ObjectInterface for Socket {
const HEADER_SIZE: usize = mem::size_of::<Hdr>();
let port = VSOCK_MAP.lock().connect(ep.port, ep.cid)?;
self.port = port;
self.port = ep.cid;
self.cid = ep.cid;

future::poll_fn(|cx| {
if let Some(mut driver_guard) = hardware::get_vsock_driver().unwrap().try_lock()
Expand Down
Loading