Skip to content

Commit

Permalink
tools/spellcheck: Fix all spelling errors on the existing docs
Browse files Browse the repository at this point in the history
This commit addresses all spelling errors found by the new spellchecker
in one of the following ways:

* Fixing the spelling in the docs
* Adding correct jagron and shorthands to the .aspell.en.pws file
* Adding markdown code backticks around code references, names and
  commands
* Adding <nospell> tags around one-off unrecognized spelling which do
  not need to be added to the .aspell.en.pws file.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
  • Loading branch information
dylandreimerink committed Jul 28, 2024
1 parent 7b322c4 commit 00bdf42
Show file tree
Hide file tree
Showing 303 changed files with 3,485 additions and 2,783 deletions.
203 changes: 203 additions & 0 deletions .aspell.en.pws
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
personal_ws-1.1 en 0
bpf
BPF
eBPF
cBPF
bpftool
bpffs
xdp
XDP
XSK
XSKs
skb
KFuncs
kfuncs
KFunc
kfunc
Kprobe
KProbe
KConfig
kptr
kptrs
KPtr
syscall
syscalls
Syscall
Sysctl
sysctl
Libbpf
libbpf
Libxdp
libxdp
Rlimit
rlimit
cGroup
cGroups
tailcall
tailcalls
Dynptr
dynptr
dynptrs
kprobe
kprobes
kretprobe
kretprobes
uprobe
uprobes
fprobe
ftrace
Fentry
fentry
Fexit
fexit
Fmodify
fmodify
datagram
datagrams
preempt
preemptible
subprog
comparator
vmlinux
ack
acked
xfrm
qdisc
qdiscs
performant
SELinux
ACK
ACKs
BTF
JIT
DDoS
NIC
NICs
UDP
DMA
LLVM
CPUs
RCU
APIs
BGP
DNS
LRU
TTL
TTLs
LWT
LSM
BCC
ABI
PMU
TCP
BBR
XFRM
VRF
FOU
IPIP
GUE
RSS
VLAN
IPsec
LPM
TCI
TOS
MTU
NAPI
IPv
GSO
GRO
LSO
QoS
PID
TPID
OSI
RTO
RTT
ECN
MSS
NUMA
IMM
GPL
MPL
relocation
relocations
signable
accumulatively
inlined
lifecycle
nginx
ethernet
temporality
boolean
namespace
namespaces
netfilter
netlink
prepend
etcetera
polymorphism
deduplication
dereferenced
dereferencing
incrementing
misprediction
sleepable
endian
callee
verifier
verifier's
runtime
userspace
Userspace
refcount
refcounted
bitfield
bitmask
allocator
allocate
deallocate
UAPI
readme
lookups
struct
structs
spinlock
spinlocks
tracepoint
tracepoints
bytecode
crypto
cryptographic
benchmarking
benchmarked
Decrypt
Decrypts
decrypt
Encrypt
encrypt
checksum
checksums
ctx
enum
umem
umems
Umem
iproute
ifindex
Inode
inode
inodes
netdev
netdevs
pre
Perf
perf
EINVAL
EBUSY
ENOENT
EFAULT
ENOMEM
ENOPROTOOPT
Netronome
Mellanox
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ generate-docs: build-container build-tools
/docs/tools/bin/helper-def-scraper --helper-path /docs/docs/linux/helper-function"

.PHONY: spellcheck
spellcheck: build-container build-tools
spellcheck: build-container build-tools html
${CONTAINER_ENGINE} run --rm -v "${REPODIR}:/docs" \
-w /docs -u $$(id -u $${USER}):$$(id -g $${USER}) --entrypoint "bash" "${IMAGE}:${VERSION}" -c \
"/docs/tools/bin/spellcheck --project-root /docs"
34 changes: 33 additions & 1 deletion data/helpers-functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ groups:
cap: [CAP_BPF, CAP_PERFMON]
- name: bpf_trace_vprintk
cap: [CAP_BPF, CAP_PERFMON]
- name: bpf_cgrp_storage_get
kconfig: [CONFIG_CGROUPS]
- name: bpf_cgrp_storage_delete
kconfig: [CONFIG_CGROUPS]
- name: bpf_dynptr_data
- name: bpf_dynptr_from_mem
- name: bpf_dynptr_read
- name: bpf_dynptr_write
- name: bpf_kptr_xchg
- name: bpf_ktime_get_tai_ns
- name: bpf_ringbuf_discard_dynptr
- name: bpf_ringbuf_reserve_dynptr
- name: bpf_ringbuf_submit_dynptr
- name: bpf_user_ringbuf_drain

# `tracing_prog_func_proto` in `kernel/tracing/bpf_trace.c`
tracing_prog:
Expand Down Expand Up @@ -99,6 +113,8 @@ groups:
kconfig: [CONFIG_NET]
- name: bpf_xdp_get_buff_len
kconfig: [CONFIG_NET]
- name: bpf_skc_to_mptcp_sock
kconfig: [CONFIG_NET]
- name: bpf_seq_printf
attach_type: [BPF_TRACE_ITER]
- name: bpf_seq_write
Expand Down Expand Up @@ -336,6 +352,14 @@ programs:
kconfig: [CONFIG_INET]
- name: bpf_skb_set_tstamp
kconfig: [CONFIG_INET]
- name: bpf_tcp_raw_gen_syncookie_ipv4
kconfig: [CONFIG_SYN_COOKIES]
- name: bpf_tcp_raw_gen_syncookie_ipv6
kconfig: [CONFIG_SYN_COOKIES]
- name: bpf_tcp_raw_check_syncookie_ipv4
kconfig: [CONFIG_SYN_COOKIES]
- name: bpf_tcp_raw_check_syncookie_ipv6
kconfig: [CONFIG_SYN_COOKIES]
- group: base

# `tc_cls_act_func_proto` in `net/core/filter.c`
Expand Down Expand Up @@ -449,6 +473,14 @@ programs:
kconfig: [CONFIG_INET]
- name: bpf_tcp_gen_syncookie
kconfig: [CONFIG_INET]
- name: bpf_tcp_raw_check_syncookie_ipv4
kconfig: [CONFIG_SYN_COOKIES]
- name: bpf_tcp_raw_gen_syncookie_ipv6
kconfig: [CONFIG_SYN_COOKIES]
- name: bpf_tcp_raw_check_syncookie_ipv4
kconfig: [CONFIG_SYN_COOKIES]
- name: bpf_tcp_raw_check_syncookie_ipv6
kconfig: [CONFIG_SYN_COOKIES]
- group: base

# `pe_prog_func_proto` in `kernel/tracing/bpf_trace.c`
Expand Down Expand Up @@ -759,7 +791,7 @@ programs:

# `tracing_prog_func_proto` in `kernel/tracing/bpf_trace.c`
BPF_PROG_TYPE_TRACING:
- group: tracing
- group: tracing_prog

# TODO struct ops has allowed helpers per struct type, currently only TCP Congestion Algo
# but it doesn't fit neatly with the rest :(
Expand Down
2 changes: 1 addition & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* [Helper functions](linux/helper-function/)
* [Syscall commands](linux/syscall/)
* [KFuncs](linux/kfuncs/)
* [ePBF librairies](ebpf-library/index.md)
* [eBPF libraries](ebpf-library/index.md)
* [Libbpf](ebpf-library/libbpf.md)
* [Libxdp](ebpf-library/libxdp/)
* [Concepts](concepts/index.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/btf.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# BTF

BTF (BPF Type Format) is a metadata format designed for encoding debug information related to BPF programs and maps. It focus on describing data types, function information for defined subroutines.
This debug information serves various purposes including map visualization, function signature enhancement for BPF programs, and aiding in the generation of annotated source code, JITed code, and verifier logs.
This debug information serves various purposes including map visualization, function signature enhancement for BPF programs, and aiding in the generation of annotated source code, JIT-ed code, and verifier logs.

The BTF specification is divided into two main parts:

* BTF Kernel API: This defines the interface between user space and the kernel. Before usage, the kernel validates the BTF information provided.
* BTF ELF File Format: This establishes the contract between the ELF file and the libbpf loader in user space.

It was created as an alternative to DWARF debug information. The BTF is more space-efficent due to his [deduplication algorithm] while remaining expressive enough to have all the type information of a C programs.
It was created as an alternative to DWARF debug information. The BTF is more space-efficient due to his [deduplication algorithm] while remaining expressive enough to have all the type information of a C programs.

!!! example "Docs could be improved"
This part of the docs is incomplete, contributions are very welcome
Expand Down
20 changes: 10 additions & 10 deletions docs/concepts/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ eBPF programs use the memory and data structures from the kernel. Between differ
Another problem can be the renaming of a field in the structure.
If a BPF application uses one of these modified or renamed fields, the program will no longer be compatible.

<!-- CO-RE in the kernel + VMLinux -->
## Export kernel informations
Libbpf relie on the [BTF] information from the actual running Kernel who expose itself BTF information at `/sys/kernel/btf/vmlinux`.
## Export kernel information

Libbpf relies on the [BTF] information from the actual running Kernel who expose itself BTF information at `/sys/kernel/btf/vmlinux`.
It include all kernel types and structures layout.
A header file `vmlinux.h`, can be generate using [bpftool] :
```sh
bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
```

This eliminate the depedency of the kernel headers
This eliminate the dependency of the kernel headers

## Emit BTF relocation's with Clang

<!-- CO-RE in compilers -->
## Emit BTF relocations with Clang
Clang was extended to emit BTF relocations. These relocations capture high-level descriptions of what information the BPF program intends to access.
The compiled BPF program is stored in an ELF (Executable and Linkable Format) object file. This file contains BTF type information and Clang-generated relocations.
Clang was extended to emit BTF relocation's. These relocation's capture high-level descriptions of what information the BPF program intends to access.
The compiled BPF program is stored in an ELF (Executable and Link-able Format) object file. This file contains BTF type information and Clang-generated relocation's.
The ELF format allows libbpf to process and adjust the BPF program for the target kernel dynamically.

<!-- CO-RE eBPF library in libbpf -->
## Use Libbpf as CO-RE library and loader

When you run your loader program with libbpf, it serves as the BPF program loader. It takes the compiled BPF ELF object file and post-processing it as necessary. It sets up various kernel objects (maps, programs, etc.) and triggers BPF program loading and verification.
Libbpf uses the BTF information to match the types and fields in the BPF program with those in the running kernel, adjusting offsets and other relocatable data to ensure the program functions correctly on the specific kernel.

## Examples

Lists of examples programs using libbpf can be found on Github [libbpf-bootstrap]
Lists of examples programs using libbpf can be found on GitHub [libbpf-bootstrap]

!!! example "Docs could be improved"
This part of the docs is incomplete, contributions are very welcome
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/elf.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ELF (Executable Linkable Format)
# ELF (Executable Link-able Format)

!!! example "Docs could be improved"
This part of the docs is incomplete, contributions are very welcome
Expand Down
4 changes: 2 additions & 2 deletions docs/ebpf-library/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kernel/User side libraries

eBPF have multiple libraries to help the eBPF developement
eBPF have multiple libraries to help the eBPF development

<div class="grid cards" markdown>

Expand All @@ -20,4 +20,4 @@ eBPF have multiple libraries to help the eBPF developement

[:octicons-arrow-right-24: Concepts](./libxdp/libxdp.md)

</div>
</div>
2 changes: 1 addition & 1 deletion docs/ebpf-library/libbpf.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# LibBPF kernel side library
# Libbpf kernel side library

<!-- TODO abstract -->

Expand Down
Loading

0 comments on commit 00bdf42

Please sign in to comment.