]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
uapi: update bpf.h
authorStephen Hemminger <stephen@networkplumber.org>
Sun, 16 Aug 2020 23:09:52 +0000 (16:09 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 16 Aug 2020 23:09:52 +0000 (16:09 -0700)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/uapi/linux/bpf.h

index eeb98d35347661f84c3be65e46d2d93a89fb4e46..faf7df1dc0bad101670e4bf591d8ae9c998676d3 100644 (file)
@@ -81,6 +81,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,
@@ -249,13 +255,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 +622,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 */