Re: [PATCH RFC v4 net-next 03/26] bpf: introduce syscall(BPF, ...) and BPF maps

2014-08-15 Thread Alexei Starovoitov
On Thu, Aug 14, 2014 at 3:28 PM, Brendan Gregg wrote: > On Wed, Aug 13, 2014 at 12:57 AM, Alexei Starovoitov > wrote: > [...] >> maps can have different types: hash, bloom filter, radix-tree, etc. >> >> The map is defined by: >> . type >> . max number of elements >> . key size in bytes >>

Re: [PATCH RFC v4 net-next 03/26] bpf: introduce syscall(BPF, ...) and BPF maps

2014-08-15 Thread Alexei Starovoitov
On Thu, Aug 14, 2014 at 3:28 PM, Brendan Gregg brendan.d.gr...@gmail.com wrote: On Wed, Aug 13, 2014 at 12:57 AM, Alexei Starovoitov a...@plumgrid.com wrote: [...] maps can have different types: hash, bloom filter, radix-tree, etc. The map is defined by: . type . max number of

Re: [PATCH RFC v4 net-next 03/26] bpf: introduce syscall(BPF, ...) and BPF maps

2014-08-14 Thread Brendan Gregg
On Wed, Aug 13, 2014 at 12:57 AM, Alexei Starovoitov wrote: [...] > maps can have different types: hash, bloom filter, radix-tree, etc. > > The map is defined by: > . type > . max number of elements > . key size in bytes > . value size in bytes Can values be strings or byte arrays? How

Re: [PATCH RFC v4 net-next 03/26] bpf: introduce syscall(BPF, ...) and BPF maps

2014-08-14 Thread Brendan Gregg
On Wed, Aug 13, 2014 at 12:57 AM, Alexei Starovoitov a...@plumgrid.com wrote: [...] maps can have different types: hash, bloom filter, radix-tree, etc. The map is defined by: . type . max number of elements . key size in bytes . value size in bytes Can values be strings or byte

[PATCH RFC v4 net-next 03/26] bpf: introduce syscall(BPF, ...) and BPF maps

2014-08-13 Thread Alexei Starovoitov
BPF syscall is a demux for different BPF releated commands. 'maps' is a generic storage of different types for sharing data between kernel and userspace. The maps can be created from user space via BPF syscall: - create a map with given type and attributes fd = bpf_map_create(map_type, struct

[PATCH RFC v4 net-next 03/26] bpf: introduce syscall(BPF, ...) and BPF maps

2014-08-13 Thread Alexei Starovoitov
BPF syscall is a demux for different BPF releated commands. 'maps' is a generic storage of different types for sharing data between kernel and userspace. The maps can be created from user space via BPF syscall: - create a map with given type and attributes fd = bpf_map_create(map_type, struct