Re: [PATCH bpf-next] bpf: bpf_{g,s}etsockopt for struct bpf_sock

2020-04-29 Thread Martin KaFai Lau
On Tue, Apr 28, 2020 at 11:57:19AM -0700, Stanislav Fomichev wrote: > Currently, bpf_getsocktop and bpf_setsockopt helpers operate on the > 'struct bpf_sock_ops' context in BPF_PROG_TYPE_CGROUP_SOCKOPT program. > Let's generalize them and make the first argument be 'struct bpf_sock'. > That way, in

RE: [PATCH bpf-next] bpf: bpf_{g,s}etsockopt for struct bpf_sock

2020-04-28 Thread John Fastabend
Stanislav Fomichev wrote: > Currently, bpf_getsocktop and bpf_setsockopt helpers operate on the > 'struct bpf_sock_ops' context in BPF_PROG_TYPE_CGROUP_SOCKOPT program. > Let's generalize them and make the first argument be 'struct bpf_sock'. > That way, in the future, we can allow those helpers in

Re: [PATCH bpf-next] bpf: bpf_{g,s}etsockopt for struct bpf_sock

2020-04-28 Thread Alexei Starovoitov
On Tue, Apr 28, 2020 at 11:57:19AM -0700, Stanislav Fomichev wrote: > Currently, bpf_getsocktop and bpf_setsockopt helpers operate on the > 'struct bpf_sock_ops' context in BPF_PROG_TYPE_CGROUP_SOCKOPT program. > Let's generalize them and make the first argument be 'struct bpf_sock'. > That way, in