The function no longer returns 'unsigned long' as of commit edbf8c01de5a ("bpf: add skc_lookup_tcp helper").
Unified · Split
| @@ -6463,8 +6463,6 @@ static struct sock *sk_lookup(struct net *net, struct bpf_sock_tuple *tuple, · 6462 unmodified lines | |||
| 6463 | 6463 | ||
| 6464 | /* bpf_skc_lookup performs the core lookup for different types of sockets, | 6464 | /* bpf_skc_lookup performs the core lookup for different types of sockets, |
| 6465 | * taking a reference on the socket if it doesn't have the flag SOCK_RCU_FREE. | 6465 | * taking a reference on the socket if it doesn't have the flag SOCK_RCU_FREE. |
| 6466 | * Returns the socket as an 'unsigned long' to simplify the casting in the | ||
| 6467 | * callers to satisfy BPF_CALL declarations. | ||
| 6468 | */ | 6466 | */ |
| 6469 | static struct sock * | 6467 | static struct sock * |
| 6470 | __bpf_skc_lookup(struct sk_buff *skb, struct bpf_sock_tuple *tuple, u32 len, | 6468 | __bpf_skc_lookup(struct sk_buff *skb, struct bpf_sock_tuple *tuple, u32 len, |