History

bpf: Document BPF_PROG_TEST_RUN syscall command

Based on a brief read of the corresponding source code.

Joe Stringer committed 5 years ago

Commit 2a3fdca1 parent 32e76b11 file · +11 −3Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/bpf.h+11−3
@@ -306,14 +306,22 @@ union bpf_iter_link_info { · 305 unmodified lines
306306 *
307307 * BPF_PROG_TEST_RUN
308308 * Description
309− * Run an eBPF program a number of times against a provided
310− * program context and return the modified program context and
311− * duration of the test run.
309+ * Run the eBPF program associated with the *prog_fd* a *repeat*
310+ * number of times against a provided program context *ctx_in* and
311+ * data *data_in*, and return the modified program context
312+ * *ctx_out*, *data_out* (for example, packet data), result of the
313+ * execution *retval*, and *duration* of the test run.
312314 *
313315 * Return
314316 * Returns zero on success. On error, -1 is returned and *errno*
315317 * is set appropriately.
316318 *
319+ * **ENOSPC**
320+ * Either *data_size_out* or *ctx_size_out* is too small.
321+ * **ENOTSUPP**
322+ * This command is not supported by the program type of
323+ * the program referred to by *prog_fd*.
324+ *
317325 * BPF_PROG_GET_NEXT_ID
318326 * Description
319327 * Fetch the next eBPF program currently loaded into the kernel.