From 9ef20e7aa61f6a4d7576f906fdaf32329bec34bc Mon Sep 17 00:00:00 2001 From: Yonghong Song Date: Sun, 9 Aug 2020 23:57:30 -0700 Subject: [PATCH] sync with latest libbpf repo Signed-off-by: Yonghong Song --- src/cc/compat/linux/virtual_bpf.h | 20 +++++++++++++------- src/cc/libbpf | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/cc/compat/linux/virtual_bpf.h b/src/cc/compat/linux/virtual_bpf.h index c1eef179c8e9..38262630392c 100644 --- a/src/cc/compat/linux/virtual_bpf.h +++ b/src/cc/compat/linux/virtual_bpf.h @@ -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, @@ -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 { @@ -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. @@ -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 */ @@ -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; diff --git a/src/cc/libbpf b/src/cc/libbpf index 734b3f0afe96..bf3ab4b0d8f9 160000 --- a/src/cc/libbpf +++ b/src/cc/libbpf @@ -1 +1 @@ -Subproject commit 734b3f0afe96354cc1a3932c02adcca42ee11bda +Subproject commit bf3ab4b0d8f9256f11d3e048be3f9124f7ed4d18