diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2026-05-20 17:18:25 +0200 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-05-26 12:17:16 +0200 |
| commit | f8cace2fa5a743b33c4100c5b959d66d14f45a11 (patch) | |
| tree | 95c7603ba85d2971c4ececf2e914c04a6e8ef959 /test/tcp | |
| parent | 92845dd9f0450d54c135ccef6b118fc259ea8dad (diff) | |
| download | passt-f8cace2fa5a743b33c4100c5b959d66d14f45a11.tar passt-f8cace2fa5a743b33c4100c5b959d66d14f45a11.tar.gz passt-f8cace2fa5a743b33c4100c5b959d66d14f45a11.tar.bz2 passt-f8cace2fa5a743b33c4100c5b959d66d14f45a11.tar.lz passt-f8cace2fa5a743b33c4100c5b959d66d14f45a11.tar.xz passt-f8cace2fa5a743b33c4100c5b959d66d14f45a11.tar.zst passt-f8cace2fa5a743b33c4100c5b959d66d14f45a11.zip | |
tcp_vu: Build headers on the stack and write them into the iovec
tcp_vu_prepare() currently assumes the first iovec element provided by
the guest is large enough to hold all L2-L4 headers, and builds them
in place via pointer casts into iov[0].iov_base. This assumption is
enforced by an assert().
Since the headers in the buffer are uninitialized anyway, we can just
as well build the Ethernet, IP, and TCP headers on the stack instead,
and write them into the iovec with IOV_PUSH_HEADER(). This mirrors the
approach already used in udp_vu_prepare(), and prepares for support of
elements with multiple iovecs.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Jon Maloy <jmaloy@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/tcp')
0 files changed, 0 insertions, 0 deletions
