Files
kernel_arpi/include/uapi/linux
Alexei Starovoitov 28fbcfa08d bpf: add array type of eBPF maps
add new map type BPF_MAP_TYPE_ARRAY and its implementation

- optimized for fastest possible lookup()
  . in the future verifier/JIT may recognize lookup() with constant key
    and optimize it into constant pointer. Can optimize non-constant
    key into direct pointer arithmetic as well, since pointers and
    value_size are constant for the life of the eBPF program.
    In other words array_map_lookup_elem() may be 'inlined' by verifier/JIT
    while preserving concurrent access to this map from user space

- two main use cases for array type:
  . 'global' eBPF variables: array of 1 element with key=0 and value is a
    collection of 'global' variables which programs can use to keep the state
    between events
  . aggregation of tracing events into fixed set of buckets

- all array elements pre-allocated and zero initialized at init time

- key as an index in array and can only be 4 byte

- map_delete_elem() returns EINVAL, since elements cannot be deleted

- map_update_elem() replaces elements in an non-atomic way
  (for atomic updates hashtable type should be used instead)

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-18 13:43:59 -05:00
..
2014-09-23 23:15:46 -07:00
2014-10-14 13:08:29 +11:00
2014-11-18 13:43:59 -05:00
2014-07-01 10:48:05 -06:00
2014-03-20 14:55:18 +01:00
2014-09-26 14:53:23 -04:00
2014-10-09 09:14:13 +02:00
2014-08-08 15:57:31 -07:00
2014-10-24 00:14:37 +02:00
2014-05-14 10:04:34 +01:00
2013-12-11 12:57:55 -08:00
2014-11-07 14:49:37 -05: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
2014-11-04 13:18:17 +01: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-10-28 10:46:08 +01:00
2014-04-26 12:13:24 -04:00
2013-12-11 09:25:20 -02:00