Thread (49 messages) flat view 49 messages, 3 authors, 2021-12-01

Re: [PATCH bpf-next 09/29] bpf: Add support to load multi func tracing program

From: Jiri Olsa <hidden>
Date: 2021-11-22 20:15:35
Also in: bpf

On Thu, Nov 18, 2021 at 08:11:59PM -0800, Alexei Starovoitov wrote:
On Thu, Nov 18, 2021 at 12:24:35PM +0100, Jiri Olsa wrote:
quoted
+
+DEFINE_BPF_MULTI_FUNC(unsigned long a1, unsigned long a2,
+		      unsigned long a3, unsigned long a4,
+		      unsigned long a5, unsigned long a6)
This is probably a bit too x86 specific. May be make add all 12 args?
Or other places would need to be tweaked?
I think si, I'll check
quoted
+BTF_ID_LIST_SINGLE(bpf_multi_func_btf_id, func, bpf_multi_func)
...
quoted
-	prog->aux->attach_btf_id = attr->attach_btf_id;
+	prog->aux->attach_btf_id = multi_func ? bpf_multi_func_btf_id[0] : attr->attach_btf_id;
Just ignoring that was passed in uattr?
Maybe instead of ignoring dopr BPF_F_MULTI_FUNC and make libbpf
point to that btf_id instead?
Then multi or not can be checked with if (attr->attach_btf_id == bpf_multi_func_btf_id[0]).
nice idea, it might fit better than the flag

thanks,
jirka
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help