mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-06 00:29:07 +08:00
README: info on routing general BPF/libbpf quesions
We keep getting more and more questions about BPF/libbpf usage. This repo is not the right place to ask them, as not that many people monitor it. Re-route folks to bpf@vger.kernel.org Signed-off-by: Andrii Nakryiko <andriin@fb.com>
This commit is contained in:
committed by
Andrii Nakryiko
parent
ac74ee188d
commit
143213eb82
58
README.md
58
README.md
@@ -1,20 +1,29 @@
|
|||||||
|
This is a mirror of [bpf-next Linux source
|
||||||
This is a mirror of [bpf-next linux tree](https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next)'s
|
tree](https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next)'s
|
||||||
`tools/lib/bpf` directory plus its supporting header files.
|
`tools/lib/bpf` directory plus its supporting header files.
|
||||||
|
|
||||||
The following files will by sync'ed with bpf-next repo:
|
All the gory details of syncing can be found in `scripts/sync-kernel.sh`
|
||||||
- `src/` <-> `bpf-next/tools/lib/bpf/`
|
script.
|
||||||
- `include/uapi/linux/bpf_common.h` <-> `bpf-next/tools/include/uapi/linux/bpf_common.h`
|
|
||||||
- `include/uapi/linux/bpf.h` <-> `bpf-next/tools/include/uapi/linux/bpf.h`
|
|
||||||
- `include/uapi/linux/btf.h` <-> `bpf-next/tools/include/uapi/linux/btf.h`
|
|
||||||
- `include/uapi/linux/if_link.h` <-> `bpf-next/tools/include/uapi/linux/if_link.h`
|
|
||||||
- `include/uapi/linux/if_xdp.h` <-> `bpf-next/tools/include/uapi/linux/if_xdp.h`
|
|
||||||
- `include/uapi/linux/netlink.h` <-> `bpf-next/tools/include/uapi/linux/netlink.h`
|
|
||||||
- `include/tools/libc_compat.h` <-> `bpf-next/tools/include/tools/libc_compat.h`
|
|
||||||
|
|
||||||
Other header files at this repo (`include/linux/*.h`) are reduced versions of
|
Some header files in this repo (`include/linux/*.h`) are reduced versions of
|
||||||
their counterpart files at bpf-next's `tools/include/linux/*.h` to make compilation
|
their counterpart files at
|
||||||
successful.
|
[bpf-next](https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/)'s
|
||||||
|
`tools/include/linux/*.h` to make compilation successful.
|
||||||
|
|
||||||
|
BPF questions
|
||||||
|
=============
|
||||||
|
|
||||||
|
All general BPF questions, including kernel functionality, libbpf APIs and
|
||||||
|
their application, should be sent to bpf@vger.kernel.org mailing list. You can
|
||||||
|
subscribe to it [here](http://vger.kernel.org/vger-lists.html#bpf) and search
|
||||||
|
its archive [here](https://lore.kernel.org/bpf/). Please search the archive
|
||||||
|
before asking new questions. It very well might be that this was already
|
||||||
|
addressed or answered before.
|
||||||
|
|
||||||
|
bpf@vger.kernel.org is monitored by many more people and they will happily try
|
||||||
|
to help you with whatever issue you have. This repository's PRs and issues
|
||||||
|
should be opened only for dealing with issues pertaining to specific way this
|
||||||
|
libbpf mirror repo is set up and organized.
|
||||||
|
|
||||||
Build
|
Build
|
||||||
[](https://travis-ci.org/libbpf/libbpf)
|
[](https://travis-ci.org/libbpf/libbpf)
|
||||||
@@ -25,8 +34,9 @@ libelf is an internal dependency of libbpf and thus it is required to link
|
|||||||
against and must be installed on the system for applications to work.
|
against and must be installed on the system for applications to work.
|
||||||
pkg-config is used by default to find libelf, and the program called can be
|
pkg-config is used by default to find libelf, and the program called can be
|
||||||
overridden with `PKG_CONFIG`.
|
overridden with `PKG_CONFIG`.
|
||||||
If using `pkg-config` at build time is not desired, it can be disabled by setting
|
|
||||||
`NO_PKG_CONFIG=1` when calling make.
|
If using `pkg-config` at build time is not desired, it can be disabled by
|
||||||
|
setting `NO_PKG_CONFIG=1` when calling make.
|
||||||
|
|
||||||
To build both static libbpf.a and shared libbpf.so:
|
To build both static libbpf.a and shared libbpf.so:
|
||||||
```bash
|
```bash
|
||||||
@@ -62,13 +72,15 @@ Distributions packaging libbpf from this mirror:
|
|||||||
Benefits of packaging from the mirror over packaging from kernel sources:
|
Benefits of packaging from the mirror over packaging from kernel sources:
|
||||||
- Consistent versioning across distributions.
|
- Consistent versioning across distributions.
|
||||||
- No ties to any specific kernel, transparent handling of older kernels.
|
- No ties to any specific kernel, transparent handling of older kernels.
|
||||||
Libbpf is designed to be kernel-agnostic and work across multitude of kernel
|
Libbpf is designed to be kernel-agnostic and work across multitude of
|
||||||
versions. It has built-in mechanisms to gracefully handle older kernels,
|
kernel versions. It has built-in mechanisms to gracefully handle older
|
||||||
that are missing some of the features, by working around or gracefully
|
kernels, that are missing some of the features, by working around or
|
||||||
degrading functionality. Thus libbpf is not tied to a specific kernel
|
gracefully degrading functionality. Thus libbpf is not tied to a specific
|
||||||
version and can/should be packaged and versioned independently.
|
kernel version and can/should be packaged and versioned independently.
|
||||||
- Continuous integration testing via [TravisCI](https://travis-ci.org/libbpf/libbpf).
|
- Continuous integration testing via
|
||||||
- Static code analysis via [LGTM](https://lgtm.com/projects/g/libbpf/libbpf) and [Coverity](https://scan.coverity.com/projects/libbpf).
|
[TravisCI](https://travis-ci.org/libbpf/libbpf).
|
||||||
|
- Static code analysis via [LGTM](https://lgtm.com/projects/g/libbpf/libbpf)
|
||||||
|
and [Coverity](https://scan.coverity.com/projects/libbpf).
|
||||||
|
|
||||||
Package dependencies of libbpf, package names may vary across distros:
|
Package dependencies of libbpf, package names may vary across distros:
|
||||||
- zlib
|
- zlib
|
||||||
|
|||||||
Reference in New Issue
Block a user