-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`buf_alloc` and `fwd_cnt` in packet header are used for buffer space management of stream sockets. If peer has insufficient buffer space, the sender waits until new packets are returned and checks `buf_alloc` and `fwd_cnt` again. `VIRTIO_VSOCK_OP_CREDIT_REQUEST` packet is used to query how much buffer space is available. `VIRTIO_VSOCK_OP_CREDIT_UPDATE` replies the query and it can also be sent without previous `VIRTIO_VSOCK_OP_CREDIT_REQUEST`. This patch tracks the `fwd_cnt` and `buf_alloc` to calculate the free space of peer. The credite request and update packets are also handled. Signed-off-by: Jiaqi Gao <[email protected]>
- Loading branch information
Showing
1 changed file
with
96 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters