RE: [PATCH bpf-next 8/8] selftests/bpf: Drop duplicate bpf_map_lookup_elem in test_sockmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  tools/testing/selftests/bpf/progs/test_sockmap_kern.h | 3 ---
>  1 file changed, 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 99d2ea9fb658..2399958991e7 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;
> -- 
> 2.43.0
> 

Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux