Re: [PATCH bpf-next v6 1/4] bpf: sockmap, refactor sockmap routines to work with hashmap

2018-05-16 Thread John Fastabend
On 05/15/2018 12:19 PM, Daniel Borkmann wrote: > On 05/14/2018 07:00 PM, John Fastabend wrote: > [...] [...] > > As you say in the comment above the function wrt locking notes that the > __sock_map_ctx_update_elem() can be called concurrently. > > All operations operate on sock_map using cmp

Re: [PATCH bpf-next v6 1/4] bpf: sockmap, refactor sockmap routines to work with hashmap

2018-05-15 Thread Daniel Borkmann
On 05/14/2018 07:00 PM, John Fastabend wrote: [...] > +static int __sock_map_ctx_update_elem(struct bpf_map *map, > + struct bpf_sock_progs *progs, > + struct sock *sock, > + struct sock **map_link

[PATCH bpf-next v6 1/4] bpf: sockmap, refactor sockmap routines to work with hashmap

2018-05-14 Thread John Fastabend
This patch only refactors the existing sockmap code. This will allow much of the psock initialization code path and bpf helper codes to work for both sockmap bpf map types that are backed by an array, the currently supported type, and the new hash backed bpf map type sockhash. Most the fallout com