[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <157175668770.112621.17344362302386223623.stgit@toke.dk>
Date: Tue, 22 Oct 2019 17:04:47 +0200
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Alexei Starovoitov <ast@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
bpf@...r.kernel.org
Subject: [PATCH bpf-next 0/3] libbpf: Support pinning of maps using 'pinning'
BTF attribute
This series adds support to libbpf for reading 'pinning' settings from BTF-based
map definitions. It introduces new variants of the bpf_object__(un)pin_maps()
functions which accepts options with the new options struct definition style.
These allow the caller to configure pinning options to use both old-style
"forced pinning" where all defined maps are pinned, and the new pinning that is
based on the BTF attribute.
The actual semantics of the pinning is similar to what iproute2 allows today,
and the eventual goal is to move the iproute2 implementation to be based on
libbpf and the functions introduced in this series.
A follow-up series will add support to libbpf for automatic map pinning on
program load (with optional reuse of existing maps if they are already pinned).
However, the functions introduced in this series can be used standalone, and so
I decided to break things up to ease review.
---
Toke Høiland-Jørgensen (3):
libbpf: Store map pin path in struct bpf_map
libbpf: Support configurable pinning of maps from BTF annotations
libbpf: Add pin option to automount BPF filesystem before pinning
tools/lib/bpf/bpf_helpers.h | 8 ++
tools/lib/bpf/libbpf.c | 189 ++++++++++++++++++++++++++++++++++++-------
tools/lib/bpf/libbpf.h | 36 ++++++++
tools/lib/bpf/libbpf.map | 4 +
4 files changed, 208 insertions(+), 29 deletions(-)
Powered by blists - more mailing lists