[PATCH net-next 2/4] bpf: align and clean bpf_{map,prog}_get helpers

2015-10-15 Thread Daniel Borkmann
Add a bpf_map_get() function that we're going to use later on and align/clean the remaining helpers a bit so that we have them a bit more consistent: - __bpf_map_get() and __bpf_prog_get() that both work on the fd struct, check whether the descriptor is eBPF and return the pointer to

[PATCH net-next 2/4] bpf: align and clean bpf_{map,prog}_get helpers

2015-10-15 Thread Daniel Borkmann
Add a bpf_map_get() function that we're going to use later on and align/clean the remaining helpers a bit so that we have them a bit more consistent: - __bpf_map_get() and __bpf_prog_get() that both work on the fd struct, check whether the descriptor is eBPF and return the pointer to