Skip to content

Conversation

@gaojiaqi7
Copy link
Contributor

Closes #452
Closes #453

Send credit update packets when calculated free space (based on previously
advertised fwd_cnt) falls below max packet size after receiving data,
preventing peer from blocking due to outdated credit information.

Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com>
Split outgoing data larger than MAX_VSOCK_PKT_DATA_LEN into multiple packets
to avoid qemu errors. Kernel/qemu implementations limit the packet size and
cause failures when exceeded.

Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com>
@gaojiaqi7 gaojiaqi7 requested a review from jyao1 as a code owner September 19, 2025 07:55
let remaining = total_len - bytes_sent;
let available_space = self.peer_free_space() as usize;
let chunk_size = remaining
.min(MAX_VSOCK_PKT_DATA_LEN as usize)

Check warning

Code scanning / clippy

casting to the same type is unnecessary (usize -> usize) Warning

casting to the same type is unnecessary (usize -> usize)
@jyao1 jyao1 merged commit 4f366e0 into intel:main Sep 22, 2025
18 checks passed
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.

vsock: block at read when continuously receiving data exceeding VSOCK_BUF_ALLOC qemu-kvm error when the vsock buffer larger than 64KB

2 participants