diff options
author | Geliang Tang <tanggeliang@kylinos.cn> | 2024-05-23 14:50:04 +0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2024-06-03 19:32:55 +0200 |
commit | 49784c7979321c49a8055f5c588d24c34a8c55fc (patch) | |
tree | 795745b38bd3ba2226863dd1862353047fbade66 | |
parent | de1b5ea789dc28066cc8dc634b6825bd6148f38b (diff) |
selftests/bpf: Drop duplicate bpf_map_lookup_elem in test_sockmap
bpf_map_lookup_elem is invoked in bpf_prog3() already, no need to invoke
it again. This patch drops it.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/ea8458462b876ee445173e3effb535fd126137ed.1716446893.git.tanggeliang@kylinos.cn
-rw-r--r-- | tools/testing/selftests/bpf/progs/test_sockmap_kern.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_sockmap_kern.h b/tools/testing/selftests/bpf/progs/test_sockmap_kern.h index 3dff0813730b..f48f85f1bd70 100644 --- a/tools/testing/selftests/bpf/progs/test_sockmap_kern.h +++ b/tools/testing/selftests/bpf/progs/test_sockmap_kern.h @@ -177,9 +177,6 @@ int bpf_prog3(struct __sk_buff *skb) return bpf_sk_redirect_hash(skb, &tls_sock_map, &ret, flags); #endif } - f = bpf_map_lookup_elem(&sock_skb_opts, &one); - if (f && *f) - ret = SK_DROP; err = bpf_skb_adjust_room(skb, 4, 0, 0); if (err) return SK_DROP; |