aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/bpf.txt.const
diff options
context:
space:
mode:
authorPaul Chaignon <paul@isovalent.com>2021-12-19 20:34:43 +0100
committerDmitry Vyukov <dvyukov@google.com>2021-12-21 05:33:37 +0100
commitb747e572ec589543e9ccb870158f467f7fa3d825 (patch)
treecc4eeb105cd902cb111bacd0d2f636d1d0292c35 /sys/linux/bpf.txt.const
parent5e875b312eef29ed23019a5819cec96ef3afdee0 (diff)
sys/linux: support map fd arrays
Commit [1] upstream introduced a new way to reference BPF maps in eBPF instructions. An array of BPF map fds is passed at program load time. Instructions can then reference fds in this array instead of carrying the fds directly. The goal is to allow BPF instructions to be immutable after compilation. Since we don't yet have a good way to reference indexes in an array, we define a new type map_fd_id for that purpose, with indexes between 0 and 16 only. 1 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=387544bfa291 Signed-off-by: Paul Chaignon <paul@isovalent.com>
Diffstat (limited to 'sys/linux/bpf.txt.const')
-rw-r--r--sys/linux/bpf.txt.const2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/linux/bpf.txt.const b/sys/linux/bpf.txt.const
index ebced303a..83ff643d5 100644
--- a/sys/linux/bpf.txt.const
+++ b/sys/linux/bpf.txt.const
@@ -193,6 +193,8 @@ BPF_PROG_TYPE_XDP = 6
BPF_PSEUDO_BTF_ID = 3
BPF_PSEUDO_CALL = 1
BPF_PSEUDO_MAP_FD = 1
+BPF_PSEUDO_MAP_IDX = 5
+BPF_PSEUDO_MAP_IDX_VALUE = 6
BPF_PSEUDO_MAP_VALUE = 2
BPF_REG_0 = 0
BPF_REG_1 = 1