Merge branch 'bpftool: miscellaneous fixes'
Quentin Monnet says: ==================== This set contains several independent minor fixes for bpftool, its Makefile, and its documentation. Please refer to individual commits for details. ==================== Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
This commit is contained in:
commit
c874dff452
@ -1,6 +1,5 @@
|
|||||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
include ../../../scripts/Makefile.include
|
include ../../../scripts/Makefile.include
|
||||||
include ../../../scripts/utilities.mak
|
|
||||||
|
|
||||||
INSTALL ?= install
|
INSTALL ?= install
|
||||||
RM ?= rm -f
|
RM ?= rm -f
|
||||||
|
@ -13,7 +13,7 @@ SYNOPSIS
|
|||||||
**bpftool** [*OPTIONS*] **btf** *COMMAND*
|
**bpftool** [*OPTIONS*] **btf** *COMMAND*
|
||||||
|
|
||||||
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | {**-d** | **--debug** } |
|
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | {**-d** | **--debug** } |
|
||||||
{ **-B** | **--base-btf** } }
|
{ **-B** | **--base-btf** } }
|
||||||
|
|
||||||
*COMMANDS* := { **dump** | **help** }
|
*COMMANDS* := { **dump** | **help** }
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ SYNOPSIS
|
|||||||
**bpftool** [*OPTIONS*] **cgroup** *COMMAND*
|
**bpftool** [*OPTIONS*] **cgroup** *COMMAND*
|
||||||
|
|
||||||
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
||||||
{ **-f** | **--bpffs** } }
|
{ **-f** | **--bpffs** } }
|
||||||
|
|
||||||
*COMMANDS* :=
|
*COMMANDS* :=
|
||||||
{ **show** | **list** | **tree** | **attach** | **detach** | **help** }
|
{ **show** | **list** | **tree** | **attach** | **detach** | **help** }
|
||||||
@ -30,9 +30,9 @@ CGROUP COMMANDS
|
|||||||
| *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* }
|
| *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* }
|
||||||
| *ATTACH_TYPE* := { **ingress** | **egress** | **sock_create** | **sock_ops** | **device** |
|
| *ATTACH_TYPE* := { **ingress** | **egress** | **sock_create** | **sock_ops** | **device** |
|
||||||
| **bind4** | **bind6** | **post_bind4** | **post_bind6** | **connect4** | **connect6** |
|
| **bind4** | **bind6** | **post_bind4** | **post_bind6** | **connect4** | **connect6** |
|
||||||
| **getpeername4** | **getpeername6** | **getsockname4** | **getsockname6** | **sendmsg4** |
|
| **getpeername4** | **getpeername6** | **getsockname4** | **getsockname6** | **sendmsg4** |
|
||||||
| **sendmsg6** | **recvmsg4** | **recvmsg6** | **sysctl** | **getsockopt** | **setsockopt** |
|
| **sendmsg6** | **recvmsg4** | **recvmsg6** | **sysctl** | **getsockopt** | **setsockopt** |
|
||||||
| **sock_release** }
|
| **sock_release** }
|
||||||
| *ATTACH_FLAGS* := { **multi** | **override** }
|
| *ATTACH_FLAGS* := { **multi** | **override** }
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
@ -98,9 +98,9 @@ DESCRIPTION
|
|||||||
**sendmsg6** call to sendto(2), sendmsg(2), sendmmsg(2) for an
|
**sendmsg6** call to sendto(2), sendmsg(2), sendmmsg(2) for an
|
||||||
unconnected udp6 socket (since 4.18);
|
unconnected udp6 socket (since 4.18);
|
||||||
**recvmsg4** call to recvfrom(2), recvmsg(2), recvmmsg(2) for
|
**recvmsg4** call to recvfrom(2), recvmsg(2), recvmmsg(2) for
|
||||||
an unconnected udp4 socket (since 5.2);
|
an unconnected udp4 socket (since 5.2);
|
||||||
**recvmsg6** call to recvfrom(2), recvmsg(2), recvmmsg(2) for
|
**recvmsg6** call to recvfrom(2), recvmsg(2), recvmmsg(2) for
|
||||||
an unconnected udp6 socket (since 5.2);
|
an unconnected udp6 socket (since 5.2);
|
||||||
**sysctl** sysctl access (since 5.2);
|
**sysctl** sysctl access (since 5.2);
|
||||||
**getsockopt** call to getsockopt (since 5.3);
|
**getsockopt** call to getsockopt (since 5.3);
|
||||||
**setsockopt** call to setsockopt (since 5.3);
|
**setsockopt** call to setsockopt (since 5.3);
|
||||||
|
@ -13,7 +13,7 @@ SYNOPSIS
|
|||||||
**bpftool** [*OPTIONS*] **gen** *COMMAND*
|
**bpftool** [*OPTIONS*] **gen** *COMMAND*
|
||||||
|
|
||||||
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
||||||
{ **-L** | **--use-loader** } }
|
{ **-L** | **--use-loader** } }
|
||||||
|
|
||||||
*COMMAND* := { **object** | **skeleton** | **help** }
|
*COMMAND* := { **object** | **skeleton** | **help** }
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ SYNOPSIS
|
|||||||
**bpftool** [*OPTIONS*] **link** *COMMAND*
|
**bpftool** [*OPTIONS*] **link** *COMMAND*
|
||||||
|
|
||||||
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
||||||
{ **-f** | **--bpffs** } | { **-n** | **--nomount** } }
|
{ **-f** | **--bpffs** } | { **-n** | **--nomount** } }
|
||||||
|
|
||||||
*COMMANDS* := { **show** | **list** | **pin** | **help** }
|
*COMMANDS* := { **show** | **list** | **pin** | **help** }
|
||||||
|
|
||||||
|
@ -13,11 +13,11 @@ SYNOPSIS
|
|||||||
**bpftool** [*OPTIONS*] **map** *COMMAND*
|
**bpftool** [*OPTIONS*] **map** *COMMAND*
|
||||||
|
|
||||||
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
||||||
{ **-f** | **--bpffs** } | { **-n** | **--nomount** } }
|
{ **-f** | **--bpffs** } | { **-n** | **--nomount** } }
|
||||||
|
|
||||||
*COMMANDS* :=
|
*COMMANDS* :=
|
||||||
{ **show** | **list** | **create** | **dump** | **update** | **lookup** | **getnext**
|
{ **show** | **list** | **create** | **dump** | **update** | **lookup** | **getnext** |
|
||||||
| **delete** | **pin** | **help** }
|
**delete** | **pin** | **help** }
|
||||||
|
|
||||||
MAP COMMANDS
|
MAP COMMANDS
|
||||||
=============
|
=============
|
||||||
@ -52,7 +52,7 @@ MAP COMMANDS
|
|||||||
| | **devmap** | **devmap_hash** | **sockmap** | **cpumap** | **xskmap** | **sockhash**
|
| | **devmap** | **devmap_hash** | **sockmap** | **cpumap** | **xskmap** | **sockhash**
|
||||||
| | **cgroup_storage** | **reuseport_sockarray** | **percpu_cgroup_storage**
|
| | **cgroup_storage** | **reuseport_sockarray** | **percpu_cgroup_storage**
|
||||||
| | **queue** | **stack** | **sk_storage** | **struct_ops** | **ringbuf** | **inode_storage**
|
| | **queue** | **stack** | **sk_storage** | **struct_ops** | **ringbuf** | **inode_storage**
|
||||||
| **task_storage** }
|
| | **task_storage** | **bloom_filter** }
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
===========
|
===========
|
||||||
|
@ -31,44 +31,44 @@ NET COMMANDS
|
|||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
===========
|
===========
|
||||||
**bpftool net { show | list }** [ **dev** *NAME* ]
|
**bpftool net { show | list }** [ **dev** *NAME* ]
|
||||||
List bpf program attachments in the kernel networking subsystem.
|
List bpf program attachments in the kernel networking subsystem.
|
||||||
|
|
||||||
Currently, only device driver xdp attachments and tc filter
|
Currently, only device driver xdp attachments and tc filter
|
||||||
classification/action attachments are implemented, i.e., for
|
classification/action attachments are implemented, i.e., for
|
||||||
program types **BPF_PROG_TYPE_SCHED_CLS**,
|
program types **BPF_PROG_TYPE_SCHED_CLS**,
|
||||||
**BPF_PROG_TYPE_SCHED_ACT** and **BPF_PROG_TYPE_XDP**.
|
**BPF_PROG_TYPE_SCHED_ACT** and **BPF_PROG_TYPE_XDP**.
|
||||||
For programs attached to a particular cgroup, e.g.,
|
For programs attached to a particular cgroup, e.g.,
|
||||||
**BPF_PROG_TYPE_CGROUP_SKB**, **BPF_PROG_TYPE_CGROUP_SOCK**,
|
**BPF_PROG_TYPE_CGROUP_SKB**, **BPF_PROG_TYPE_CGROUP_SOCK**,
|
||||||
**BPF_PROG_TYPE_SOCK_OPS** and **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**,
|
**BPF_PROG_TYPE_SOCK_OPS** and **BPF_PROG_TYPE_CGROUP_SOCK_ADDR**,
|
||||||
users can use **bpftool cgroup** to dump cgroup attachments.
|
users can use **bpftool cgroup** to dump cgroup attachments.
|
||||||
For sk_{filter, skb, msg, reuseport} and lwt/seg6
|
For sk_{filter, skb, msg, reuseport} and lwt/seg6
|
||||||
bpf programs, users should consult other tools, e.g., iproute2.
|
bpf programs, users should consult other tools, e.g., iproute2.
|
||||||
|
|
||||||
The current output will start with all xdp program attachments, followed by
|
The current output will start with all xdp program attachments, followed by
|
||||||
all tc class/qdisc bpf program attachments. Both xdp programs and
|
all tc class/qdisc bpf program attachments. Both xdp programs and
|
||||||
tc programs are ordered based on ifindex number. If multiple bpf
|
tc programs are ordered based on ifindex number. If multiple bpf
|
||||||
programs attached to the same networking device through **tc filter**,
|
programs attached to the same networking device through **tc filter**,
|
||||||
the order will be first all bpf programs attached to tc classes, then
|
the order will be first all bpf programs attached to tc classes, then
|
||||||
all bpf programs attached to non clsact qdiscs, and finally all
|
all bpf programs attached to non clsact qdiscs, and finally all
|
||||||
bpf programs attached to root and clsact qdisc.
|
bpf programs attached to root and clsact qdisc.
|
||||||
|
|
||||||
**bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ]
|
**bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ]
|
||||||
Attach bpf program *PROG* to network interface *NAME* with
|
Attach bpf program *PROG* to network interface *NAME* with
|
||||||
type specified by *ATTACH_TYPE*. Previously attached bpf program
|
type specified by *ATTACH_TYPE*. Previously attached bpf program
|
||||||
can be replaced by the command used with **overwrite** option.
|
can be replaced by the command used with **overwrite** option.
|
||||||
Currently, only XDP-related modes are supported for *ATTACH_TYPE*.
|
Currently, only XDP-related modes are supported for *ATTACH_TYPE*.
|
||||||
|
|
||||||
*ATTACH_TYPE* can be of:
|
*ATTACH_TYPE* can be of:
|
||||||
**xdp** - try native XDP and fallback to generic XDP if NIC driver does not support it;
|
**xdp** - try native XDP and fallback to generic XDP if NIC driver does not support it;
|
||||||
**xdpgeneric** - Generic XDP. runs at generic XDP hook when packet already enters receive path as skb;
|
**xdpgeneric** - Generic XDP. runs at generic XDP hook when packet already enters receive path as skb;
|
||||||
**xdpdrv** - Native XDP. runs earliest point in driver's receive path;
|
**xdpdrv** - Native XDP. runs earliest point in driver's receive path;
|
||||||
**xdpoffload** - Offload XDP. runs directly on NIC on each packet reception;
|
**xdpoffload** - Offload XDP. runs directly on NIC on each packet reception;
|
||||||
|
|
||||||
**bpftool** **net detach** *ATTACH_TYPE* **dev** *NAME*
|
**bpftool** **net detach** *ATTACH_TYPE* **dev** *NAME*
|
||||||
Detach bpf program attached to network interface *NAME* with
|
Detach bpf program attached to network interface *NAME* with
|
||||||
type specified by *ATTACH_TYPE*. To detach bpf program, same
|
type specified by *ATTACH_TYPE*. To detach bpf program, same
|
||||||
*ATTACH_TYPE* previously used for attach must be specified.
|
*ATTACH_TYPE* previously used for attach must be specified.
|
||||||
Currently, only XDP-related modes are supported for *ATTACH_TYPE*.
|
Currently, only XDP-related modes are supported for *ATTACH_TYPE*.
|
||||||
|
|
||||||
**bpftool net help**
|
**bpftool net help**
|
||||||
Print short help message.
|
Print short help message.
|
||||||
|
@ -13,12 +13,12 @@ SYNOPSIS
|
|||||||
**bpftool** [*OPTIONS*] **prog** *COMMAND*
|
**bpftool** [*OPTIONS*] **prog** *COMMAND*
|
||||||
|
|
||||||
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
*OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } |
|
||||||
{ **-f** | **--bpffs** } | { **-m** | **--mapcompat** } | { **-n** | **--nomount** } |
|
{ **-f** | **--bpffs** } | { **-m** | **--mapcompat** } | { **-n** | **--nomount** } |
|
||||||
{ **-L** | **--use-loader** } }
|
{ **-L** | **--use-loader** } }
|
||||||
|
|
||||||
*COMMANDS* :=
|
*COMMANDS* :=
|
||||||
{ **show** | **list** | **dump xlated** | **dump jited** | **pin** | **load**
|
{ **show** | **list** | **dump xlated** | **dump jited** | **pin** | **load** |
|
||||||
| **loadall** | **help** }
|
**loadall** | **help** }
|
||||||
|
|
||||||
PROG COMMANDS
|
PROG COMMANDS
|
||||||
=============
|
=============
|
||||||
|
@ -19,14 +19,14 @@ SYNOPSIS
|
|||||||
*OBJECT* := { **map** | **program** | **cgroup** | **perf** | **net** | **feature** }
|
*OBJECT* := { **map** | **program** | **cgroup** | **perf** | **net** | **feature** }
|
||||||
|
|
||||||
*OPTIONS* := { { **-V** | **--version** } |
|
*OPTIONS* := { { **-V** | **--version** } |
|
||||||
{ **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } }
|
{ **-j** | **--json** } [{ **-p** | **--pretty** }] | { **-d** | **--debug** } }
|
||||||
|
|
||||||
*MAP-COMMANDS* :=
|
*MAP-COMMANDS* :=
|
||||||
{ **show** | **list** | **create** | **dump** | **update** | **lookup** | **getnext** |
|
{ **show** | **list** | **create** | **dump** | **update** | **lookup** | **getnext** |
|
||||||
**delete** | **pin** | **event_pipe** | **help** }
|
**delete** | **pin** | **event_pipe** | **help** }
|
||||||
|
|
||||||
*PROG-COMMANDS* := { **show** | **list** | **dump jited** | **dump xlated** | **pin** |
|
*PROG-COMMANDS* := { **show** | **list** | **dump jited** | **dump xlated** | **pin** |
|
||||||
**load** | **attach** | **detach** | **help** }
|
**load** | **attach** | **detach** | **help** }
|
||||||
|
|
||||||
*CGROUP-COMMANDS* := { **show** | **list** | **attach** | **detach** | **help** }
|
*CGROUP-COMMANDS* := { **show** | **list** | **attach** | **detach** | **help** }
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
include ../../scripts/Makefile.include
|
include ../../scripts/Makefile.include
|
||||||
include ../../scripts/utilities.mak
|
|
||||||
|
|
||||||
ifeq ($(srctree),)
|
ifeq ($(srctree),)
|
||||||
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
||||||
|
@ -710,7 +710,8 @@ _bpftool()
|
|||||||
hash_of_maps devmap devmap_hash sockmap cpumap \
|
hash_of_maps devmap devmap_hash sockmap cpumap \
|
||||||
xskmap sockhash cgroup_storage reuseport_sockarray \
|
xskmap sockhash cgroup_storage reuseport_sockarray \
|
||||||
percpu_cgroup_storage queue stack sk_storage \
|
percpu_cgroup_storage queue stack sk_storage \
|
||||||
struct_ops inode_storage task_storage ringbuf'
|
struct_ops ringbuf inode_storage task_storage \
|
||||||
|
bloom_filter'
|
||||||
COMPREPLY=( $( compgen -W "$BPFTOOL_MAP_CREATE_TYPES" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$BPFTOOL_MAP_CREATE_TYPES" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
@ -74,6 +74,7 @@ const char * const attach_type_name[__MAX_BPF_ATTACH_TYPE] = {
|
|||||||
[BPF_XDP] = "xdp",
|
[BPF_XDP] = "xdp",
|
||||||
[BPF_SK_REUSEPORT_SELECT] = "sk_skb_reuseport_select",
|
[BPF_SK_REUSEPORT_SELECT] = "sk_skb_reuseport_select",
|
||||||
[BPF_SK_REUSEPORT_SELECT_OR_MIGRATE] = "sk_skb_reuseport_select_or_migrate",
|
[BPF_SK_REUSEPORT_SELECT_OR_MIGRATE] = "sk_skb_reuseport_select_or_migrate",
|
||||||
|
[BPF_PERF_EVENT] = "perf_event",
|
||||||
};
|
};
|
||||||
|
|
||||||
void p_err(const char *fmt, ...)
|
void p_err(const char *fmt, ...)
|
||||||
|
@ -53,6 +53,7 @@ const char * const map_type_name[] = {
|
|||||||
[BPF_MAP_TYPE_RINGBUF] = "ringbuf",
|
[BPF_MAP_TYPE_RINGBUF] = "ringbuf",
|
||||||
[BPF_MAP_TYPE_INODE_STORAGE] = "inode_storage",
|
[BPF_MAP_TYPE_INODE_STORAGE] = "inode_storage",
|
||||||
[BPF_MAP_TYPE_TASK_STORAGE] = "task_storage",
|
[BPF_MAP_TYPE_TASK_STORAGE] = "task_storage",
|
||||||
|
[BPF_MAP_TYPE_BLOOM_FILTER] = "bloom_filter",
|
||||||
};
|
};
|
||||||
|
|
||||||
const size_t map_type_name_size = ARRAY_SIZE(map_type_name);
|
const size_t map_type_name_size = ARRAY_SIZE(map_type_name);
|
||||||
@ -1477,7 +1478,7 @@ static int do_help(int argc, char **argv)
|
|||||||
" devmap | devmap_hash | sockmap | cpumap | xskmap | sockhash |\n"
|
" devmap | devmap_hash | sockmap | cpumap | xskmap | sockhash |\n"
|
||||||
" cgroup_storage | reuseport_sockarray | percpu_cgroup_storage |\n"
|
" cgroup_storage | reuseport_sockarray | percpu_cgroup_storage |\n"
|
||||||
" queue | stack | sk_storage | struct_ops | ringbuf | inode_storage |\n"
|
" queue | stack | sk_storage | struct_ops | ringbuf | inode_storage |\n"
|
||||||
" task_storage }\n"
|
" task_storage | bloom_filter }\n"
|
||||||
" " HELP_SPEC_OPTIONS " |\n"
|
" " HELP_SPEC_OPTIONS " |\n"
|
||||||
" {-f|--bpffs} | {-n|--nomount} }\n"
|
" {-f|--bpffs} | {-n|--nomount} }\n"
|
||||||
"",
|
"",
|
||||||
|
@ -709,8 +709,8 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
|
|||||||
char func_sig[1024];
|
char func_sig[1024];
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
__u32 member_len;
|
__u32 member_len;
|
||||||
|
int fd, err = -1;
|
||||||
ssize_t n;
|
ssize_t n;
|
||||||
int fd;
|
|
||||||
|
|
||||||
if (mode == DUMP_JITED) {
|
if (mode == DUMP_JITED) {
|
||||||
if (info->jited_prog_len == 0 || !info->jited_prog_insns) {
|
if (info->jited_prog_len == 0 || !info->jited_prog_insns) {
|
||||||
@ -749,7 +749,7 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
|
|||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
p_err("can't open file %s: %s", filepath,
|
p_err("can't open file %s: %s", filepath,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
return -1;
|
goto exit_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
n = write(fd, buf, member_len);
|
n = write(fd, buf, member_len);
|
||||||
@ -757,7 +757,7 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
|
|||||||
if (n != (ssize_t)member_len) {
|
if (n != (ssize_t)member_len) {
|
||||||
p_err("error writing output file: %s",
|
p_err("error writing output file: %s",
|
||||||
n < 0 ? strerror(errno) : "short write");
|
n < 0 ? strerror(errno) : "short write");
|
||||||
return -1;
|
goto exit_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (json_output)
|
if (json_output)
|
||||||
@ -771,7 +771,7 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
|
|||||||
info->netns_ino,
|
info->netns_ino,
|
||||||
&disasm_opt);
|
&disasm_opt);
|
||||||
if (!name)
|
if (!name)
|
||||||
return -1;
|
goto exit_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->nr_jited_func_lens && info->jited_func_lens) {
|
if (info->nr_jited_func_lens && info->jited_func_lens) {
|
||||||
@ -866,9 +866,12 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
|
|||||||
kernel_syms_destroy(&dd);
|
kernel_syms_destroy(&dd);
|
||||||
}
|
}
|
||||||
|
|
||||||
btf__free(btf);
|
err = 0;
|
||||||
|
|
||||||
return 0;
|
exit_free:
|
||||||
|
btf__free(btf);
|
||||||
|
bpf_prog_linfo__free(prog_linfo);
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_dump(int argc, char **argv)
|
static int do_dump(int argc, char **argv)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user