All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix
@ 2022-11-04 12:39 Bagas Sanjaya
  2022-11-04 13:16 ` KP Singh
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Bagas Sanjaya @ 2022-11-04 12:39 UTC (permalink / raw)
  To: bpf, linux-doc, linux-kernel
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Jonathan Corbet, David Vernet, Kumar Kartikeya Dwivedi,
	Bagas Sanjaya

Sphinx reported unknown target warning:

Documentation/bpf/bpf_design_QA.rst:329: WARNING: Unknown target name: "bpf".

The warning is caused by BPF type name prefix ("bpf_") which is written
without escaping the trailing underscore.

Escape the underscore to fix the warning. While at it, wrap the
containing paragraph in less than 80 characters.

Fixes: 9805af8d8a5b17 ("bpf: Document UAPI details for special BPF types")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/bpf/bpf_design_QA.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/bpf/bpf_design_QA.rst b/Documentation/bpf/bpf_design_QA.rst
index 4e4af398607b58..17e774d96c5e4b 100644
--- a/Documentation/bpf/bpf_design_QA.rst
+++ b/Documentation/bpf/bpf_design_QA.rst
@@ -326,11 +326,11 @@ size, type, and alignment, or any other user visible API or ABI detail across
 kernel releases. The users must adapt their BPF programs to the new changes and
 update them to make sure their programs continue to work correctly.
 
-NOTE: BPF subsystem specially reserves the 'bpf_' prefix for type names, in
+NOTE: BPF subsystem specially reserves the 'bpf\_' prefix for type names, in
 order to introduce more special fields in the future. Hence, user programs must
-avoid defining types with 'bpf_' prefix to not be broken in future releases. In
-other words, no backwards compatibility is guaranteed if one using a type in BTF
-with 'bpf_' prefix.
+avoid defining types with 'bpf\_' prefix to not be broken in future releases.
+In other words, no backwards compatibility is guaranteed if one using a type
+in BTF with 'bpf\_' prefix.
 
 Q: What is the compatibility story for special BPF types in local kptrs?
 ------------------------------------------------------------------------

base-commit: f71b2f64177a199d5b1d2047e155d45fd98f564a
-- 
An old man doll... just what I always wanted! - Clara


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

* Re: [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix
  2022-11-04 12:39 [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix Bagas Sanjaya
@ 2022-11-04 13:16 ` KP Singh
  2022-11-04 15:05 ` David Vernet
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: KP Singh @ 2022-11-04 13:16 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: bpf, linux-doc, linux-kernel, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, Stanislav Fomichev, Hao Luo,
	Jiri Olsa, Jonathan Corbet, David Vernet,
	Kumar Kartikeya Dwivedi

On Fri, Nov 4, 2022 at 1:39 PM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
>
> Sphinx reported unknown target warning:
>
> Documentation/bpf/bpf_design_QA.rst:329: WARNING: Unknown target name: "bpf".
>
> The warning is caused by BPF type name prefix ("bpf_") which is written
> without escaping the trailing underscore.
>
> Escape the underscore to fix the warning. While at it, wrap the
> containing paragraph in less than 80 characters.
>
> Fixes: 9805af8d8a5b17 ("bpf: Document UAPI details for special BPF types")
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>

Acked-by: KP Singh <kpsingh@kernel.org>

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

* Re: [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix
  2022-11-04 12:39 [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix Bagas Sanjaya
  2022-11-04 13:16 ` KP Singh
@ 2022-11-04 15:05 ` David Vernet
  2022-11-04 23:11 ` Andrii Nakryiko
  2022-11-04 23:20 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 7+ messages in thread
From: David Vernet @ 2022-11-04 15:05 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: bpf, linux-doc, linux-kernel, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Jonathan Corbet, Kumar Kartikeya Dwivedi

On Fri, Nov 04, 2022 at 07:39:14PM +0700, Bagas Sanjaya wrote:
> Sphinx reported unknown target warning:
> 
> Documentation/bpf/bpf_design_QA.rst:329: WARNING: Unknown target name: "bpf".
> 
> The warning is caused by BPF type name prefix ("bpf_") which is written
> without escaping the trailing underscore.
> 
> Escape the underscore to fix the warning. While at it, wrap the
> containing paragraph in less than 80 characters.
> 
> Fixes: 9805af8d8a5b17 ("bpf: Document UAPI details for special BPF types")
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>

Acked-by: David Vernet <void@manifault.com>

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

* Re: [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix
  2022-11-04 12:39 [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix Bagas Sanjaya
  2022-11-04 13:16 ` KP Singh
  2022-11-04 15:05 ` David Vernet
@ 2022-11-04 23:11 ` Andrii Nakryiko
  2022-11-05  0:05   ` Akira Yokosawa
  2022-11-04 23:20 ` patchwork-bot+netdevbpf
  3 siblings, 1 reply; 7+ messages in thread
From: Andrii Nakryiko @ 2022-11-04 23:11 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: bpf, linux-doc, linux-kernel, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Jonathan Corbet, David Vernet,
	Kumar Kartikeya Dwivedi

On Fri, Nov 4, 2022 at 5:39 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
>
> Sphinx reported unknown target warning:
>
> Documentation/bpf/bpf_design_QA.rst:329: WARNING: Unknown target name: "bpf".
>
> The warning is caused by BPF type name prefix ("bpf_") which is written
> without escaping the trailing underscore.
>
> Escape the underscore to fix the warning. While at it, wrap the
> containing paragraph in less than 80 characters.
>
> Fixes: 9805af8d8a5b17 ("bpf: Document UAPI details for special BPF types")
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>  Documentation/bpf/bpf_design_QA.rst | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>

Applied, thanks. But would the other similar case be problematic?

$ rg 'bpf_\b'
bpf_design_QA.rst
329:NOTE: BPF subsystem specially reserves the 'bpf_' prefix for type names, in
331:avoid defining types with 'bpf_' prefix to not be broken in future
releases. In
333:with 'bpf_' prefix.

libbpf/libbpf_naming_convention.rst
12:following prefixes: ``bpf_``, ``btf_``, ``libbpf_``, ``btf_dump_``,
59:described above should have ``libbpf_`` prefix, e.g.


> diff --git a/Documentation/bpf/bpf_design_QA.rst b/Documentation/bpf/bpf_design_QA.rst
> index 4e4af398607b58..17e774d96c5e4b 100644
> --- a/Documentation/bpf/bpf_design_QA.rst
> +++ b/Documentation/bpf/bpf_design_QA.rst
> @@ -326,11 +326,11 @@ size, type, and alignment, or any other user visible API or ABI detail across
>  kernel releases. The users must adapt their BPF programs to the new changes and
>  update them to make sure their programs continue to work correctly.
>
> -NOTE: BPF subsystem specially reserves the 'bpf_' prefix for type names, in
> +NOTE: BPF subsystem specially reserves the 'bpf\_' prefix for type names, in
>  order to introduce more special fields in the future. Hence, user programs must
> -avoid defining types with 'bpf_' prefix to not be broken in future releases. In
> -other words, no backwards compatibility is guaranteed if one using a type in BTF
> -with 'bpf_' prefix.
> +avoid defining types with 'bpf\_' prefix to not be broken in future releases.
> +In other words, no backwards compatibility is guaranteed if one using a type
> +in BTF with 'bpf\_' prefix.
>
>  Q: What is the compatibility story for special BPF types in local kptrs?
>  ------------------------------------------------------------------------
>
> base-commit: f71b2f64177a199d5b1d2047e155d45fd98f564a
> --
> An old man doll... just what I always wanted! - Clara
>

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

* Re: [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix
  2022-11-04 12:39 [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix Bagas Sanjaya
                   ` (2 preceding siblings ...)
  2022-11-04 23:11 ` Andrii Nakryiko
@ 2022-11-04 23:20 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-04 23:20 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: bpf, linux-doc, linux-kernel, ast, daniel, andrii, martin.lau,
	song, yhs, john.fastabend, kpsingh, sdf, haoluo, jolsa, corbet,
	void, memxor

Hello:

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

On Fri,  4 Nov 2022 19:39:14 +0700 you wrote:
> Sphinx reported unknown target warning:
> 
> Documentation/bpf/bpf_design_QA.rst:329: WARNING: Unknown target name: "bpf".
> 
> The warning is caused by BPF type name prefix ("bpf_") which is written
> without escaping the trailing underscore.
> 
> [...]

Here is the summary with links:
  - [bpf-next] Documentation: bpf: escape underscore in BPF type name prefix
    https://git.kernel.org/bpf/bpf-next/c/25906092edb4

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] 7+ messages in thread

* Re: [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix
  2022-11-04 23:11 ` Andrii Nakryiko
@ 2022-11-05  0:05   ` Akira Yokosawa
  2022-11-05  2:49     ` Bagas Sanjaya
  0 siblings, 1 reply; 7+ messages in thread
From: Akira Yokosawa @ 2022-11-05  0:05 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: andrii, ast, bagasdotme, bpf, corbet, daniel, haoluo,
	john.fastabend, jolsa, kpsingh, linux-doc, linux-kernel,
	martin.lau, memxor, sdf, song, void, yhs, Akira Yokosawa

Hi,

On Fri, 4 Nov 2022 16:11:10 -0700, Andrii Nakryiko wrote:
[...]
> Applied, thanks. But would the other similar case be problematic?
> 
> $ rg 'bpf_\b'
> bpf_design_QA.rst
> 329:NOTE: BPF subsystem specially reserves the 'bpf_' prefix for type names, in
> 331:avoid defining types with 'bpf_' prefix to not be broken in future
> releases. In
> 333:with 'bpf_' prefix.
> 
> libbpf/libbpf_naming_convention.rst
> 12:following prefixes: ``bpf_``, ``btf_``, ``libbpf_``, ``btf_dump_``,
> 59:described above should have ``libbpf_`` prefix, e.g.

Those other cases are all inside double back quotes and
construct "inline literal" strings. So they are fine.

Which means Bagas could have used the "inline literal" approach
instead.

Regards,
Akira


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

* Re: [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix
  2022-11-05  0:05   ` Akira Yokosawa
@ 2022-11-05  2:49     ` Bagas Sanjaya
  0 siblings, 0 replies; 7+ messages in thread
From: Bagas Sanjaya @ 2022-11-05  2:49 UTC (permalink / raw)
  To: Akira Yokosawa, Andrii Nakryiko
  Cc: andrii, ast, bpf, corbet, daniel, haoluo, john.fastabend, jolsa,
	kpsingh, linux-doc, linux-kernel, martin.lau, memxor, sdf, song,
	void, yhs

On 11/5/22 07:05, Akira Yokosawa wrote:
> Hi,
> 
> On Fri, 4 Nov 2022 16:11:10 -0700, Andrii Nakryiko wrote:
> [...]
>> Applied, thanks. But would the other similar case be problematic?
>>
>> $ rg 'bpf_\b'
>> bpf_design_QA.rst
>> 329:NOTE: BPF subsystem specially reserves the 'bpf_' prefix for type names, in
>> 331:avoid defining types with 'bpf_' prefix to not be broken in future
>> releases. In
>> 333:with 'bpf_' prefix.
>>
>> libbpf/libbpf_naming_convention.rst
>> 12:following prefixes: ``bpf_``, ``btf_``, ``libbpf_``, ``btf_dump_``,
>> 59:described above should have ``libbpf_`` prefix, e.g.
> 
> Those other cases are all inside double back quotes and
> construct "inline literal" strings. So they are fine.
> 
> Which means Bagas could have used the "inline literal" approach
> instead.
> 

Ah! I was oversighted (not seeing these other cases). Should I convert
fixed 'bpf_' to inline literals?

-- 
An old man doll... just what I always wanted! - Clara


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

end of thread, other threads:[~2022-11-05  2:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 12:39 [PATCH bpf-next] Documentation: bpf: escape underscore in BPF type name prefix Bagas Sanjaya
2022-11-04 13:16 ` KP Singh
2022-11-04 15:05 ` David Vernet
2022-11-04 23:11 ` Andrii Nakryiko
2022-11-05  0:05   ` Akira Yokosawa
2022-11-05  2:49     ` Bagas Sanjaya
2022-11-04 23:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.