Skip to content

KFunc bpf_wq_set_callback

v7.0

Set callback function for a BPF workqueue.

Note

This kfunc supersedes bpf_wq_set_callback_impl, migrated to use implicit arguments in v7.0.

Definition

Parameters

wq: BPF workqueue object to operate on

callback_fn: callback function to set

flags: currently reserved, should be 0

Signature

int bpf_wq_set_callback(struct bpf_wq *wq, int (callback_fn)(void * , int * , void * ), unsigned int flags)

Usage

This kfunc sets the callback for workqueue object so that bpf_wq_start can execute it later.

Program types

The following program types can make use of this kfunc:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome