]> www.infradead.org Git - users/hch/misc.git/commit
selftests/bpf: Move open_tuntap to network helpers
authorMarcus Wichelmann <marcus.wichelmann@hetzner-cloud.de>
Wed, 5 Mar 2025 21:34:35 +0000 (21:34 +0000)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 6 Mar 2025 20:31:08 +0000 (12:31 -0800)
commitd5ca409c86d35ebe60fad08ed554797abd8e53c0
treec2f83d852be6ed8d5109515671c97bf744916ca4
parent0ca23a4d64ce6db0ec1e1f66559c115eb100e426
selftests/bpf: Move open_tuntap to network helpers

To test the XDP metadata functionality of the tun driver, it's necessary
to create a new tap device first. A helper function for this already
exists in lwt_helpers.h. Move it to the common network helpers header,
so it can be reused in other tests.

Signed-off-by: Marcus Wichelmann <marcus.wichelmann@hetzner-cloud.de>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250305213438.3863922-4-marcus.wichelmann@hetzner-cloud.de
tools/testing/selftests/bpf/network_helpers.c
tools/testing/selftests/bpf/network_helpers.h
tools/testing/selftests/bpf/prog_tests/lwt_helpers.h