diff options
| author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-11-03 16:56:18 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-11-05 08:26:18 -0500 |
| commit | bd601b6ada11fdfb9e277f24ad2eb54bc599156b (patch) | |
| tree | 358763b441dfcc6d0a3a8a6e75878f1f08cb60e3 /include/uapi/linux | |
| parent | ab3f0063c48c26c927851b6767824e35a716d878 (diff) | |
bpf: report offload info to user space
Extend struct bpf_prog_info to contain information about program
being bound to a device. Since the netdev may get destroyed while
program still exists we need a flag to indicate the program is
loaded for a device, even if the device is gone.
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 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/bpf.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 80d191a93fb0..4455dd195201 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
| @@ -895,6 +895,10 @@ enum sk_action { | |||
| 895 | 895 | ||
| 896 | #define BPF_TAG_SIZE 8 | 896 | #define BPF_TAG_SIZE 8 |
| 897 | 897 | ||
| 898 | enum bpf_prog_status { | ||
| 899 | BPF_PROG_STATUS_DEV_BOUND = (1 << 0), | ||
| 900 | }; | ||
| 901 | |||
| 898 | struct bpf_prog_info { | 902 | struct bpf_prog_info { |
| 899 | __u32 type; | 903 | __u32 type; |
| 900 | __u32 id; | 904 | __u32 id; |
| @@ -908,6 +912,8 @@ struct bpf_prog_info { | |||
| 908 | __u32 nr_map_ids; | 912 | __u32 nr_map_ids; |
| 909 | __aligned_u64 map_ids; | 913 | __aligned_u64 map_ids; |
| 910 | char name[BPF_OBJ_NAME_LEN]; | 914 | char name[BPF_OBJ_NAME_LEN]; |
| 915 | __u32 ifindex; | ||
| 916 | __u32 status; | ||
| 911 | } __attribute__((aligned(8))); | 917 | } __attribute__((aligned(8))); |
| 912 | 918 | ||
| 913 | struct bpf_map_info { | 919 | struct bpf_map_info { |
