selftests/bpf: convert static to global in tc_redirect progs
Subsystems (5)
PATCH 1/1 selftests/bpf: convert static to global in tc_redirect progs
Both IFINDEX_SRC and IFINDEX_DST are set from the userspace and it won't work once bpf merges with bpf-next.
Fixes 096eccdef0b3 ("selftests/bpf: Rewrite test_tc_redirect.sh as prog_tests/tc_redirect.c")
Signed-off-by Stanislav Fomichev <[email protected]>
--- tools/testing/selftests/bpf/progs/test_tc_neigh.c | 4 ++-- tools/testing/selftests/bpf/progs/test_tc_peer.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
tools/testing/selftests/bpf/progs/test_tc_neigh.c +2 -2
@@ -33,8 +33,8 @@ a.s6_addr32[3] == b.s6_addr32[3])#endif -static volatile const __u32 IFINDEX_SRC ; -static volatile const __u32 IFINDEX_DST ; +volatile const __u32 IFINDEX_SRC ; +volatile const __u32 IFINDEX_DST ; static __always_inline bool is_remote_ep_v4(struct __sk_buff *skb,__be32 addr)
tools/testing/selftests/bpf/progs/test_tc_peer.c +2 -2
@@ -8,8 +8,8 @@#include <bpf/bpf_helpers.h> -static volatile const __u32 IFINDEX_SRC ; -static volatile const __u32 IFINDEX_DST ; +volatile const __u32 IFINDEX_SRC ; +volatile const __u32 IFINDEX_DST ; SEC("classifier/chk_egress")int tc_chk (struct __sk_buff *skb)
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
This patch was applied to bpf/bpf.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf.git (refs/heads/master):
Quoted 9 lines · On Fri, 14 May 2021 10:05:28 -0700 you wrote:
Both
IFINDEX_SRCandIFINDEX_DSTare set from the userspace and it won't work once bpf merges with bpf-next.Fixes 096eccdef0b3 ("selftests/bpf: Rewrite test_tc_redirect.sh as prog_tests/tc_redirect.c")Signed-off-by Stanislav Fomichev <[email protected]>--- tools/testing/selftests/bpf/progs/test_tc_neigh.c | 4 ++-- tools/testing/selftests/bpf/progs/test_tc_peer.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Here is the summary with links:
- [bpf] selftests/bpf: convert static to global in tc_redirect progs
https://git.kernel.org/bpf/bpf/c/c9a7c013569d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html