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