diff mbox series

[04/35] Documentation: bpf: correct spelling

Message ID 20230127064005.1558-5-rdunlap@infradead.org (mailing list archive)
State Accepted
Commit 1d3cab43f4c73936ba55820a0501469e36ed6dd3
Delegated to: BPF
Headers show
Series Documentation: correct lots of spelling errors (series 1) | expand

Checks

Context Check Description
bpf/vmtest-bpf-next-PR success PR summary
bpf/vmtest-bpf-next-VM_Test-34 success Logs for test_verifier on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-35 success Logs for test_verifier on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-37 success Logs for test_verifier on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-38 success Logs for test_verifier on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-10 success Logs for test_maps on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-12 success Logs for test_maps on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-13 success Logs for test_maps on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-14 success Logs for test_progs on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-15 success Logs for test_progs on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-17 success Logs for test_progs on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-18 success Logs for test_progs on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-19 success Logs for test_progs_no_alu32 on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-20 success Logs for test_progs_no_alu32 on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-22 success Logs for test_progs_no_alu32 on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-23 success Logs for test_progs_no_alu32 on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-24 success Logs for test_progs_no_alu32_parallel on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-25 success Logs for test_progs_no_alu32_parallel on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-27 success Logs for test_progs_no_alu32_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-28 success Logs for test_progs_no_alu32_parallel on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-29 success Logs for test_progs_parallel on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-30 success Logs for test_progs_parallel on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-32 success Logs for test_progs_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-33 success Logs for test_progs_parallel on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-21 success Logs for test_progs_no_alu32 on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-36 success Logs for test_verifier on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-16 success Logs for test_progs on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-26 success Logs for test_progs_no_alu32_parallel on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-31 success Logs for test_progs_parallel on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-11 success Logs for test_maps on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-4 success Logs for build for aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-9 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-1 success Logs for ShellCheck
bpf/vmtest-bpf-next-VM_Test-2 success Logs for build for aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-3 success Logs for build for aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-5 success Logs for build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-6 success Logs for build for x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-7 success Logs for llvm-toolchain
bpf/vmtest-bpf-next-VM_Test-8 success Logs for set-matrix

Commit Message

Randy Dunlap Jan. 27, 2023, 6:39 a.m. UTC
Correct spelling problems for Documentation/bpf/ as reported
by codespell.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: bpf@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
---
 Documentation/bpf/libbpf/libbpf_naming_convention.rst |    6 +++---
 Documentation/bpf/map_xskmap.rst                      |    2 +-
 Documentation/bpf/ringbuf.rst                         |    4 ++--
 Documentation/bpf/verifier.rst                        |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

Comments

Bagas Sanjaya Jan. 27, 2023, 8:29 a.m. UTC | #1
On Thu, Jan 26, 2023 at 10:39:34PM -0800, Randy Dunlap wrote:
> diff -- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst b/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> --- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> +++ b/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> @@ -83,8 +83,8 @@ This prevents from accidentally exportin
>  to be a part of ABI what, in turn, improves both libbpf developer- and
>  user-experiences.
>  
> -ABI versionning
> ----------------
> +ABI versioning
> +--------------
>  
>  To make future ABI extensions possible libbpf ABI is versioned.
>  Versioning is implemented by ``libbpf.map`` version script that is
> @@ -148,7 +148,7 @@ API documentation convention
>  The libbpf API is documented via comments above definitions in
>  header files. These comments can be rendered by doxygen and sphinx
>  for well organized html output. This section describes the
> -convention in which these comments should be formated.
> +convention in which these comments should be formatted.
>  
>  Here is an example from btf.h:
>  
> diff -- a/Documentation/bpf/map_xskmap.rst b/Documentation/bpf/map_xskmap.rst
> --- a/Documentation/bpf/map_xskmap.rst
> +++ b/Documentation/bpf/map_xskmap.rst
> @@ -178,7 +178,7 @@ The following code snippet shows how to
>  
>  For an example on how create AF_XDP sockets, please see the AF_XDP-example and
>  AF_XDP-forwarding programs in the `bpf-examples`_ directory in the `libxdp`_ repository.
> -For a detailed explaination of the AF_XDP interface please see:
> +For a detailed explanation of the AF_XDP interface please see:
>  
>  - `libxdp-readme`_.
>  - `AF_XDP`_ kernel documentation.
> diff -- a/Documentation/bpf/ringbuf.rst b/Documentation/bpf/ringbuf.rst
> --- a/Documentation/bpf/ringbuf.rst
> +++ b/Documentation/bpf/ringbuf.rst
> @@ -124,7 +124,7 @@ buffer.  Currently 4 are supported:
>  
>  - ``BPF_RB_AVAIL_DATA`` returns amount of unconsumed data in ring buffer;
>  - ``BPF_RB_RING_SIZE`` returns the size of ring buffer;
> -- ``BPF_RB_CONS_POS``/``BPF_RB_PROD_POS`` returns current logical possition
> +- ``BPF_RB_CONS_POS``/``BPF_RB_PROD_POS`` returns current logical position
>    of consumer/producer, respectively.
>  
>  Returned values are momentarily snapshots of ring buffer state and could be
> @@ -146,7 +146,7 @@ Design and Implementation
>  This reserve/commit schema allows a natural way for multiple producers, either
>  on different CPUs or even on the same CPU/in the same BPF program, to reserve
>  independent records and work with them without blocking other producers. This
> -means that if BPF program was interruped by another BPF program sharing the
> +means that if BPF program was interrupted by another BPF program sharing the
>  same ring buffer, they will both get a record reserved (provided there is
>  enough space left) and can work with it and submit it independently. This
>  applies to NMI context as well, except that due to using a spinlock during
> diff -- a/Documentation/bpf/verifier.rst b/Documentation/bpf/verifier.rst
> --- a/Documentation/bpf/verifier.rst
> +++ b/Documentation/bpf/verifier.rst
> @@ -192,7 +192,7 @@ checked and found to be non-NULL, all co
>  As well as range-checking, the tracked information is also used for enforcing
>  alignment of pointer accesses.  For instance, on most systems the packet pointer
>  is 2 bytes after a 4-byte alignment.  If a program adds 14 bytes to that to jump
> -over the Ethernet header, then reads IHL and addes (IHL * 4), the resulting
> +over the Ethernet header, then reads IHL and adds (IHL * 4), the resulting
>  pointer will have a variable offset known to be 4n+2 for some n, so adding the 2
>  bytes (NET_IP_ALIGN) gives a 4-byte alignment and so word-sized accesses through
>  that pointer are safe.

LGTM, thanks!

Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Alexei Starovoitov Jan. 28, 2023, 7:38 p.m. UTC | #2
On Thu, Jan 26, 2023 at 10:40 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Correct spelling problems for Documentation/bpf/ as reported
> by codespell.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Andrii Nakryiko <andrii@kernel.org>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Cc: bpf@vger.kernel.org
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org
> ---
>  Documentation/bpf/libbpf/libbpf_naming_convention.rst |    6 +++---
>  Documentation/bpf/map_xskmap.rst                      |    2 +-
>  Documentation/bpf/ringbuf.rst                         |    4 ++--
>  Documentation/bpf/verifier.rst                        |    2 +-
>  4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff -- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst b/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> --- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> +++ b/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> @@ -83,8 +83,8 @@ This prevents from accidentally exportin
>  to be a part of ABI what, in turn, improves both libbpf developer- and
>  user-experiences.
>
> -ABI versionning
> ----------------
> +ABI versioning
> +--------------

The patch looks fine, but please submit it independently
targeting bpf-next with [PATCH bpf-next] subj.
We want to avoid conflicts.
David Vernet Jan. 30, 2023, 2:24 p.m. UTC | #3
On Thu, Jan 26, 2023 at 10:39:34PM -0800, Randy Dunlap wrote:
> Correct spelling problems for Documentation/bpf/ as reported
> by codespell.
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Andrii Nakryiko <andrii@kernel.org>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Cc: bpf@vger.kernel.org
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org
> ---
>  Documentation/bpf/libbpf/libbpf_naming_convention.rst |    6 +++---
>  Documentation/bpf/map_xskmap.rst                      |    2 +-
>  Documentation/bpf/ringbuf.rst                         |    4 ++--
>  Documentation/bpf/verifier.rst                        |    2 +-
>  4 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff -- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst b/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> --- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> +++ b/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> @@ -83,8 +83,8 @@ This prevents from accidentally exportin
>  to be a part of ABI what, in turn, improves both libbpf developer- and
>  user-experiences.
>  
> -ABI versionning
> ----------------
> +ABI versioning
> +--------------
>  
>  To make future ABI extensions possible libbpf ABI is versioned.
>  Versioning is implemented by ``libbpf.map`` version script that is
> @@ -148,7 +148,7 @@ API documentation convention
>  The libbpf API is documented via comments above definitions in
>  header files. These comments can be rendered by doxygen and sphinx
>  for well organized html output. This section describes the
> -convention in which these comments should be formated.
> +convention in which these comments should be formatted.
>  
>  Here is an example from btf.h:
>  
> diff -- a/Documentation/bpf/map_xskmap.rst b/Documentation/bpf/map_xskmap.rst
> --- a/Documentation/bpf/map_xskmap.rst
> +++ b/Documentation/bpf/map_xskmap.rst
> @@ -178,7 +178,7 @@ The following code snippet shows how to
>  
>  For an example on how create AF_XDP sockets, please see the AF_XDP-example and
>  AF_XDP-forwarding programs in the `bpf-examples`_ directory in the `libxdp`_ repository.
> -For a detailed explaination of the AF_XDP interface please see:
> +For a detailed explanation of the AF_XDP interface please see:
>  
>  - `libxdp-readme`_.
>  - `AF_XDP`_ kernel documentation.
> diff -- a/Documentation/bpf/ringbuf.rst b/Documentation/bpf/ringbuf.rst
> --- a/Documentation/bpf/ringbuf.rst
> +++ b/Documentation/bpf/ringbuf.rst
> @@ -124,7 +124,7 @@ buffer.  Currently 4 are supported:
>  
>  - ``BPF_RB_AVAIL_DATA`` returns amount of unconsumed data in ring buffer;
>  - ``BPF_RB_RING_SIZE`` returns the size of ring buffer;
> -- ``BPF_RB_CONS_POS``/``BPF_RB_PROD_POS`` returns current logical possition
> +- ``BPF_RB_CONS_POS``/``BPF_RB_PROD_POS`` returns current logical position
>    of consumer/producer, respectively.
>  
>  Returned values are momentarily snapshots of ring buffer state and could be
> @@ -146,7 +146,7 @@ Design and Implementation
>  This reserve/commit schema allows a natural way for multiple producers, either
>  on different CPUs or even on the same CPU/in the same BPF program, to reserve
>  independent records and work with them without blocking other producers. This
> -means that if BPF program was interruped by another BPF program sharing the
> +means that if BPF program was interrupted by another BPF program sharing the

While you're here, could you please also fix this:

s/if BPF program/if a BPF program

>  same ring buffer, they will both get a record reserved (provided there is
>  enough space left) and can work with it and submit it independently. This
>  applies to NMI context as well, except that due to using a spinlock during
> diff -- a/Documentation/bpf/verifier.rst b/Documentation/bpf/verifier.rst
> --- a/Documentation/bpf/verifier.rst
> +++ b/Documentation/bpf/verifier.rst
> @@ -192,7 +192,7 @@ checked and found to be non-NULL, all co
>  As well as range-checking, the tracked information is also used for enforcing
>  alignment of pointer accesses.  For instance, on most systems the packet pointer
>  is 2 bytes after a 4-byte alignment.  If a program adds 14 bytes to that to jump
> -over the Ethernet header, then reads IHL and addes (IHL * 4), the resulting
> +over the Ethernet header, then reads IHL and adds (IHL * 4), the resulting
>  pointer will have a variable offset known to be 4n+2 for some n, so adding the 2
>  bytes (NET_IP_ALIGN) gives a 4-byte alignment and so word-sized accesses through
>  that pointer are safe.

Otherwise, LGTM. I'll wait to add stamp until the v2 sent to bpf-next
instead of bpf.
David Vernet Jan. 30, 2023, 2:26 p.m. UTC | #4
On Mon, Jan 30, 2023 at 08:24:36AM -0600, David Vernet wrote:
> On Thu, Jan 26, 2023 at 10:39:34PM -0800, Randy Dunlap wrote:
> > Correct spelling problems for Documentation/bpf/ as reported
> > by codespell.
> > 
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Cc: Andrii Nakryiko <andrii@kernel.org>
> > Cc: Alexei Starovoitov <ast@kernel.org>
> > Cc: Daniel Borkmann <daniel@iogearbox.net>
> > Cc: bpf@vger.kernel.org
> > Cc: Jonathan Corbet <corbet@lwn.net>
> > Cc: linux-doc@vger.kernel.org
> > ---
> >  Documentation/bpf/libbpf/libbpf_naming_convention.rst |    6 +++---
> >  Documentation/bpf/map_xskmap.rst                      |    2 +-
> >  Documentation/bpf/ringbuf.rst                         |    4 ++--
> >  Documentation/bpf/verifier.rst                        |    2 +-
> >  4 files changed, 7 insertions(+), 7 deletions(-)
> > 
> > diff -- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst b/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> > --- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst
> > +++ b/Documentation/bpf/libbpf/libbpf_naming_convention.rst

[...]

Ah, please disregard, I missed that Alexei had already merged this.
Thanks for the cleanup.
diff mbox series

Patch

diff -- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst b/Documentation/bpf/libbpf/libbpf_naming_convention.rst
--- a/Documentation/bpf/libbpf/libbpf_naming_convention.rst
+++ b/Documentation/bpf/libbpf/libbpf_naming_convention.rst
@@ -83,8 +83,8 @@  This prevents from accidentally exportin
 to be a part of ABI what, in turn, improves both libbpf developer- and
 user-experiences.
 
-ABI versionning
----------------
+ABI versioning
+--------------
 
 To make future ABI extensions possible libbpf ABI is versioned.
 Versioning is implemented by ``libbpf.map`` version script that is
@@ -148,7 +148,7 @@  API documentation convention
 The libbpf API is documented via comments above definitions in
 header files. These comments can be rendered by doxygen and sphinx
 for well organized html output. This section describes the
-convention in which these comments should be formated.
+convention in which these comments should be formatted.
 
 Here is an example from btf.h:
 
diff -- a/Documentation/bpf/map_xskmap.rst b/Documentation/bpf/map_xskmap.rst
--- a/Documentation/bpf/map_xskmap.rst
+++ b/Documentation/bpf/map_xskmap.rst
@@ -178,7 +178,7 @@  The following code snippet shows how to
 
 For an example on how create AF_XDP sockets, please see the AF_XDP-example and
 AF_XDP-forwarding programs in the `bpf-examples`_ directory in the `libxdp`_ repository.
-For a detailed explaination of the AF_XDP interface please see:
+For a detailed explanation of the AF_XDP interface please see:
 
 - `libxdp-readme`_.
 - `AF_XDP`_ kernel documentation.
diff -- a/Documentation/bpf/ringbuf.rst b/Documentation/bpf/ringbuf.rst
--- a/Documentation/bpf/ringbuf.rst
+++ b/Documentation/bpf/ringbuf.rst
@@ -124,7 +124,7 @@  buffer.  Currently 4 are supported:
 
 - ``BPF_RB_AVAIL_DATA`` returns amount of unconsumed data in ring buffer;
 - ``BPF_RB_RING_SIZE`` returns the size of ring buffer;
-- ``BPF_RB_CONS_POS``/``BPF_RB_PROD_POS`` returns current logical possition
+- ``BPF_RB_CONS_POS``/``BPF_RB_PROD_POS`` returns current logical position
   of consumer/producer, respectively.
 
 Returned values are momentarily snapshots of ring buffer state and could be
@@ -146,7 +146,7 @@  Design and Implementation
 This reserve/commit schema allows a natural way for multiple producers, either
 on different CPUs or even on the same CPU/in the same BPF program, to reserve
 independent records and work with them without blocking other producers. This
-means that if BPF program was interruped by another BPF program sharing the
+means that if BPF program was interrupted by another BPF program sharing the
 same ring buffer, they will both get a record reserved (provided there is
 enough space left) and can work with it and submit it independently. This
 applies to NMI context as well, except that due to using a spinlock during
diff -- a/Documentation/bpf/verifier.rst b/Documentation/bpf/verifier.rst
--- a/Documentation/bpf/verifier.rst
+++ b/Documentation/bpf/verifier.rst
@@ -192,7 +192,7 @@  checked and found to be non-NULL, all co
 As well as range-checking, the tracked information is also used for enforcing
 alignment of pointer accesses.  For instance, on most systems the packet pointer
 is 2 bytes after a 4-byte alignment.  If a program adds 14 bytes to that to jump
-over the Ethernet header, then reads IHL and addes (IHL * 4), the resulting
+over the Ethernet header, then reads IHL and adds (IHL * 4), the resulting
 pointer will have a variable offset known to be 4n+2 for some n, so adding the 2
 bytes (NET_IP_ALIGN) gives a 4-byte alignment and so word-sized accesses through
 that pointer are safe.