Thread (11 messages) flat view 11 messages, 3 authors, 2020-02-20

Re: [PATCH bpf-next v4 3/3] selftests/bpf: update xdp_bpf2bpf test to use new set_attach_target API

From: "Eelco Chaudron" <echaudro@redhat.com>
Date: 2020-02-19 10:54:42
Also in: bpf


On 18 Feb 2020, at 22:21, Andrii Nakryiko wrote:
On Mon, Feb 17, 2020 at 5:03 AM Eelco Chaudron [off-list ref] wrote:
quoted
Use the new bpf_program__set_attach_target() API in the xdp_bpf2bpf
selftest so it can be referenced as an example on how to use it.
nit: extra empty line?
ACK <SNIP>
quoted
+       prog = *ftrace_skel->skeleton->progs[0].prog;
it took me a while to understand what's going on here... :) You are
not supposed to peek into ftrace_skel->skeleton, it's an "internal"
object that's passed into libbpf.

It's better to write it as a nice and short:

prog = ftrace_skel->progs.trace_on_entry;
Will change in next rev…
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help