From: Joe Stringer Date: Tue, 2 Mar 2021 17:19:38 +0000 (-0800) Subject: bpf: Document BPF_PROG_TEST_RUN syscall command X-Git-Tag: accepted/tizen/unified/20230118.172025~7335^2~619^2~12^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a3fdca4e3bc7a01316277ba26f4090c4b19bf7c;p=platform%2Fkernel%2Flinux-rpi.git bpf: Document BPF_PROG_TEST_RUN syscall command Based on a brief read of the corresponding source code. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-7-joe@cilium.io --- diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index a8f2964..a6cd665 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -306,14 +306,22 @@ union bpf_iter_link_info { * * BPF_PROG_TEST_RUN * Description - * Run an eBPF program a number of times against a provided - * program context and return the modified program context and - * duration of the test run. + * Run the eBPF program associated with the *prog_fd* a *repeat* + * number of times against a provided program context *ctx_in* and + * data *data_in*, and return the modified program context + * *ctx_out*, *data_out* (for example, packet data), result of the + * execution *retval*, and *duration* of the test run. * * Return * Returns zero on success. On error, -1 is returned and *errno* * is set appropriately. * + * **ENOSPC** + * Either *data_size_out* or *ctx_size_out* is too small. + * **ENOTSUPP** + * This command is not supported by the program type of + * the program referred to by *prog_fd*. + * * BPF_PROG_GET_NEXT_ID * Description * Fetch the next eBPF program currently loaded into the kernel.