aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/test_skb_ctx.c
diff options
context:
space:
mode:
authorNikita V. Shirokov <tehnerd@tehnerd.com>2019-12-18 12:57:47 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-12-18 17:05:58 -0800
commit6de6c1f840c051017f2308503858ff19344c56b3 (patch)
tree7a2e27cb5f4e23ab53555c247f4fe25d972c4a83 /tools/testing/selftests/bpf/progs/test_skb_ctx.c
parentbpftool: Work-around rst2man conversion bug (diff)
downloadlinux-dev-6de6c1f840c051017f2308503858ff19344c56b3.tar.xz
linux-dev-6de6c1f840c051017f2308503858ff19344c56b3.zip
bpf: Allow to change skb mark in test_run
allow to pass skb's mark field into bpf_prog_test_run ctx for BPF_PROG_TYPE_SCHED_CLS prog type. that would allow to test bpf programs which are doing decision based on this field Signed-off-by: Nikita V. Shirokov <tehnerd@tehnerd.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to '')
-rw-r--r--tools/testing/selftests/bpf/progs/test_skb_ctx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_skb_ctx.c b/tools/testing/selftests/bpf/progs/test_skb_ctx.c
index 534fbf9a7344..e18da87fe84f 100644
--- a/tools/testing/selftests/bpf/progs/test_skb_ctx.c
+++ b/tools/testing/selftests/bpf/progs/test_skb_ctx.c
@@ -17,6 +17,7 @@ int process(struct __sk_buff *skb)
}
skb->priority++;
skb->tstamp++;
+ skb->mark++;
if (skb->wire_len != 100)
return 1;