Files
kernel_arpi/include/uapi/linux
Alexei Starovoitov db20fd2b01 bpf: add lookup/update/delete/iterate methods to BPF maps
'maps' is a generic storage of different types for sharing data between kernel
and userspace.

The maps are accessed from user space via BPF syscall, which has commands:

- create a map with given type and attributes
  fd = bpf(BPF_MAP_CREATE, union bpf_attr *attr, u32 size)
  returns fd or negative error

- lookup key in a given map referenced by fd
  err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size)
  using attr->map_fd, attr->key, attr->value
  returns zero and stores found elem into value or negative error

- create or update key/value pair in a given map
  err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size)
  using attr->map_fd, attr->key, attr->value
  returns zero or negative error

- find and delete element by key in a given map
  err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size)
  using attr->map_fd, attr->key

- iterate map elements (based on input key return next_key)
  err = bpf(BPF_MAP_GET_NEXT_KEY, union bpf_attr *attr, u32 size)
  using attr->map_fd, attr->key, attr->next_key

- close(fd) deletes the map

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-26 15:05:14 -04:00
..
2014-05-08 12:43:03 -04:00
2014-07-10 11:06:00 +01:00
2013-04-26 16:08:16 +10:00
2014-07-01 10:48:05 -06:00
2014-03-20 14:55:18 +01:00
2013-11-09 18:20:22 -05:00
2013-03-27 14:37:47 +00:00
2014-08-08 15:57:31 -07:00
2014-04-22 21:27:57 -04:00
2014-09-19 17:15:31 -04:00
2014-04-01 17:08:43 +02:00
2014-05-14 10:04:34 +01:00
2013-12-11 12:57:55 -08:00
2013-08-13 15:10:22 -07:00
2013-08-21 12:21:45 -07:00
2014-08-08 15:57:31 -07:00
2013-11-27 11:03:38 -08:00
2014-03-04 13:51:06 -05:00
2013-07-09 10:33:25 -07:00
2013-02-27 19:10:22 -08:00
2013-04-19 14:57:57 -04:00
2014-06-13 10:53:49 -04:00
2014-01-06 15:13:01 -05:00
2014-03-21 14:21:13 -04:00
2014-04-25 10:08:48 -07:00
2013-03-22 16:19:59 -07:00
2014-04-26 12:13:24 -04:00
2013-05-02 13:40:15 +03:00
2013-12-11 09:25:20 -02:00
2014-03-07 08:12:37 +01:00