diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2026-05-20 17:18:26 +0200 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-05-26 12:18:02 +0200 |
| commit | feb9a11d757dd6c07c1b2d1db507e0dde237d78b (patch) | |
| tree | f1d7b7e5465dde56b30c4a28b6ff1c2366fdd056 /test/tcp/git: | |
| parent | f8cace2fa5a743b33c4100c5b959d66d14f45a11 (diff) | |
| download | passt-feb9a11d757dd6c07c1b2d1db507e0dde237d78b.tar passt-feb9a11d757dd6c07c1b2d1db507e0dde237d78b.tar.gz passt-feb9a11d757dd6c07c1b2d1db507e0dde237d78b.tar.bz2 passt-feb9a11d757dd6c07c1b2d1db507e0dde237d78b.tar.lz passt-feb9a11d757dd6c07c1b2d1db507e0dde237d78b.tar.xz passt-feb9a11d757dd6c07c1b2d1db507e0dde237d78b.tar.zst passt-feb9a11d757dd6c07c1b2d1db507e0dde237d78b.zip | |
tcp_vu: Support multibuffer frames in tcp_vu_sock_recv()
Previously, tcp_vu_sock_recv() assumed a 1:1 mapping between virtqueue
elements and iovecs (one iovec per element), enforced by an ASSERT.
This prevented the use of virtqueue elements with multiple buffers
(e.g. when mergeable rx buffers are not negotiated and headers are
provided in a separate buffer).
Introduce a struct vu_frame to track per-frame metadata: the range of
elements and iovecs that make up each frame, and the frame's total size.
This replaces the head[] array which only tracked element indices.
A separate iov_msg[] array is built for recvmsg() by cloning the data
portions (after stripping headers) using iov_tail helpers.
Then a frame truncation after recvmsg() properly walks the frame and
element arrays to adjust iovec counts and element counts.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/tcp/git:')
0 files changed, 0 insertions, 0 deletions
