summaryrefslogtreecommitdiffstats
path: root/man2/bpf.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/bpf.2')
-rw-r--r--man2/bpf.228
1 files changed, 14 insertions, 14 deletions
diff --git a/man2/bpf.2 b/man2/bpf.2
index e4390ff2a..3ba6118cd 100644
--- a/man2/bpf.2
+++ b/man2/bpf.2
@@ -64,7 +64,7 @@ below for further details.
Generally, eBPF programs are loaded by the user process and automatically
unloaded when the process exits.
In some cases, for example,
-.BR tc\-bpf (8),
+.MR tc\-bpf 8 ,
the program will continue to stay alive inside the kernel even after the
process that loaded the program exits.
In that case,
@@ -87,7 +87,7 @@ eBPF programs can be attached to different events.
These events can be the arrival of network packets, tracing
events, classification events by network queueing disciplines
(for eBPF programs attached to a
-.BR tc (8)
+.MR tc 8
classifier), and other types that may be added in the future.
A new event triggers execution of the eBPF program, which
may store information about the event in eBPF maps.
@@ -136,7 +136,7 @@ is one of the following:
.B BPF_MAP_CREATE
Create a map and return a file descriptor that refers to the map.
The close-on-exec file descriptor flag (see
-.BR fcntl (2))
+.MR fcntl 2 )
is automatically enabled for the new file descriptor.
.TP
.B BPF_MAP_LOOKUP_ELEM
@@ -156,7 +156,7 @@ of the next element.
Verify and load an eBPF program,
returning a new file descriptor associated with the program.
The close-on-exec file descriptor flag (see
-.BR fcntl (2))
+.MR fcntl 2 )
is automatically enabled for the new file descriptor.
.IP
The
@@ -819,7 +819,7 @@ must be a null pointer, and
must be zero.
.P
Applying
-.BR close (2)
+.MR close 2
to the file descriptor returned by
.B BPF_PROG_LOAD
will unload the eBPF program (but see NOTES).
@@ -926,7 +926,7 @@ the following call will attach the program
to the socket
.IR sockfd ,
which was created by an earlier call to
-.BR socket (2):
+.MR socket 2 :
.P
.in +4n
.EX
@@ -943,7 +943,7 @@ the eBPF program referred to by the file descriptor
to a perf event file descriptor,
.IR event_fd ,
that was created by a previous call to
-.BR perf_event_open (2):
+.MR perf_event_open 2 :
.P
.in +4n
.EX
@@ -1097,13 +1097,13 @@ Unprivileged access may be blocked by writing the value 1 to the file
.P
eBPF objects (maps and programs) can be shared between processes.
For example, after
-.BR fork (2),
+.MR fork 2 ,
the child inherits file descriptors referring to the same eBPF objects.
In addition, file descriptors referring to eBPF objects can be
transferred over UNIX domain sockets.
File descriptors referring to eBPF objects can be duplicated
in the usual way, using
-.BR dup (2)
+.MR dup 2
and similar calls.
An eBPF object is deallocated only after all file descriptors
referring to the object have been closed.
@@ -1263,11 +1263,11 @@ Some complete working code can be found in the
.I samples/bpf
directory in the kernel source tree.
.SH SEE ALSO
-.BR seccomp (2),
-.BR bpf\-helpers (7),
-.BR socket (7),
-.BR tc (8),
-.BR tc\-bpf (8)
+.MR seccomp 2 ,
+.MR bpf\-helpers 7 ,
+.MR socket 7 ,
+.MR tc 8 ,
+.MR tc\-bpf 8
.P
Both classic and extended BPF are explained in the kernel source file
.IR Documentation/networking/filter.txt .