Skip to content

Commit

Permalink
sync with latest libbpf repo
Browse files Browse the repository at this point in the history
Signed-off-by: Yonghong Song <yhs@fb.com>
  • Loading branch information
yonghong-song committed Aug 10, 2020
1 parent 6432324 commit 9ef20e7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions src/cc/compat/linux/virtual_bpf.h
Expand Up @@ -82,6 +82,12 @@ struct bpf_cgroup_storage_key {
__u32 attach_type; /* program attach type */
};

union bpf_iter_link_info {
struct {
__u32 map_fd;
} map;
};

/* BPF syscall commands, see bpf(2) man-page for details. */
enum bpf_cmd {
BPF_MAP_CREATE,
Expand Down Expand Up @@ -118,6 +124,7 @@ enum bpf_cmd {
BPF_LINK_GET_NEXT_ID,
BPF_ENABLE_STATS,
BPF_ITER_CREATE,
BPF_LINK_DETACH,
};

enum bpf_map_type {
Expand Down Expand Up @@ -249,13 +256,6 @@ enum bpf_link_type {
MAX_BPF_LINK_TYPE,
};

enum bpf_iter_link_info {
BPF_ITER_LINK_UNSPEC = 0,
BPF_ITER_LINK_MAP_FD = 1,

MAX_BPF_ITER_LINK_INFO,
};

/* cgroup-bpf attach flags used in BPF_PROG_ATTACH command
*
* NONE(default): No further bpf programs allowed in the subtree.
Expand Down Expand Up @@ -623,6 +623,8 @@ union bpf_attr {
};
__u32 attach_type; /* attach type */
__u32 flags; /* extra flags */
__aligned_u64 iter_info; /* extra bpf_iter_link_info */
__u32 iter_info_len; /* iter_info length */
} link_create;

struct { /* struct used by BPF_LINK_UPDATE command */
Expand All @@ -635,6 +637,10 @@ union bpf_attr {
__u32 old_prog_fd;
} link_update;

struct {
__u32 link_fd;
} link_detach;

struct { /* struct used by BPF_ENABLE_STATS command */
__u32 type;
} enable_stats;
Expand Down

0 comments on commit 9ef20e7

Please sign in to comment.