man2/bpf.2: srcfix: Some fixes that only change fonts

1) Use single-font macros for a single argument.

2) Use quotation marks for arguments containing a space.

3) Use roman font for punctuation marks.

  The output has only changes of the font for a punctuation mark.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Bjarni Ingi Gislason 2019-01-01 22:51:34 +00:00 committed by Michael Kerrisk
parent a28b73cda2
commit 266791fbe0
1 changed files with 20 additions and 20 deletions

View File

@ -30,7 +30,7 @@ bpf \- perform a command on an extended BPF map or program
.nf .nf
.B #include <linux/bpf.h> .B #include <linux/bpf.h>
.BI "int bpf(int " cmd ", union bpf_attr *" attr ", unsigned int " size "); .BI "int bpf(int " cmd ", union bpf_attr *" attr ", unsigned int " size );
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
The The
@ -135,13 +135,13 @@ event A event B event C on eth0 on eth1 on eth2
The operation to be performed by the The operation to be performed by the
.BR bpf () .BR bpf ()
system call is determined by the system call is determined by the
.IR cmd .I cmd
argument. argument.
Each operation takes an accompanying argument, Each operation takes an accompanying argument,
provided via provided via
.IR attr , .IR attr ,
which is a pointer to a union of type which is a pointer to a union of type
.IR bpf_attr .I bpf_attr
(see below). (see below).
The The
.I size .I size
@ -149,7 +149,7 @@ argument is the size of the union pointed to by
.IR attr . .IR attr .
.PP .PP
The value provided in The value provided in
.IR cmd .I cmd
is one of the following: is one of the following:
.TP .TP
.B BPF_MAP_CREATE .B BPF_MAP_CREATE
@ -243,7 +243,7 @@ The following wrapper functions demonstrate how various
.BR bpf () .BR bpf ()
commands can be used to access the maps. commands can be used to access the maps.
The functions use the The functions use the
.IR cmd .I cmd
argument to invoke different operations. argument to invoke different operations.
.TP .TP
.B BPF_MAP_CREATE .B BPF_MAP_CREATE
@ -302,7 +302,7 @@ and to check that the program doesn't access the map element
beyond the specified beyond the specified
.IR value_size . .IR value_size .
For example, when a map is created with a For example, when a map is created with a
.IR key_size .I key_size
of 8 and the eBPF program calls of 8 and the eBPF program calls
.IP .IP
.in +4n .in +4n
@ -321,7 +321,7 @@ since the in-kernel helper function
expects to read 8 bytes from the location pointed to by expects to read 8 bytes from the location pointed to by
.IR key , .IR key ,
but the but the
.IR "fp\ -\ 4" .I fp\ -\ 4
(where (where
.I fp .I fp
is the top of the stack) is the top of the stack)
@ -527,7 +527,7 @@ The
command looks up an element by command looks up an element by
.I key .I key
in the map referred to by the file descriptor in the map referred to by the file descriptor
.IR fd .I fd
and sets the and sets the
.I next_key .I next_key
pointer to the key of the next element. pointer to the key of the next element.
@ -642,7 +642,7 @@ fashion;
for atomic updates, a hash-table map should be used instead. for atomic updates, a hash-table map should be used instead.
There is however one special case that can also be used with arrays: There is however one special case that can also be used with arrays:
the atomic built-in the atomic built-in
.BR __sync_fetch_and_add() .B __sync_fetch_and_add()
can be used on 32 and 64 bit atomic counters. can be used on 32 and 64 bit atomic counters.
For example, it can be For example, it can be
applied on the whole value itself if it represents a single counter, applied on the whole value itself if it represents a single counter,
@ -881,7 +881,7 @@ argument is a pointer to a
.\" the program can now access skb fields. .\" the program can now access skb fields.
.\" .\"
.TP .TP
.BR BPF_PROG_TYPE_KPROBE " (since Linux 4.1) .BR BPF_PROG_TYPE_KPROBE " (since Linux 4.1)"
.\" commit 2541517c32be2531e0da59dfd7efc1ce844644f5 .\" commit 2541517c32be2531e0da59dfd7efc1ce844644f5
[To be documented] [To be documented]
.\" FIXME Document this program type .\" FIXME Document this program type
@ -890,7 +890,7 @@ argument is a pointer to a
.\" .\"
.\" FIXME We need text here to describe 'kern_version' .\" FIXME We need text here to describe 'kern_version'
.TP .TP
.BR BPF_PROG_TYPE_SCHED_CLS " (since Linux 4.1) .BR BPF_PROG_TYPE_SCHED_CLS " (since Linux 4.1)"
.\" commit 96be4325f443dbbfeb37d2a157675ac0736531a1 .\" commit 96be4325f443dbbfeb37d2a157675ac0736531a1
.\" commit e2e9b6541dd4b31848079da80fe2253daaafb549 .\" commit e2e9b6541dd4b31848079da80fe2253daaafb549
[To be documented] [To be documented]
@ -898,7 +898,7 @@ argument is a pointer to a
.\" Describe allowed helper functions for this program type .\" Describe allowed helper functions for this program type
.\" Describe bpf_context for this program type .\" Describe bpf_context for this program type
.TP .TP
.BR BPF_PROG_TYPE_SCHED_ACT " (since Linux 4.1) .BR BPF_PROG_TYPE_SCHED_ACT " (since Linux 4.1)"
.\" commit 94caee8c312d96522bcdae88791aaa9ebcd5f22c .\" commit 94caee8c312d96522bcdae88791aaa9ebcd5f22c
.\" commit a8cb5f556b567974d75ea29c15181c445c541b1f .\" commit a8cb5f556b567974d75ea29c15181c445c541b1f
[To be documented] [To be documented]
@ -1009,7 +1009,7 @@ main(int argc, char **argv)
.EE .EE
.PP .PP
Some complete working code can be found in the Some complete working code can be found in the
.IR samples/bpf .I samples/bpf
directory in the kernel source tree. directory in the kernel source tree.
.SH RETURN VALUE .SH RETURN VALUE
For a successful call, the return value depends on the operation: For a successful call, the return value depends on the operation:
@ -1028,14 +1028,14 @@ On error, \-1 is returned, and
is set appropriately. is set appropriately.
.SH ERRORS .SH ERRORS
.TP .TP
.BR E2BIG .B E2BIG
The eBPF program is too large or a map reached the The eBPF program is too large or a map reached the
.I max_entries .I max_entries
limit (maximum number of elements). limit (maximum number of elements).
.TP .TP
.BR EACCES .B EACCES
For For
.BR BPF_PROG_LOAD, .BR BPF_PROG_LOAD ,
even though all program instructions are valid, the program has been even though all program instructions are valid, the program has been
rejected because it was deemed unsafe. rejected because it was deemed unsafe.
This may be because it may have This may be because it may have
@ -1079,7 +1079,7 @@ or attributes are invalid.
.TP .TP
.B EINVAL .B EINVAL
For For
.BR BPF_MAP_*_ELEM .B BPF_MAP_*_ELEM
commands, commands,
some of the fields of some of the fields of
.I "union bpf_attr" .I "union bpf_attr"
@ -1088,13 +1088,13 @@ are not set to zero.
.TP .TP
.B EINVAL .B EINVAL
For For
.BR BPF_PROG_LOAD, .BR BPF_PROG_LOAD ,
indicates an attempt to load an invalid program. indicates an attempt to load an invalid program.
eBPF programs can be deemed eBPF programs can be deemed
invalid due to unrecognized instructions, the use of reserved fields, jumps invalid due to unrecognized instructions, the use of reserved fields, jumps
out of range, infinite loops or calls of unknown functions. out of range, infinite loops or calls of unknown functions.
.TP .TP
.BR ENOENT .B ENOENT
For For
.B BPF_MAP_LOOKUP_ELEM .B BPF_MAP_LOOKUP_ELEM
or or
@ -1166,7 +1166,7 @@ Normal compilation.
Debugging mode. Debugging mode.
The generated opcodes are dumped in hexadecimal into the kernel log. The generated opcodes are dumped in hexadecimal into the kernel log.
These opcodes can then be disassembled using the program These opcodes can then be disassembled using the program
.IR tools/net/bpf_jit_disasm.c .I tools/net/bpf_jit_disasm.c
provided in the kernel source tree. provided in the kernel source tree.
.PP .PP
Since Linux 4.15, Since Linux 4.15,