KFunc bpf_rbtree_add_impl
Add 'node' to rbtree with root 'root' using comparator 'less'
Definition
The 'meta' and 'off' parameters are rewritten by the verifier, no need for BPF programs to set them
Returns
0
if the node was successfully added-EINVAL
if the node wasn't added because it's already in a tree
int bpf_rbtree_add_impl(struct bpf_rb_root *root, struct bpf_rb_node *node, bool (less)(struct bpf_rb_node * , const struct bpf_rb_node * ), void *meta__ign, u64 off)
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Program types
The following program types can make use of this kfunc:
- BPF_PROG_TYPE_LSM
- BPF_PROG_TYPE_SCHED_CLS
- BPF_PROG_TYPE_STRUCT_OPS
- BPF_PROG_TYPE_TRACING
- BPF_PROG_TYPE_XDP
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome