diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2026-05-13 13:52:12 +0200 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-05-20 01:21:24 +0200 |
| commit | ee0ba3f5db89904afc5cbedd9f8dd934eca3d738 (patch) | |
| tree | 9e2d11412483009e1601d453c2e7c1e597cd31bf /test/tcp/git: | |
| parent | d3a486858be2aa3e318047929e963cb4c02aa997 (diff) | |
| download | passt-ee0ba3f5db89904afc5cbedd9f8dd934eca3d738.tar passt-ee0ba3f5db89904afc5cbedd9f8dd934eca3d738.tar.gz passt-ee0ba3f5db89904afc5cbedd9f8dd934eca3d738.tar.bz2 passt-ee0ba3f5db89904afc5cbedd9f8dd934eca3d738.tar.lz passt-ee0ba3f5db89904afc5cbedd9f8dd934eca3d738.tar.xz passt-ee0ba3f5db89904afc5cbedd9f8dd934eca3d738.tar.zst passt-ee0ba3f5db89904afc5cbedd9f8dd934eca3d738.zip | |
udp_vu: Move virtqueue management from udp_vu_sock_recv() to its caller
udp_vu_sock_recv() currently mixes two concerns: receiving data from the
socket and managing virtqueue buffers (collecting, rewinding, releasing).
This makes the function harder to reason about and couples socket I/O
with virtqueue state.
Move all virtqueue operations, vu_collect(), vu_init_elem(),
vu_queue_rewind(), vu_set_vnethdr(), and the queue-readiness check, into
udp_vu_sock_to_tap(), which is the only caller. This turns
udp_vu_sock_recv() into a pure socket receive function that simply reads
into the provided iov array and adjusts its length.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/tcp/git:')
0 files changed, 0 insertions, 0 deletions
