diff options
| author | Geliang Tang <[email protected]> | 2024-05-23 06:50:04 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2024-06-03 17:32:55 +0000 |
| commit | 49784c7979321c49a8055f5c588d24c34a8c55fc (patch) | |
| tree | 795745b38bd3ba2226863dd1862353047fbade66 | |
| parent | selftests/bpf: Check length of recv in test_sockmap (diff) | |
| download | kernel-49784c7979321c49a8055f5c588d24c34a8c55fc.tar.gz kernel-49784c7979321c49a8055f5c588d24c34a8c55fc.zip | |
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 <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Tested-by: Jakub Sitnicki <[email protected]>
Acked-by: John Fastabend <[email protected]>
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; |
