From eb146eaf8a525cbaaf511a013d0dbb70bb1207b9 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 7 Nov 2023 21:11:31 +0100 Subject: sys/linux: describe BPF helper bpf_ringbuf_output This helper has the prototype: bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags) We need to prepare the second argument (R2) on the stack. We use an 8 bytes data value initialized to some random value on the stack and pointed to by R2. The third argument therefore needs to be 8 (for 8 bytes). Signed-off-by: Paul Chaignon --- sys/linux/bpf.txt.const | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/linux/bpf.txt.const') diff --git a/sys/linux/bpf.txt.const b/sys/linux/bpf.txt.const index 154f11b67..53cfb9bd7 100644 --- a/sys/linux/bpf.txt.const +++ b/sys/linux/bpf.txt.const @@ -66,6 +66,7 @@ BPF_EXIST = 2 BPF_EXIT0 = 9 BPF_FLOW_DISSECTOR = 17 BPF_FUNC_INFO_SIZE = 8 +BPF_FUNC_ringbuf_output = 130 BPF_FUNC_ringbuf_discard = 133 BPF_FUNC_ringbuf_reserve = 131 BPF_FUNC_ringbuf_submit = 132 -- cgit mrf-deployment