Re: [PATCH bpf-next v6 2/4] bpf: sockmap, add hash map support

2018-05-16 Thread Daniel Borkmann
On 05/15/2018 11:09 PM, Y Song wrote: > On Tue, May 15, 2018 at 12:01 PM, Daniel Borkmann > wrote: >> On 05/14/2018 07:00 PM, John Fastabend wrote: [...] >>> enum bpf_prog_type { >>> @@ -1855,6 +1856,52 @@ struct bpf_stack_build_id { >>> * Egress device index on success, 0 if packe

Re: [PATCH bpf-next v6 2/4] bpf: sockmap, add hash map support

2018-05-15 Thread Y Song
On Tue, May 15, 2018 at 12:01 PM, Daniel Borkmann wrote: > On 05/14/2018 07:00 PM, John Fastabend wrote: >> Sockmap is currently backed by an array and enforces keys to be >> four bytes. This works well for many use cases and was originally >> modeled after devmap which also uses four bytes keys.

Re: [PATCH bpf-next v6 2/4] bpf: sockmap, add hash map support

2018-05-15 Thread Daniel Borkmann
On 05/14/2018 07:00 PM, John Fastabend wrote: > Sockmap is currently backed by an array and enforces keys to be > four bytes. This works well for many use cases and was originally > modeled after devmap which also uses four bytes keys. However, > this has become limiting in larger use cases where a

[PATCH bpf-next v6 2/4] bpf: sockmap, add hash map support

2018-05-14 Thread John Fastabend
Sockmap is currently backed by an array and enforces keys to be four bytes. This works well for many use cases and was originally modeled after devmap which also uses four bytes keys. However, this has become limiting in larger use cases where a hash would be more appropriate. For example users may