aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/ctx_rewrite.c
diff options
context:
space:
mode:
authorMaxime Ripard <mripard@kernel.org>2024-07-30 09:09:23 +0200
committerMaxime Ripard <mripard@kernel.org>2024-07-30 09:09:23 +0200
commita1ff5a7d78a036d6c2178ee5acd6ba4946243800 (patch)
tree6652a7fba9fc417eaf327b7578447a4583ebd5da /tools/testing/selftests/bpf/prog_tests/ctx_rewrite.c
parentb5fbf924f125ba3638cfdc21c0515eb7e76264ca (diff)
parent8400291e289ee6b2bf9779ff1c83a291501f017b (diff)
Merge drm/drm-fixes into drm-misc-fixes
Let's start the new drm-misc-fixes cycle by bringing in 6.11-rc1. Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/ctx_rewrite.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/ctx_rewrite.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/ctx_rewrite.c b/tools/testing/selftests/bpf/prog_tests/ctx_rewrite.c
index 3b7c57fe55a5..08b6391f2f56 100644
--- a/tools/testing/selftests/bpf/prog_tests/ctx_rewrite.c
+++ b/tools/testing/selftests/bpf/prog_tests/ctx_rewrite.c
@@ -69,15 +69,17 @@ static struct test_case test_cases[] = {
{
N(SCHED_CLS, struct __sk_buff, tstamp),
.read = "r11 = *(u8 *)($ctx + sk_buff::__mono_tc_offset);"
- "w11 &= 3;"
- "if w11 != 0x3 goto pc+2;"
+ "if w11 & 0x4 goto pc+1;"
+ "goto pc+4;"
+ "if w11 & 0x3 goto pc+1;"
+ "goto pc+2;"
"$dst = 0;"
"goto pc+1;"
"$dst = *(u64 *)($ctx + sk_buff::tstamp);",
.write = "r11 = *(u8 *)($ctx + sk_buff::__mono_tc_offset);"
- "if w11 & 0x2 goto pc+1;"
+ "if w11 & 0x4 goto pc+1;"
"goto pc+2;"
- "w11 &= -2;"
+ "w11 &= -4;"
"*(u8 *)($ctx + sk_buff::__mono_tc_offset) = r11;"
"*(u64 *)($ctx + sk_buff::tstamp) = $src;",
},