fix(net/vsock): receiving logic #37
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Description and Root Cause:
During the communication process based on VSOCK between Kylinos and Starry, Starry encountered communication stagnation after receiving 1KB of data, despite configuring a 64KB receiving buffer. The root cause is that StarryOS did not receive the CreditRequest event from the sender, so the receiver needs to actively update the buffer.
Modifications Implemented:
Proactive update logic after receive operations was integrated into axdriver_virtio.
Related commit: axdriver_virtio
Receive decisions following Received event polling are now elevated from axdriver_virtio to the upper layer.
A pending_event queue was introduced to track Received events that were intentionally ignored due to either axnet's or virtio's ring buffer capacity being exhausted.
4.Redundant parameters (e.g., buf) were removed to streamline the interface.
Testing & Validation:
Performance Impact:
Before the fix: Communication was limited to one ACK per 1KB receive, with Starry achieving ~101 KB/s throughput.
After the fix: Starry’s receive throughput increased to ~2900 KB/s.