Commit Graph

5 Commits

Author SHA1 Message Date
John Fastabend
514d6c1959 bpf: Document sockmap '-target bpf' requirement for PROG_TYPE_SK_MSG
BPF_PROG_TYPE_SK_MSG programs use a 'void *' for both data and the
data_end pointers. Additionally, the verifier ensures that every
accesses into the values is a __u64 read. This correctly maps on
to the BPF 64-bit architecture.

However, to ensure that when building on 32bit architectures that
clang uses correct types the '-target bpf' option _must_ be
specified. To make this clear add a note to the Documentation.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-04-23 23:42:21 +02:00
Daniel Borkmann
78262f4575 bpf, doc: add description wrt native/bpf clang target and pointer size
As this recently came up on netdev [0], lets add it to the BPF devel doc.

  [0] https://www.spinics.net/lists/netdev/msg489612.html

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-03-20 15:47:45 -07:00
Yonghong Song
6215ea6b7e bpf: add documentation to compare clang "-target bpf" and default target
The added documentation explains how generated codes may differ
between clang bpf target and default target, and when to use
each target.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-02-02 11:14:19 +01:00
Daniel Borkmann
34f15bf31e bpf, doc: add faq about bpf development process
In the same spirit of netdev FAQ, start a BPF FAQ as a collection
of expectations and/or workflow details in the context of BPF patch
processing.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2017-12-06 14:32:42 -08:00
Alexei Starovoitov
2e39748a42 bpf: document answers to common questions about BPF
to address common misconceptions about what BPF is and what it's not
add short BPF Q&A that clarifies core BPF design principles and
answers some common questions.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01 21:01:47 +09:00