diff options
| author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-11-03 16:56:19 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-11-05 08:26:19 -0500 |
| commit | 928631e05495fa1f0e9775f555b94dbcbb4e2fb5 (patch) | |
| tree | 68e81ea982fa01410347eb397d94646a9f7f2942 /tools/include/uapi/linux | |
| parent | bd601b6ada11fdfb9e277f24ad2eb54bc599156b (diff) | |
bpftool: print program device bound info
If program is bound to a device, print the name of the relevant
interface or unknown if the netdev has since been removed.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/include/uapi/linux')
| -rw-r--r-- | tools/include/uapi/linux/bpf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 7cebba491011..e92f62cf933a 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h | |||
| @@ -259,6 +259,7 @@ union bpf_attr { | |||
| 259 | __u32 kern_version; /* checked when prog_type=kprobe */ | 259 | __u32 kern_version; /* checked when prog_type=kprobe */ |
| 260 | __u32 prog_flags; | 260 | __u32 prog_flags; |
| 261 | char prog_name[BPF_OBJ_NAME_LEN]; | 261 | char prog_name[BPF_OBJ_NAME_LEN]; |
| 262 | __u32 prog_target_ifindex; /* ifindex of netdev to prep for */ | ||
| 262 | }; | 263 | }; |
| 263 | 264 | ||
| 264 | struct { /* anonymous struct used by BPF_OBJ_* commands */ | 265 | struct { /* anonymous struct used by BPF_OBJ_* commands */ |
| @@ -893,6 +894,10 @@ enum sk_action { | |||
| 893 | 894 | ||
| 894 | #define BPF_TAG_SIZE 8 | 895 | #define BPF_TAG_SIZE 8 |
| 895 | 896 | ||
| 897 | enum bpf_prog_status { | ||
| 898 | BPF_PROG_STATUS_DEV_BOUND = (1 << 0), | ||
| 899 | }; | ||
| 900 | |||
| 896 | struct bpf_prog_info { | 901 | struct bpf_prog_info { |
| 897 | __u32 type; | 902 | __u32 type; |
| 898 | __u32 id; | 903 | __u32 id; |
| @@ -906,6 +911,8 @@ struct bpf_prog_info { | |||
| 906 | __u32 nr_map_ids; | 911 | __u32 nr_map_ids; |
| 907 | __aligned_u64 map_ids; | 912 | __aligned_u64 map_ids; |
| 908 | char name[BPF_OBJ_NAME_LEN]; | 913 | char name[BPF_OBJ_NAME_LEN]; |
| 914 | __u32 ifindex; | ||
| 915 | __u32 status; | ||
| 909 | } __attribute__((aligned(8))); | 916 | } __attribute__((aligned(8))); |
| 910 | 917 | ||
| 911 | struct bpf_map_info { | 918 | struct bpf_map_info { |
