Skip to content

Commit

Permalink
doc: Fix typos in bpf docs
Browse files Browse the repository at this point in the history
  • Loading branch information
karlbohlmark authored Jan 3, 2024
1 parent d03649e commit 9a56228
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/std/os/linux/bpf.zig
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ pub const F_REPLACE = 0x4;
pub const F_STRICT_ALIGNMENT = 0x1;

/// If BPF_F_ANY_ALIGNMENT is used in BPF_PROF_LOAD command, the verifier will
/// allow any alignment whatsoever. On platforms with strict alignment
/// allow any alignment whatsoever. On platforms with strict alignment
/// requirements for loads ands stores (such as sparc and mips) the verifier
/// validates that all loads and stores provably follow this requirement. This
/// validates that all loads and stores provably follow this requirement. This
/// flag turns that checking and enforcement off.
///
/// It is mostly used for testing when we want to validate the context and
Expand All @@ -163,7 +163,7 @@ pub const F_ANY_ALIGNMENT = 0x2;
///
/// So, this flag is introduced. Once it is set, verifier will randomize high
/// 32-bit for those instructions who has been identified as safe to ignore
/// them. Then, if verifier is not doing correct analysis, such randomization
/// them. Then, if verifier is not doing correct analysis, such randomization
/// will regress tests to expose bugs.
pub const F_TEST_RND_HI32 = 0x4;

Expand Down Expand Up @@ -206,7 +206,7 @@ pub const BPF_F_NO_PREALLOC = 0x1;

/// flag for BPF_MAP_CREATE command. Instead of having one common LRU list in
/// the BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list which can
/// scale and perform better. Note, the LRU nodes (including free nodes) cannot
/// scale and perform better. Note, the LRU nodes (including free nodes) cannot
/// be moved across different LRU lists.
pub const BPF_F_NO_COMMON_LRU = 0x2;

Expand Down Expand Up @@ -860,7 +860,7 @@ test "opcodes" {
}

pub const Cmd = enum(usize) {
/// Create a map and return a file descriptor that refers to the map. The
/// Create a map and return a file descriptor that refers to the map. The
/// close-on-exec file descriptor flag is automatically enabled for the new
/// file descriptor.
///
Expand All @@ -887,7 +887,7 @@ pub const Cmd = enum(usize) {
map_get_next_key,

/// Verify and load an eBPF program, returning a new file descriptor
/// associated with the program. The close-on-exec file descriptor flag
/// associated with the program. The close-on-exec file descriptor flag
/// is automatically enabled for the new file descriptor.
///
/// uses ProgLoadAttr
Expand Down Expand Up @@ -1027,9 +1027,9 @@ pub const MapType = enum(u32) {
/// memory and can be submitted with commit() or discarded with
/// discard()
///
/// ringbuf_output() will incurr an extra memory copy, but allows to submit
/// ringbuf_output() will incur an extra memory copy, but allows to submit
/// records of the length that's not known beforehand, and is an easy
/// replacement for perf_event_outptu().
/// replacement for perf_event_output().
///
/// ringbuf_reserve() avoids the extra memory copy but requires a known size
/// of memory beforehand.
Expand Down

0 comments on commit 9a56228

Please sign in to comment.