Files
linux/tools/testing/vsock/vsock_test_zerocopy.h
Michal Luczaj a63e5fe095 vsock/test: Add test for a linear and non-linear skb getting coalesced
Loopback transport can mangle data in rx queue when a linear skb is
followed by a small MSG_ZEROCOPY packet.

To exercise the logic, send out two packets: a weirdly sized one (to ensure
some spare tail room in the skb) and a zerocopy one that's small enough to
fit in the spare room of its predecessor. Then, wait for both to land in
the rx queue, and check the data received. Faulty packets merger manifests
itself by corrupting payload of the later packet.

Signed-off-by: Michal Luczaj <mhal@rbox.co>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://patch.msgid.link/20260113-vsock-recv-coalescence-v2-2-552b17837cf4@rbox.co
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-15 19:44:44 -08:00

19 lines
716 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef VSOCK_TEST_ZEROCOPY_H
#define VSOCK_TEST_ZEROCOPY_H
#include "util.h"
void test_stream_msgzcopy_client(const struct test_opts *opts);
void test_stream_msgzcopy_server(const struct test_opts *opts);
void test_seqpacket_msgzcopy_client(const struct test_opts *opts);
void test_seqpacket_msgzcopy_server(const struct test_opts *opts);
void test_stream_msgzcopy_empty_errq_client(const struct test_opts *opts);
void test_stream_msgzcopy_empty_errq_server(const struct test_opts *opts);
void test_stream_msgzcopy_mangle_client(const struct test_opts *opts);
void test_stream_msgzcopy_mangle_server(const struct test_opts *opts);
#endif /* VSOCK_TEST_ZEROCOPY_H */