summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2020-12-18 15:56:13 -0800
committerAlexei Starovoitov <ast@kernel.org>2021-01-08 13:39:24 -0800
commita4b09a9ef9451b09d87550720f8db3ae280b3eea (patch)
treeaf6ca6260d1b732faeb58cdf06a335680ce70c3e /drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
parent792001f4f7aa036b1f1c1ed7bce44bb49126208a (diff)
downloadlinux-a4b09a9ef9451b09d87550720f8db3ae280b3eea.tar.gz
linux-a4b09a9ef9451b09d87550720f8db3ae280b3eea.tar.bz2
linux-a4b09a9ef9451b09d87550720f8db3ae280b3eea.zip
libbpf: Add non-CO-RE variants of BPF_CORE_READ() macro family
BPF_CORE_READ(), in addition to handling CO-RE relocations, also allows much nicer way to read data structures with nested pointers. Instead of writing a sequence of bpf_probe_read() calls to follow links, one can just write BPF_CORE_READ(a, b, c, d) to effectively do a->b->c->d read. This is a welcome ability when porting BCC code, which (in most cases) allows exactly the intuitive a->b->c->d variant. This patch adds non-CO-RE variants of BPF_CORE_READ() family of macros for cases where CO-RE is not supported (e.g., old kernels). In such cases, the property of shortening a sequence of bpf_probe_read()s to a simple BPF_PROBE_READ(a, b, c, d) invocation is still desirable, especially when porting BCC code to libbpf. Yet, no CO-RE relocation is going to be emitted. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20201218235614.2284956-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c')
0 files changed, 0 insertions, 0 deletions