Commit 89aa2948 authored by Yonghong Song's avatar Yonghong Song Committed by Brenden Blanco

sync bpf compat headers with latest net-next

Signed-off-by: default avatarYonghong Song <yhs@fb.com>
parent a44d26ed
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#define BPF_ALU64 0x07 /* alu mode in double word width */ #define BPF_ALU64 0x07 /* alu mode in double word width */
/* ld/ldx fields */ /* ld/ldx fields */
#define BPF_DW 0x18 /* double word */ #define BPF_DW 0x18 /* double word (64-bit) */
#define BPF_XADD 0xc0 /* exclusive add */ #define BPF_XADD 0xc0 /* exclusive add */
/* alu/jmp fields */ /* alu/jmp fields */
...@@ -244,6 +244,7 @@ union bpf_attr { ...@@ -244,6 +244,7 @@ union bpf_attr {
* BPF_F_NUMA_NODE is set). * BPF_F_NUMA_NODE is set).
*/ */
char map_name[BPF_OBJ_NAME_LEN]; char map_name[BPF_OBJ_NAME_LEN];
__u32 map_ifindex; /* ifindex of netdev to create on */
}; };
struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
...@@ -899,6 +900,9 @@ struct xdp_md { ...@@ -899,6 +900,9 @@ struct xdp_md {
__u32 data; __u32 data;
__u32 data_end; __u32 data_end;
__u32 data_meta; __u32 data_meta;
/* Below access go through struct xdp_rxq_info */
__u32 ingress_ifindex; /* rxq->dev->ifindex */
__u32 rx_queue_index; /* rxq->queue_index */
}; };
enum sk_action { enum sk_action {
...@@ -921,6 +925,9 @@ struct bpf_prog_info { ...@@ -921,6 +925,9 @@ struct bpf_prog_info {
__u32 nr_map_ids; __u32 nr_map_ids;
__aligned_u64 map_ids; __aligned_u64 map_ids;
char name[BPF_OBJ_NAME_LEN]; char name[BPF_OBJ_NAME_LEN];
__u32 ifindex;
__u64 netns_dev;
__u64 netns_ino;
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
struct bpf_map_info { struct bpf_map_info {
...@@ -931,6 +938,9 @@ struct bpf_map_info { ...@@ -931,6 +938,9 @@ struct bpf_map_info {
__u32 max_entries; __u32 max_entries;
__u32 map_flags; __u32 map_flags;
char name[BPF_OBJ_NAME_LEN]; char name[BPF_OBJ_NAME_LEN];
__u32 ifindex;
__u64 netns_dev;
__u64 netns_ino;
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/* User bpf_sock_ops struct to access socket values and specify request ops /* User bpf_sock_ops struct to access socket values and specify request ops
......
...@@ -17,7 +17,7 @@ R"********( ...@@ -17,7 +17,7 @@ R"********(
#define BPF_ALU64 0x07 /* alu mode in double word width */ #define BPF_ALU64 0x07 /* alu mode in double word width */
/* ld/ldx fields */ /* ld/ldx fields */
#define BPF_DW 0x18 /* double word */ #define BPF_DW 0x18 /* double word (64-bit) */
#define BPF_XADD 0xc0 /* exclusive add */ #define BPF_XADD 0xc0 /* exclusive add */
/* alu/jmp fields */ /* alu/jmp fields */
...@@ -244,6 +244,7 @@ union bpf_attr { ...@@ -244,6 +244,7 @@ union bpf_attr {
* BPF_F_NUMA_NODE is set). * BPF_F_NUMA_NODE is set).
*/ */
char map_name[BPF_OBJ_NAME_LEN]; char map_name[BPF_OBJ_NAME_LEN];
__u32 map_ifindex; /* ifindex of netdev to create on */
}; };
struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
...@@ -898,6 +899,9 @@ struct xdp_md { ...@@ -898,6 +899,9 @@ struct xdp_md {
__u32 data; __u32 data;
__u32 data_end; __u32 data_end;
__u32 data_meta; __u32 data_meta;
/* Below access go through struct xdp_rxq_info */
__u32 ingress_ifindex; /* rxq->dev->ifindex */
__u32 rx_queue_index; /* rxq->queue_index */
}; };
enum sk_action { enum sk_action {
...@@ -920,6 +924,9 @@ struct bpf_prog_info { ...@@ -920,6 +924,9 @@ struct bpf_prog_info {
__u32 nr_map_ids; __u32 nr_map_ids;
__aligned_u64 map_ids; __aligned_u64 map_ids;
char name[BPF_OBJ_NAME_LEN]; char name[BPF_OBJ_NAME_LEN];
__u32 ifindex;
__u64 netns_dev;
__u64 netns_ino;
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
struct bpf_map_info { struct bpf_map_info {
...@@ -930,6 +937,9 @@ struct bpf_map_info { ...@@ -930,6 +937,9 @@ struct bpf_map_info {
__u32 max_entries; __u32 max_entries;
__u32 map_flags; __u32 map_flags;
char name[BPF_OBJ_NAME_LEN]; char name[BPF_OBJ_NAME_LEN];
__u32 ifindex;
__u64 netns_dev;
__u64 netns_ino;
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
/* User bpf_sock_ops struct to access socket values and specify request ops /* User bpf_sock_ops struct to access socket values and specify request ops
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment