Files
msm-5.15/include/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-06 17:54:53 -04:00
2013-12-23 18:34:58 -08:00
2010-11-23 20:14:46 +00:00
2012-10-08 13:50:20 +10:30
2012-12-02 00:05:12 +00:00
2009-04-01 08:59:23 -07:00
2013-11-15 09:32:21 +09:00
2014-08-01 22:35:55 +08:00
2010-08-04 11:00:45 +02:00
2014-07-08 13:36:52 -07:00
2007-02-09 17:39:36 -05:00
2014-06-26 15:46:55 -03:00
2008-01-28 23:21:18 +01:00
2013-05-07 18:38:27 -07:00
2014-01-16 10:23:02 +10:30
2013-04-29 18:28:40 -07:00
2014-08-22 13:56:47 -07:00
2014-04-01 23:19:14 -04:00
2014-03-10 11:44:42 -04:00
2014-08-07 14:40:08 -04:00
2014-04-18 14:20:48 +02:00
2014-08-06 18:01:24 -07:00
2014-05-20 10:30:40 +09:00
2014-02-20 14:54:28 +01:00
2014-08-06 18:01:19 -07:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2014-08-19 10:19:39 -05:00
2014-06-06 16:08:13 -07:00
2014-06-02 16:05:24 -07:00
2014-06-02 14:56:01 -07:00
2005-04-16 15:20:36 -07:00
2012-03-20 12:47:48 +01:00
2010-08-09 20:45:05 -07:00
2014-07-08 09:40:06 +02:00
2014-04-17 12:30:40 -07:00
2014-06-16 16:26:54 +02:00
2014-03-13 12:11:00 +10:30
2007-10-17 08:42:52 -07:00
2012-05-31 17:49:32 -07:00
2014-07-22 21:55:45 +01:00
2014-01-25 08:55:09 +01:00
2013-12-11 15:52:34 +01:00
2014-05-27 17:38:11 -07:00
2014-07-17 22:07:37 +02:00
2014-03-04 13:51:06 -05:00
2014-01-27 21:02:39 -08:00
2014-04-01 23:19:10 -04:00
2012-12-11 17:22:27 -08:00
2014-04-07 10:59:19 -07:00
2014-07-09 14:58:37 +01:00
2014-06-04 16:54:07 -07:00
2011-03-31 11:26:23 -03:00
2014-06-04 16:54:21 -07:00
2014-07-15 22:40:22 +02:00
2010-02-10 17:47:17 -08:00
2014-06-04 16:54:12 -07:00
2014-09-13 12:30:26 -04:00
2013-12-19 19:09:38 -05:00
2014-08-08 15:57:26 -07:00
2014-08-08 15:57:31 -07:00
2013-09-10 18:56:32 -04:00
2014-08-06 13:03:44 +02:00
2005-04-16 15:20:36 -07:00
2014-06-12 00:21:11 -04:00
2014-02-15 11:55:28 -08:00
2014-02-17 15:01:37 -08:00
2010-08-09 16:48:44 -04:00
2013-04-30 15:50:12 +05:30
2014-08-08 15:57:17 -07:00
2014-06-04 16:53:57 -07:00
2005-04-16 15:20:36 -07:00
2014-08-08 15:57:24 -07:00
2014-08-22 21:28:02 -07:00
2014-06-04 16:53:56 -07:00
2012-08-21 16:28:31 +02:00
2012-10-09 16:22:32 +09:00
2014-05-14 09:46:32 -07:00
2010-11-29 08:55:25 +11:00
2014-08-08 15:57:22 -07:00
2005-04-16 15:20:36 -07:00
2014-09-16 15:02:55 -06:00
2014-06-04 16:53:57 -07:00
2014-04-07 16:35:53 -07:00
2014-06-04 16:53:57 -07:00