-
Notifications
You must be signed in to change notification settings - Fork 150
selftests/bpf: networking test cleanups and build fix #10294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kernel-patches-daemon-bpf
wants to merge
5
commits into
bpf-next_base
Choose a base branch
from
series/1023883=>bpf-next
base: bpf-next_base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+87
−150
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author
|
Upstream branch: 4722981 |
…ect test The cls_redirect test uses a custom addr_port structure to represent IPv4/IPv6 addresses and ports. This custom wrapper requires extra conversion logic and specific helpers such as fill_addr_port(), which are no longer necessary when using standard socket address structures. This commit replaces addr_port with the standard sockaddr_storage so that test handles address families and ports using the native socket types. This removes the custom helper, eliminates redundant casts, and simplifies tuple handling without functional changes. Signed-off-by: Hoyeon Lee <[email protected]>
Author
|
Upstream branch: 4722981 |
…rt test The select_reuseport selftest uses a custom sa46 union to represent IPv4 and IPv6 addresses. This custom wrapper requires extra manual handling for address family and field extraction. Replace sa46 with sockaddr_storage and update the helper functions to operate on native socket structures. This simplifies the code and removes unnecessary custom address-handling logic. No functional changes intended. Signed-off-by: Hoyeon Lee <[email protected]>
Some BPF selftests contain identical copies of the min(), max(), before(), and after() helpers. These repeated snippets are the same across the tests and do not need to be defined separately. Move these helpers into bpf_tracing_net.h so they can be shared by TCP related BPF programs. This removes repeated code and keeps the helpers in a single place. Signed-off-by: Hoyeon Lee <[email protected]>
The connect4_prog and bpf_iter_setsockopt tests duplicate the same open-coded TCP congestion control string comparison logic. Since bpf_strncmp() provides the same functionality, use it instead to avoid repeated open-coded loops. This change applies only to functional BPF tests and does not affect the verifier performance benchmarks (veristat.cfg). No functional changes intended. Signed-off-by: Hoyeon Lee <[email protected]>
The selftests/bpf invokes a nested make when building runqslower, but
LLVM toolchain version (clang/llvm-strip) is not propagated. As a
result, runqslower is built with system default clang, not respecting
specified LLVM version.
# LLVM=-21 make -C tools/testing/selftests/bpf
...
make feature_display=0 -C /bpf/tools/bpf/runqslower \
OUTPUT=/bpf/tools/testing/selftests/bpf/tools/build/runqslower/ \
BPFOBJ_OUTPUT=/bpf/tools/testing/selftests/bpf/tools/build/libbpf/ \
BPFOBJ=/bpf/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.a \
BPF_INCLUDE=/bpf/tools/testing/selftests/bpf/tools/include \
BPFTOOL_OUTPUT=/bpf/tools/testing/selftests/bpf/tools/build/bpftool/ \
VMLINUX_BTF=/sys/kernel/btf/vmlinux BPF_TARGET_ENDIAN=--target=bpfel \
EXTRA_CFLAGS='-g -O0 ' EXTRA_LDFLAGS=' ' && \
cp /bpf/tools/testing/selftests/bpf/tools/build/runqslower/runqslower \
/bpf/tools/testing/selftests/bpf/runqslower
clang -g -O2 --target=bpfel -I/bpf/tools/testing/selftests/bpf/tools/build/runqslower/ \
-I/bpf/tools/testing/selftests/bpf/tools/include -I/bpf/tools/include/uapi \
-c runqslower.bpf.c -o /bpf/tools/testing/selftests/bpf/tools/build/runqslower/runqslower.bpf.o && \
llvm-strip -g /bpf/tools/testing/selftests/bpf/tools/build/runqslower//runqslower.bpf.o
/bin/sh: 1: clang: not found
Explicitly propagate CLANG and LLVM_STRIP to the runqslower sub-make so
that the LLVM toolchain selection from lib.mk is preserved.
Signed-off-by: Hoyeon Lee <[email protected]>
0bcb5fa to
a4a325c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: selftests/bpf: networking test cleanups and build fix
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1023883