Skip to content

Commit 6182e0b

Browse files
donaldhanakryiko
authored andcommitted
docs/bpf: Add missing BPF program types to docs
Update the table of program types in the libbpf documentation with the recently added program types. Signed-off-by: Donald Hunter <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent c229c17 commit 6182e0b

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

Documentation/bpf/libbpf/program_types.rst

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ described in more detail in the footnotes.
121121
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
122122
| ``BPF_PROG_TYPE_LWT_XMIT`` | | ``lwt_xmit`` | |
123123
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
124+
| ``BPF_PROG_TYPE_NETFILTER`` | | ``netfilter`` | |
125+
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
124126
| ``BPF_PROG_TYPE_PERF_EVENT`` | | ``perf_event`` | |
125127
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
126128
| ``BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE`` | | ``raw_tp.w+`` [#rawtp]_ | |
@@ -131,11 +133,23 @@ described in more detail in the footnotes.
131133
+ + +----------------------------------+-----------+
132134
| | | ``raw_tracepoint+`` | |
133135
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
134-
| ``BPF_PROG_TYPE_SCHED_ACT`` | | ``action`` | |
136+
| ``BPF_PROG_TYPE_SCHED_ACT`` | | ``action`` [#tc_legacy]_ | |
135137
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
136-
| ``BPF_PROG_TYPE_SCHED_CLS`` | | ``classifier`` | |
138+
| ``BPF_PROG_TYPE_SCHED_CLS`` | | ``classifier`` [#tc_legacy]_ | |
137139
+ + +----------------------------------+-----------+
138-
| | | ``tc`` | |
140+
| | | ``tc`` [#tc_legacy]_ | |
141+
+ +----------------------------------------+----------------------------------+-----------+
142+
| | ``BPF_NETKIT_PRIMARY`` | ``netkit/primary`` | |
143+
+ +----------------------------------------+----------------------------------+-----------+
144+
| | ``BPF_NETKIT_PEER`` | ``netkit/peer`` | |
145+
+ +----------------------------------------+----------------------------------+-----------+
146+
| | ``BPF_TCX_INGRESS`` | ``tc/ingress`` | |
147+
+ +----------------------------------------+----------------------------------+-----------+
148+
| | ``BPF_TCX_EGRESS`` | ``tc/egress`` | |
149+
+ +----------------------------------------+----------------------------------+-----------+
150+
| | ``BPF_TCX_INGRESS`` | ``tcx/ingress`` | |
151+
+ +----------------------------------------+----------------------------------+-----------+
152+
| | ``BPF_TCX_EGRESS`` | ``tcx/egress`` | |
139153
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
140154
| ``BPF_PROG_TYPE_SK_LOOKUP`` | ``BPF_SK_LOOKUP`` | ``sk_lookup`` | |
141155
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
@@ -155,7 +169,9 @@ described in more detail in the footnotes.
155169
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
156170
| ``BPF_PROG_TYPE_SOCK_OPS`` | ``BPF_CGROUP_SOCK_OPS`` | ``sockops`` | |
157171
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
158-
| ``BPF_PROG_TYPE_STRUCT_OPS`` | | ``struct_ops+`` | |
172+
| ``BPF_PROG_TYPE_STRUCT_OPS`` | | ``struct_ops+`` [#struct_ops]_ | |
173+
+ + +----------------------------------+-----------+
174+
| | | ``struct_ops.s+`` [#struct_ops]_ | Yes |
159175
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
160176
| ``BPF_PROG_TYPE_SYSCALL`` | | ``syscall`` | Yes |
161177
+-------------------------------------------+----------------------------------------+----------------------------------+-----------+
@@ -209,5 +225,11 @@ described in more detail in the footnotes.
209225
``a-zA-Z0-9_.*?``.
210226
.. [#lsm] The ``lsm`` attachment format is ``lsm[.s]/<hook>``.
211227
.. [#rawtp] The ``raw_tp`` attach format is ``raw_tracepoint[.w]/<tracepoint>``.
228+
.. [#tc_legacy] The ``tc``, ``classifier`` and ``action`` attach types are deprecated, use
229+
``tcx/*`` instead.
230+
.. [#struct_ops] The ``struct_ops`` attach format supports ``struct_ops[.s]/<name>`` convention,
231+
but ``name`` is ignored and it is recommended to just use plain
232+
``SEC("struct_ops[.s]")``. The attachments are defined in a struct initializer
233+
that is tagged with ``SEC(".struct_ops[.link]")``.
212234
.. [#tp] The ``tracepoint`` attach format is ``tracepoint/<category>/<name>``.
213235
.. [#iter] The ``iter`` attach format is ``iter[.s]/<struct-name>``.

0 commit comments

Comments
 (0)