On Fri, Feb 28, 2020 at 11:53:38AM +0000, Lorenz Bauer wrote: > The close, unhash and clone handlers from TCP sockmap are actually generic, > and can be reused by UDP sockmap. Move the helpers into the sockmap code Is clone reused in UDP? > base and expose them. This requires tcp_bpf_(re)init and tcp_bpf_clone to > be conditional on BPF_STREAM_PARSER. > [ ... ] > @@ -707,3 +659,4 @@ void tcp_bpf_clone(const struct sock *sk, struct sock *newsk) > if (prot == &tcp_bpf_prots[family][TCP_BPF_BASE]) > newsk->sk_prot = sk->sk_prot_creator; > } > +#endif /* CONFIG_BPF_STREAM_PARSER */ >