History

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.

Jakub Kicinski committed 9 years ago

Commit bd601b61 parent ab3f0064 files · +24 −0Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/bpf.h+6−0
@@ -895,6 +895,10 @@ enum sk_action { · 894 unmodified lines
895 895
896#define BPF_TAG_SIZE 8896#define BPF_TAG_SIZE 8
897 897
898enum bpf_prog_status {
899 BPF_PROG_STATUS_DEV_BOUND = (1 << 0),
900};
901
898struct bpf_prog_info {902struct bpf_prog_info {
899 __u32 type;903 __u32 type;
900 __u32 id;904 __u32 id;
@@ -908,6 +912,8 @@ struct bpf_prog_info { · 7 unmodified lines
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
913struct bpf_map_info {919struct bpf_map_info {