Skip to contentSkip to conversation

Documentation: bpf: escape underscore in BPF type name prefix

PATCH Applied Bagas Sanjaya 6 participants 7 messages Nov 4, 2022 – Nov 5, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: bpf: escape underscore in BPF type name prefix

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")
---
 Documentation/bpf/bpf_design_QA.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/bpf/bpf_design_QA.rst +4 -4
index 4e4af398607b58..17e774d96c5e4b 100644
@@ -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

Signature · 1 line
An old man doll... just what I always wanted! - Clara
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Bagas Sanjaya

Sphinx reported unknown target warning:

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

Quoted 8 lines

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")
Acked-by on v1 1/1
#2 lore raw
In reply to Bagas Sanjaya
Quoted 4 lines · Bagas Sanjaya

Sphinx reported unknown target warning:

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

Quoted 8 lines

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")
#3 lore raw
In reply to Bagas Sanjaya
Quoted 8 lines · 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.

Quoted 9 lines

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")
---
 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.

Quoted 25 lines
Documentation/bpf/bpf_design_QA.rst +4 -4
index 4e4af398607b58..17e774d96c5e4b 100644
@@ -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

#4 lore raw

Hi,

On Fri, 4 Nov 2022 16:11:10 -0700, Andrii Nakryiko wrote:
[...]

Quoted 9 lines

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.
Quoted 3 lines

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

#5 lore raw
Quoted 17 lines · Akira Yokosawa

Hi,

On Fri, 4 Nov 2022 16:11:10 -0700, Andrii Nakryiko wrote:
[...]

Quoted 9 lines

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.
Quoted 3 lines

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

Quoted 6 lines

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?

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#6 lore raw
In reply to Bagas Sanjaya
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:

Hello:

This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:

Quoted 8 lines · 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html