From: Jesper Dangaard Brouer <brouer@redhat.com>
To: netdev@vger.kernel.org, linux-doc@vger.kernel.org,
Jonathan Corbet <corbet@lwn.net>
Cc: Alexei Starovoitov <ast@fb.com>,
alexander@alemayhu.com, linux-kernel@vger.kernel.org,
quentin.monnet@6wind.com,
Jesper Dangaard Brouer <brouer@redhat.com>,
Daniel Borkmann <borkmann@iogearbox.net>
Subject: [net-next PATCH 1/4] doc/bpf: start eBPF documentation tree bpf/
Date: Tue, 07 Feb 2017 15:30:17 +0100 [thread overview]
Message-ID: <148647781693.10567.1655837312500141821.stgit@localhost> (raw)
In-Reply-To: <148647756092.10567.10947541548678801938.stgit@localhost>
The learning curve for eBPF programs is hard. The purpose of this
documentation (subtree) is to make it easier for developers to get
started using and writing eBPF programs.
Including bpf/index under section User-oriented documentation.
Thanks to Quentin Monnet <quentin.monnet@6wind.com> for improving
this document with areas eBFP is used in and early review.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
---
Documentation/bpf/index.rst | 66 +++++++++++++++++++++++++++++++++++++++++++
Documentation/index.rst | 1 +
2 files changed, 67 insertions(+)
create mode 100644 Documentation/bpf/index.rst
diff --git a/Documentation/bpf/index.rst b/Documentation/bpf/index.rst
new file mode 100644
index 000000000000..f262fe8f9f95
--- /dev/null
+++ b/Documentation/bpf/index.rst
@@ -0,0 +1,66 @@
+======================================
+eBPF - extended Berkeley Packet Filter
+======================================
+
+Introduction
+============
+
+The Berkeley Packet Filter (BPF) started (`article 1992`_) as a
+special-purpose virtual machine (register based filter evaluator) for
+filtering network packets, best known for its use in tcpdump. It is
+documented in the kernel tree, in the first part of:
+`Documentation/networking/filter.txt`_
+
+The extended BPF (eBPF) variant has become a universal in-kernel
+virtual machine, that has hooks all over the kernel. The eBPF
+instruction set is quite different, see description in section "BPF
+kernel internals" of `Documentation/networking/filter.txt`_ or look at
+this `presentation by Alexei`_.
+
+Areas using eBPF:
+ * XDP - eXpress Data Path
+ * `Traffic control`_
+ * Sockets
+ * Firewalling (``xt_bpf`` module)
+ * Tracing
+ * Tracepoints
+ * kprobe (dynamic tracing of a kernel function call)
+ * cgroups
+
+Documentation
+=============
+
+The primary user documentation for extended BPF is in the man-page for
+the `bpf(2)`_ syscall.
+
+This documentation is focused on the kernel tree's `samples/bpf/`_ and
+`tools/lib/bpf/`_. It is worth mentioning that other projects exist,
+like BCC_, that has a slightly different user-facing
+syntax, but is interfacing with the same kernel facilities as those
+covered by this documentation.
+
+.. toctree::
+ :maxdepth: 1
+
+.. links:
+
+.. _article 1992: http://www.tcpdump.org/papers/bpf-usenix93.pdf
+
+.. _bpf(2): http://man7.org/linux/man-pages/man2/bpf.2.html
+
+.. _Documentation/networking/filter.txt:
+ https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/filter.txt
+
+.. _presentation by Alexei:
+ http://www.slideshare.net/AlexeiStarovoitov/bpf-inkernel-virtual-machine
+
+.. _samples/bpf/:
+ https://github.com/torvalds/linux/blob/master/samples/bpf/
+
+.. _tools/lib/bpf/:
+ https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/
+
+.. _Traffic control: http://man7.org/linux/man-pages/man8/tc-bpf.8.html
+
+.. _BCC: https://github.com/iovisor/bcc
+
diff --git a/Documentation/index.rst b/Documentation/index.rst
index cb5d77699c60..dacf202febb8 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -23,6 +23,7 @@ trying to get it to work optimally on a given system.
:maxdepth: 2
admin-guide/index
+ bpf/index
Introduction to kernel development
----------------------------------
next prev parent reply other threads:[~2017-02-07 14:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 14:30 [net-next PATCH 0/4] Documenting eBPF - extended Berkeley Packet Filter Jesper Dangaard Brouer
2017-02-07 14:30 ` Jesper Dangaard Brouer [this message]
2017-02-07 14:30 ` [net-next PATCH 2/4] doc/bpf: document interacting with eBPF maps Jesper Dangaard Brouer
2017-02-07 14:30 ` [net-next PATCH 3/4] doc/bpf: describes the different types of eBPF maps available Jesper Dangaard Brouer
2017-02-07 14:30 ` [net-next PATCH 4/4] doc/bpf: describe BCC the BPF Compiler Collection Jesper Dangaard Brouer
2017-02-07 15:37 ` [net-next PATCH 0/4] Documenting eBPF - extended Berkeley Packet Filter Jonathan Corbet
2017-02-07 16:09 ` Jesper Dangaard Brouer
2017-02-07 16:46 ` Jonathan Corbet
2017-02-07 20:51 ` Jesper Dangaard Brouer
2017-02-07 21:23 ` Jonathan Corbet
2017-02-08 10:36 ` Jesper Dangaard Brouer
2017-02-07 16:43 ` Daniel Borkmann
2017-02-07 21:19 ` Jesper Dangaard Brouer
2017-02-07 22:32 ` Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=148647781693.10567.1655837312500141821.stgit@localhost \
--to=brouer@redhat.com \
--cc=alexander@alemayhu.com \
--cc=ast@fb.com \
--cc=borkmann@iogearbox.net \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=quentin.monnet@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox