]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Introduce bpf_map ID
authorMartin KaFai Lau <kafai@fb.com>
Mon, 5 Jun 2017 19:15:47 +0000 (12:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jun 2017 19:41:22 +0000 (15:41 -0400)
commit968a55683b99148a2922564164d1525debae0fb3
treeae79e214e4c8ea0d144f69ac8f0bf85b726752c0
parent0d97b96e7dd4e3d0cdc1135758ff516b9be0bcb5
bpf: Introduce bpf_map ID

This patch generates an unique ID for each created bpf_map.
The approach is similar to the earlier patch for bpf_prog ID.

It is worth to note that the bpf_map's ID and bpf_prog's ID
are in two independent ID spaces and both have the same valid range:
[1, INT_MAX).

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Alexei Starovoitov <ast@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf.h
kernel/bpf/syscall.c