Commit Graph

53 Commits

Author SHA1 Message Date
Andrii Nakryiko
7a431904c8 sync: latest libbpf changes from kernel
Syncing latest libbpf commits from kernel repository.
Baseline commit:   5aab392c55c96f9bb26d9294f965f156a87ee81c
Checkpoint commit: ea5bade929bf04355aeed58a3c9f5ef2c3afe2ac

Alexei Starovoitov (1):
  tools/bpf: sync bpf.h into tools

Andrii Nakryiko (3):
  libbpf: fix formatting for btf_ext__get_raw_data
  btf: allow to customize dedup hash table size
  btf: fix bug with resolving STRUCT/UNION into corresponding FWD

Dan Carpenter (1):
  tools/libbpf: signedness bug in btf_dedup_ref_type()

Jakub Kicinski (1):
  tools: libbpf: add a correctly named define for map iteration

Magnus Karlsson (1):
  libbpf: add support for using AF_XDP sockets

brakmo (1):
  bpf: sync bpf.h to tools and update bpf_helpers.h

 include/uapi/linux/bpf.h |  12 +-
 src/README.rst           |  15 +-
 src/btf.c                |  76 ++--
 src/btf.h                |   3 +-
 src/libbpf.c             |   8 +-
 src/libbpf.h             |   3 +-
 src/libbpf.map           |   6 +
 src/xsk.c                | 723 +++++++++++++++++++++++++++++++++++++++
 src/xsk.h                | 203 +++++++++++
 9 files changed, 1020 insertions(+), 29 deletions(-)
 create mode 100644 src/xsk.c
 create mode 100644 src/xsk.h

--
2.17.1
2019-03-02 21:31:13 -08:00
Andrii Nakryiko
d5fa4150f0 libbpf sync 2019-02-17T06:35:29.358Z (#14)
* tools/libbpf: support bigger BTF data sizes

While it's understandable why kernel limits number of BTF types to 65535
and size of string section to 64KB, in libbpf as user-space library it's
too restrictive. E.g., pahole converting DWARF to BTF type information
for Linux kernel generates more than 3 million BTF types and more than
3MB of strings, before deduplication. So to allow btf__dedup() to do its
work, we need to be able to load bigger BTF sections using btf__new().

Singed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

* sync: latest libbpf changes from kernel

Syncing latest libbpf commits from kernel repository.
Baseline commit:   789f6bab849e04ea029c09b81dc8401dc0268cf9
Checkpoint commit: 5aab392c55c96f9bb26d9294f965f156a87ee81c

Andrii Nakryiko (1):
  tools/libbpf: support bigger BTF data sizes

 src/btf.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

--
2.17.1
2019-02-16 22:41:31 -08:00
Andrii Nakryiko
8e42f42533 scripts: add script to sync kernel changes (#13)
This script automates the process of applying libbpf-relevant changes
from kernel repository on top of current state of libbpf repository.

It uses CHECKPOINT-COMMIT file to keep track of last commit in kernel
repo up to which libbpf is in sync with. If there are any new libbpf
changes in kernel repository, script extracts them, preserving original
commit metadata. It also creates a "sync commit" using cover letter as
a template, which nicely summarizes changes since last sync with kernel.

Usage: ./scripts/sync-kernel.sh <linux-repo> <libbpf-repo>

If it succeeds, script will create a bunch of local commits in
<libbpf-repo> in separate branch, which can be easily pushed into github
to create a pull request.

Script tries to clean up after itself, except in case of failure. But it
doesn't clean up timestamped branches it creates in both kernel and
libbpf repositories for now. We can add that later.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
2019-02-16 22:22:30 -08:00