Re: [RFC PATCH net-next 07/15] bpf: Add setsockopt helper function to bpf

2017-06-13 Thread David Miller
From: Lawrence Brakmo Date: Tue, 13 Jun 2017 10:59:56 -0700 > +BPF_CALL_5(bpf_setsockopt, struct bpf_socket_ops_kern *, bpf_socket, > +int, level, int, optname, char *, optval, int, optlen) > +{ > + int val; > + int ret = 0; > + struct sock *sk = bpf_socket->sk; Longest to sh

[RFC PATCH net-next 07/15] bpf: Add setsockopt helper function to bpf

2017-06-13 Thread Lawrence Brakmo
Added support for calling a subset of socket setsockopts from BPF_PROG_TYPE_SOCKET_OPS programs. The code was duplicated rather than making the changes to call the socket setsockopt function because the changes required would have been larger. The ops supported are: SO_RCVBUF SO_SNDBUF SO_MA