aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_skb_helpers.c
diff options
context:
space:
mode:
authorJohn Fastabend <[email protected]>2020-05-24 09:51:36 -0700
committerAlexei Starovoitov <[email protected]>2020-06-01 14:38:20 -0700
commit1d9c037a898b3c0344cfe5064ba6c482bf9b46b0 (patch)
tree71f222c6cd12005abfa7cb7e8b20518e9040998e /tools/testing/selftests/bpf/progs/test_skb_helpers.c
parent13d70f5a5ecff367db2fb18ed4ebe433eab8a74c (diff)
bpf, selftests: Add sk_msg helpers load and attach test
The test itself is not particularly useful but it encodes a common pattern we have. Namely do a sk storage lookup then depending on data here decide if we need to do more work or alternatively allow packet to PASS. Then if we need to do more work consult task_struct for more information about the running task. Finally based on this additional information drop or pass the data. In this case the suspicious check is not so realisitic but it encodes the general pattern and uses the helpers so we test the workflow. This is a load test to ensure verifier correctly handles this case. Signed-off-by: John Fastabend <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/159033909665.12355.6166415847337547879.stgit@john-Precision-5820-Tower Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_skb_helpers.c')
0 files changed, 0 insertions, 0 deletions