Re: [PATCH v7 net-next 4/6] bpf: Add support for reading socket family, type, protocol

2016-12-01 Thread Alexei Starovoitov
On Thu, Dec 01, 2016 at 08:48:06AM -0800, David Ahern wrote: > Add socket family, type and protocol to bpf_sock allowing bpf programs > read-only access. > > Add __sk_flags_offset[0] to struct sock before the bitfield to > programmtically determine the offset of the unsigned int containing > proto

[PATCH v7 net-next 4/6] bpf: Add support for reading socket family, type, protocol

2016-12-01 Thread David Ahern
Add socket family, type and protocol to bpf_sock allowing bpf programs read-only access. Add __sk_flags_offset[0] to struct sock before the bitfield to programmtically determine the offset of the unsigned int containing protocol and type. Signed-off-by: David Ahern --- v7 - remove convert_sock_a