goto cleanup;
}
if (json_output)
jsonw_null(json_wtr);
- return 0;
+ err = 0;
+
+cleanup:
+ close(progfd);
+ return err;
}
static int do_detach(int argc, char **argv)
LGTM, thanks!
Reviewed-By: Michal Rostecki
On 11/9/20 8:04 AM, Wang Hai wrote:
progfd is created by prog_parse_fd(), before 'bpftool net attach' exit,
it should be closed.
Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on
interface")
Signed-off-by: Wang Hai
---
tools/bpf/bpftool/net.c | 2 ++
1 file chang
_btf_* functions.
- Rename libbpf__probe_raw_btf function to libbpf__load_raw_btf and
return a BTF descriptor.
Fixes: d7c4b3980c18 ("libbpf: detect supported kernel BTF features and sanitize
BTF")
Signed-off-by: Michal Rostecki
---
tools/lib/bpf/libbpf.c | 28
On Thu, May 16, 2019 at 11:43:03AM -0700, Alexei Starovoitov wrote:
> On Thu, May 16, 2019 at 4:21 AM Michal Rostecki
> wrote:
> >
> > This series of patches move the commonly used bpf_printk macro to
> > bpf_helpers.h which is already included in all BPF programs which
&
bpf_printk is a macro which is commonly used to print out debug messages
in BPF programs and it was copied in many selftests and samples. Since
all of them include bpf_helpers.h, this change moves the macro there.
Signed-off-by: Michal Rostecki
---
tools/testing/selftests/bpf/bpf_helpers.h
The bpf_printk macro was moved to bpf_helpers.h which is included in all
example programs.
Signed-off-by: Michal Rostecki
---
samples/bpf/hbm_kern.h | 11 ++-
samples/bpf/tcp_basertt_kern.c | 7 ---
samples/bpf/tcp_bufs_kern.c| 7 ---
samples/bpf
This series of patches move the commonly used bpf_printk macro to
bpf_helpers.h which is already included in all BPF programs which
defined that macro on their own.
v1->v2:
- If HBM_DEBUG is not defined in hbm sample, undefine bpf_printk and set
an empty macro for it.
Michal Rostecki
bpf_printk is a macro which is commonly used to print out debug messages
in BPF programs and it was copied in many selftests and samples. Since
all of them include bpf_helpers.h, this change moves the macro there.
Signed-off-by: Michal Rostecki
---
tools/testing/selftests/bpf/bpf_helpers.h
The bpf_printk macro was moved to bpf_helpers.h which is included in all
example programs.
Signed-off-by: Michal Rostecki
---
samples/bpf/hbm_kern.h | 12 +++-
samples/bpf/hbm_out_kern.c | 2 ++
samples/bpf/tcp_basertt_kern.c | 7 ---
samples/bpf
This series of patches move the commonly used bpf_printk macro to
bpf_helpers.h which is already included in all BPF programs which
defined that macro on their own.
Michal Rostecki (2):
selftests: bpf: Move bpf_printk to bpf_helpers.h
samples: bpf: Do not define bpf_printk macro
samples/bpf
ibbpf: Provide basic API support to specify BPF obj
name")
Fixes: d7be143b67c2 ("libbpf: Support expected_attach_type at prog load")
Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
Signed-off-by: Michal Rostecki
---
tools/lib/bpf/bpf.c | 14 +-
1 fi
11 matches
Mail list logo