Thread (45 messages) 45 messages, 6 authors, 2019-11-08

Re: [PATCH v2 bpf-next 16/17] libbpf: Add support for attaching BPF programs to other BPF programs

From: Alexei Starovoitov <hidden>
Date: 2019-11-07 14:33:21
Also in: bpf

On 11/6/19 9:46 PM, Alexei Starovoitov wrote:
quoted hunk ↗ jump to hunk
@@ -3924,6 +3965,14 @@ __bpf_object__open(const char *path, const void *obj_buf, size_t obj_buf_sz,
  		bpf_program__set_type(prog, prog_type);
  		bpf_program__set_expected_attach_type(prog, attach_type);
  		if (prog_type == BPF_PROG_TYPE_TRACING) {
+			if (attach_prog_fd) {
+				err = libbpf_get_prog_btf_id(attach_prog_fd, prog->section_name + 6);
+				if (err > 0) {
+					btf_id = err;
+					err = 0;
+					prog->attach_prog_fd = attach_prog_fd;
+				}
+			} else
  			err = libbpf_attach_btf_id_by_name(prog->section_name,
forgot to squash small cleanup here last night.
pls ignore this particular patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help