linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2] docs/bpf: Add missing BPF program types to docs
@ 2024-09-12  9:59 Donald Hunter
  2024-09-12 17:57 ` Andrii Nakryiko
  2024-09-12 18:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Donald Hunter @ 2024-09-12  9:59 UTC (permalink / raw)
  To: bpf, linux-doc, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko
  Cc: Jonathan Corbet, Donald Hunter

Update the table of program types in the libbpf documentation with the
recently added program types.

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
---
 Documentation/bpf/libbpf/program_types.rst | 30 +++++++++++++++++++---
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/Documentation/bpf/libbpf/program_types.rst b/Documentation/bpf/libbpf/program_types.rst
index 63bb88846e50..09bb834aa827 100644
--- a/Documentation/bpf/libbpf/program_types.rst
+++ b/Documentation/bpf/libbpf/program_types.rst
@@ -121,6 +121,8 @@ described in more detail in the footnotes.
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
 | ``BPF_PROG_TYPE_LWT_XMIT``                |                                        | ``lwt_xmit``                     |           |
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
+| ``BPF_PROG_TYPE_NETFILTER``               |                                        | ``netfilter``                    |           |
++-------------------------------------------+----------------------------------------+----------------------------------+-----------+
 | ``BPF_PROG_TYPE_PERF_EVENT``              |                                        | ``perf_event``                   |           |
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
 | ``BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE`` |                                        | ``raw_tp.w+`` [#rawtp]_          |           |
@@ -131,11 +133,23 @@ described in more detail in the footnotes.
 +                                           +                                        +----------------------------------+-----------+
 |                                           |                                        | ``raw_tracepoint+``              |           |
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
-| ``BPF_PROG_TYPE_SCHED_ACT``               |                                        | ``action``                       |           |
+| ``BPF_PROG_TYPE_SCHED_ACT``               |                                        | ``action`` [#tc_legacy]_         |           |
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
-| ``BPF_PROG_TYPE_SCHED_CLS``               |                                        | ``classifier``                   |           |
+| ``BPF_PROG_TYPE_SCHED_CLS``               |                                        | ``classifier`` [#tc_legacy]_     |           |
 +                                           +                                        +----------------------------------+-----------+
-|                                           |                                        | ``tc``                           |           |
+|                                           |                                        | ``tc`` [#tc_legacy]_             |           |
++                                           +----------------------------------------+----------------------------------+-----------+
+|                                           | ``BPF_NETKIT_PRIMARY``                 | ``netkit/primary``               |           |
++                                           +----------------------------------------+----------------------------------+-----------+
+|                                           | ``BPF_NETKIT_PEER``                    | ``netkit/peer``                  |           |
++                                           +----------------------------------------+----------------------------------+-----------+
+|                                           | ``BPF_TCX_INGRESS``                    | ``tc/ingress``                   |           |
++                                           +----------------------------------------+----------------------------------+-----------+
+|                                           | ``BPF_TCX_EGRESS``                     | ``tc/egress``                    |           |
++                                           +----------------------------------------+----------------------------------+-----------+
+|                                           | ``BPF_TCX_INGRESS``                    | ``tcx/ingress``                  |           |
++                                           +----------------------------------------+----------------------------------+-----------+
+|                                           | ``BPF_TCX_EGRESS``                     | ``tcx/egress``                   |           |
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
 | ``BPF_PROG_TYPE_SK_LOOKUP``               | ``BPF_SK_LOOKUP``                      | ``sk_lookup``                    |           |
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
@@ -155,7 +169,9 @@ described in more detail in the footnotes.
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
 | ``BPF_PROG_TYPE_SOCK_OPS``                | ``BPF_CGROUP_SOCK_OPS``                | ``sockops``                      |           |
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
-| ``BPF_PROG_TYPE_STRUCT_OPS``              |                                        | ``struct_ops+``                  |           |
+| ``BPF_PROG_TYPE_STRUCT_OPS``              |                                        | ``struct_ops+`` [#struct_ops]_   |           |
++                                           +                                        +----------------------------------+-----------+
+|                                           |                                        | ``struct_ops.s+`` [#struct_ops]_ | Yes       |
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
 | ``BPF_PROG_TYPE_SYSCALL``                 |                                        | ``syscall``                      | Yes       |
 +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
@@ -209,5 +225,11 @@ described in more detail in the footnotes.
               ``a-zA-Z0-9_.*?``.
 .. [#lsm] The ``lsm`` attachment format is ``lsm[.s]/<hook>``.
 .. [#rawtp] The ``raw_tp`` attach format is ``raw_tracepoint[.w]/<tracepoint>``.
+.. [#tc_legacy] The ``tc``, ``classifier`` and ``action`` attach types are deprecated, use
+                ``tcx/*`` instead.
+.. [#struct_ops] The ``struct_ops`` attach format is ``struct_ops[.s]/<name>``, but ``name`` is
+                 ignored and it is recommended to just use ``SEC("struct_ops[.s]")``. The
+                 attachments are defined in a struct initializer that is tagged with
+                 ``SEC(".struct_ops[.link]")``.
 .. [#tp] The ``tracepoint`` attach format is ``tracepoint/<category>/<name>``.
 .. [#iter] The ``iter`` attach format is ``iter[.s]/<struct-name>``.
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next v2] docs/bpf: Add missing BPF program types to docs
  2024-09-12  9:59 [PATCH bpf-next v2] docs/bpf: Add missing BPF program types to docs Donald Hunter
@ 2024-09-12 17:57 ` Andrii Nakryiko
  2024-09-12 18:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Andrii Nakryiko @ 2024-09-12 17:57 UTC (permalink / raw)
  To: Donald Hunter
  Cc: bpf, linux-doc, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Jonathan Corbet

On Thu, Sep 12, 2024 at 2:59 AM Donald Hunter <donald.hunter@gmail.com> wrote:
>
> Update the table of program types in the libbpf documentation with the
> recently added program types.
>
> Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
> ---
>  Documentation/bpf/libbpf/program_types.rst | 30 +++++++++++++++++++---
>  1 file changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/bpf/libbpf/program_types.rst b/Documentation/bpf/libbpf/program_types.rst
> index 63bb88846e50..09bb834aa827 100644
> --- a/Documentation/bpf/libbpf/program_types.rst
> +++ b/Documentation/bpf/libbpf/program_types.rst
> @@ -121,6 +121,8 @@ described in more detail in the footnotes.
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
>  | ``BPF_PROG_TYPE_LWT_XMIT``                |                                        | ``lwt_xmit``                     |           |
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
> +| ``BPF_PROG_TYPE_NETFILTER``               |                                        | ``netfilter``                    |           |
> ++-------------------------------------------+----------------------------------------+----------------------------------+-----------+
>  | ``BPF_PROG_TYPE_PERF_EVENT``              |                                        | ``perf_event``                   |           |
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
>  | ``BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE`` |                                        | ``raw_tp.w+`` [#rawtp]_          |           |
> @@ -131,11 +133,23 @@ described in more detail in the footnotes.
>  +                                           +                                        +----------------------------------+-----------+
>  |                                           |                                        | ``raw_tracepoint+``              |           |
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
> -| ``BPF_PROG_TYPE_SCHED_ACT``               |                                        | ``action``                       |           |
> +| ``BPF_PROG_TYPE_SCHED_ACT``               |                                        | ``action`` [#tc_legacy]_         |           |
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
> -| ``BPF_PROG_TYPE_SCHED_CLS``               |                                        | ``classifier``                   |           |
> +| ``BPF_PROG_TYPE_SCHED_CLS``               |                                        | ``classifier`` [#tc_legacy]_     |           |
>  +                                           +                                        +----------------------------------+-----------+
> -|                                           |                                        | ``tc``                           |           |
> +|                                           |                                        | ``tc`` [#tc_legacy]_             |           |
> ++                                           +----------------------------------------+----------------------------------+-----------+
> +|                                           | ``BPF_NETKIT_PRIMARY``                 | ``netkit/primary``               |           |
> ++                                           +----------------------------------------+----------------------------------+-----------+
> +|                                           | ``BPF_NETKIT_PEER``                    | ``netkit/peer``                  |           |
> ++                                           +----------------------------------------+----------------------------------+-----------+
> +|                                           | ``BPF_TCX_INGRESS``                    | ``tc/ingress``                   |           |
> ++                                           +----------------------------------------+----------------------------------+-----------+
> +|                                           | ``BPF_TCX_EGRESS``                     | ``tc/egress``                    |           |
> ++                                           +----------------------------------------+----------------------------------+-----------+
> +|                                           | ``BPF_TCX_INGRESS``                    | ``tcx/ingress``                  |           |
> ++                                           +----------------------------------------+----------------------------------+-----------+
> +|                                           | ``BPF_TCX_EGRESS``                     | ``tcx/egress``                   |           |
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
>  | ``BPF_PROG_TYPE_SK_LOOKUP``               | ``BPF_SK_LOOKUP``                      | ``sk_lookup``                    |           |
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
> @@ -155,7 +169,9 @@ described in more detail in the footnotes.
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
>  | ``BPF_PROG_TYPE_SOCK_OPS``                | ``BPF_CGROUP_SOCK_OPS``                | ``sockops``                      |           |
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
> -| ``BPF_PROG_TYPE_STRUCT_OPS``              |                                        | ``struct_ops+``                  |           |
> +| ``BPF_PROG_TYPE_STRUCT_OPS``              |                                        | ``struct_ops+`` [#struct_ops]_   |           |
> ++                                           +                                        +----------------------------------+-----------+
> +|                                           |                                        | ``struct_ops.s+`` [#struct_ops]_ | Yes       |
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
>  | ``BPF_PROG_TYPE_SYSCALL``                 |                                        | ``syscall``                      | Yes       |
>  +-------------------------------------------+----------------------------------------+----------------------------------+-----------+
> @@ -209,5 +225,11 @@ described in more detail in the footnotes.
>                ``a-zA-Z0-9_.*?``.
>  .. [#lsm] The ``lsm`` attachment format is ``lsm[.s]/<hook>``.
>  .. [#rawtp] The ``raw_tp`` attach format is ``raw_tracepoint[.w]/<tracepoint>``.
> +.. [#tc_legacy] The ``tc``, ``classifier`` and ``action`` attach types are deprecated, use
> +                ``tcx/*`` instead.
> +.. [#struct_ops] The ``struct_ops`` attach format is ``struct_ops[.s]/<name>``, but ``name`` is

I slightly modified this to:

The ``struct_ops`` attach format supports ``struct_ops[.s]/<name>``
convention, but ...

Pushed to bpf-next, thanks.

> +                 ignored and it is recommended to just use ``SEC("struct_ops[.s]")``. The
> +                 attachments are defined in a struct initializer that is tagged with
> +                 ``SEC(".struct_ops[.link]")``.
>  .. [#tp] The ``tracepoint`` attach format is ``tracepoint/<category>/<name>``.
>  .. [#iter] The ``iter`` attach format is ``iter[.s]/<struct-name>``.
> --
> 2.45.2
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next v2] docs/bpf: Add missing BPF program types to docs
  2024-09-12  9:59 [PATCH bpf-next v2] docs/bpf: Add missing BPF program types to docs Donald Hunter
  2024-09-12 17:57 ` Andrii Nakryiko
@ 2024-09-12 18:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-09-12 18:00 UTC (permalink / raw)
  To: Donald Hunter; +Cc: bpf, linux-doc, ast, daniel, andrii, corbet

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Thu, 12 Sep 2024 10:59:44 +0100 you wrote:
> Update the table of program types in the libbpf documentation with the
> recently added program types.
> 
> Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
> ---
>  Documentation/bpf/libbpf/program_types.rst | 30 +++++++++++++++++++---
>  1 file changed, 26 insertions(+), 4 deletions(-)

Here is the summary with links:
  - [bpf-next,v2] docs/bpf: Add missing BPF program types to docs
    https://git.kernel.org/bpf/bpf-next/c/6182e0b80f9b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-12 18:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12  9:59 [PATCH bpf-next v2] docs/bpf: Add missing BPF program types to docs Donald Hunter
2024-09-12 17:57 ` Andrii Nakryiko
2024-09-12 18:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).