Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helper-functions: add get_netns_cookie support for tc progs #129

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions data/helpers-functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ programs:
- name: bpf_get_smp_processor_id
- name: bpf_skb_under_cgroup
- name: bpf_get_socket_cookie
- name: bpf_get_netns_cookie
since:
version: 6.13
commit: eb62f49de7eca5917be8cebb3ad8aa3710af7021
- name: bpf_get_socket_uid
- name: bpf_fib_lookup
- name: bpf_check_mtu
Expand Down Expand Up @@ -418,6 +422,10 @@ programs:
- name: bpf_get_smp_processor_id
- name: bpf_skb_under_cgroup
- name: bpf_get_socket_cookie
- name: bpf_get_netns_cookie
since:
version: 6.13
commit: eb62f49de7eca5917be8cebb3ad8aa3710af7021
- name: bpf_get_socket_uid
- name: bpf_fib_lookup
- name: bpf_check_mtu
Expand Down
2 changes: 2 additions & 0 deletions docs/linux/helper-function/bpf_get_netns_cookie.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ This helper call can be used in the following program types:
* [`BPF_PROG_TYPE_CGROUP_SOCK`](../program-type/BPF_PROG_TYPE_CGROUP_SOCK.md)
* [`BPF_PROG_TYPE_CGROUP_SOCKOPT`](../program-type/BPF_PROG_TYPE_CGROUP_SOCKOPT.md)
* [`BPF_PROG_TYPE_CGROUP_SOCK_ADDR`](../program-type/BPF_PROG_TYPE_CGROUP_SOCK_ADDR.md)
* [`BPF_PROG_TYPE_SCHED_ACT`](../program-type/BPF_PROG_TYPE_SCHED_ACT.md) [:octicons-tag-24: v6.13](https://github.com/torvalds/linux/commit/eb62f49de7eca5917be8cebb3ad8aa3710af7021)
* [`BPF_PROG_TYPE_SCHED_CLS`](../program-type/BPF_PROG_TYPE_SCHED_CLS.md) [:octicons-tag-24: v6.13](https://github.com/torvalds/linux/commit/eb62f49de7eca5917be8cebb3ad8aa3710af7021)
* [`BPF_PROG_TYPE_SK_MSG`](../program-type/BPF_PROG_TYPE_SK_MSG.md)
* [`BPF_PROG_TYPE_SOCK_OPS`](../program-type/BPF_PROG_TYPE_SOCK_OPS.md)
<!-- [/HELPER_FUNC_PROG_REF] -->
Expand Down
1 change: 1 addition & 0 deletions docs/linux/program-type/BPF_PROG_TYPE_SCHED_ACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Not all helper functions are available in all program types. These are the helpe
* [`bpf_get_current_task_btf`](../helper-function/bpf_get_current_task_btf.md)
* [`bpf_get_hash_recalc`](../helper-function/bpf_get_hash_recalc.md)
* [`bpf_get_listener_sock`](../helper-function/bpf_get_listener_sock.md)
* [`bpf_get_netns_cookie`](../helper-function/bpf_get_netns_cookie.md) [:octicons-tag-24: v6.13](https://github.com/torvalds/linux/commit/eb62f49de7eca5917be8cebb3ad8aa3710af7021)
* [`bpf_get_ns_current_pid_tgid`](../helper-function/bpf_get_ns_current_pid_tgid.md) [:octicons-tag-24: v6.10](https://github.com/torvalds/linux/commit/eb166e522c77699fc19bfa705652327a1e51a117)
* [`bpf_get_numa_node_id`](../helper-function/bpf_get_numa_node_id.md)
* [`bpf_get_prandom_u32`](../helper-function/bpf_get_prandom_u32.md)
Expand Down
1 change: 1 addition & 0 deletions docs/linux/program-type/BPF_PROG_TYPE_SCHED_CLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ Not all helper functions are available in all program types. These are the helpe
* [`bpf_get_current_task_btf`](../helper-function/bpf_get_current_task_btf.md)
* [`bpf_get_hash_recalc`](../helper-function/bpf_get_hash_recalc.md)
* [`bpf_get_listener_sock`](../helper-function/bpf_get_listener_sock.md)
* [`bpf_get_netns_cookie`](../helper-function/bpf_get_netns_cookie.md) [:octicons-tag-24: v6.13](https://github.com/torvalds/linux/commit/eb62f49de7eca5917be8cebb3ad8aa3710af7021)
* [`bpf_get_ns_current_pid_tgid`](../helper-function/bpf_get_ns_current_pid_tgid.md) [:octicons-tag-24: v6.10](https://github.com/torvalds/linux/commit/eb166e522c77699fc19bfa705652327a1e51a117)
* [`bpf_get_numa_node_id`](../helper-function/bpf_get_numa_node_id.md)
* [`bpf_get_prandom_u32`](../helper-function/bpf_get_prandom_u32.md)
Expand Down