]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Cover 4-byte load from remote_port in bpf_sk_lookup
authorJakub Sitnicki <jakub@cloudflare.com>
Wed, 9 Feb 2022 18:43:33 +0000 (19:43 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 9 Feb 2022 19:40:45 +0000 (11:40 -0800)
commit613644e3144131c13ec233e2189a4641e2f7c4e9
tree427e6ef1e3229dae55160bdb5c69896f5ddfa7f5
parentd9b0837a0ae13128ae4b71a28c58d59f1164fcda
selftests/bpf: Cover 4-byte load from remote_port in bpf_sk_lookup

Extend the context access tests for sk_lookup prog to cover the surprising
case of a 4-byte load from the remote_port field, where the expected value
is actually shifted by 16 bits.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20220209184333.654927-3-jakub@cloudflare.com
tools/include/uapi/linux/bpf.h
tools/testing/selftests/bpf/progs/test_sk_lookup.c