[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210528195946.2375109-6-memxor@gmail.com>
Date: Sat, 29 May 2021 01:29:44 +0530
From: Kumar Kartikeya Dwivedi <memxor@...il.com>
To: bpf@...r.kernel.org
Cc: Kumar Kartikeya Dwivedi <memxor@...il.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Vlad Buslov <vladbu@...dia.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Joe Stringer <joe@...ium.io>,
Quentin Monnet <quentin@...valent.com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Toke Høiland-Jørgensen <toke@...hat.com>,
netdev@...r.kernel.org
Subject: [PATCH RFC bpf-next 5/7] tools: bpf.h: sync with kernel sources
This will be used to expose bpf_link based libbpf API to users.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@...il.com>
---
tools/include/uapi/linux/bpf.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 2c1ba70abbf1..a3488463d145 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -994,6 +994,7 @@ enum bpf_attach_type {
BPF_SK_LOOKUP,
BPF_XDP,
BPF_SK_SKB_VERDICT,
+ BPF_TC,
__MAX_BPF_ATTACH_TYPE
};
@@ -1007,6 +1008,7 @@ enum bpf_link_type {
BPF_LINK_TYPE_ITER = 4,
BPF_LINK_TYPE_NETNS = 5,
BPF_LINK_TYPE_XDP = 6,
+ BPF_LINK_TYPE_TC = 7,
MAX_BPF_LINK_TYPE,
};
@@ -1447,6 +1449,12 @@ union bpf_attr {
__aligned_u64 iter_info; /* extra bpf_iter_link_info */
__u32 iter_info_len; /* iter_info length */
};
+ struct { /* used by BPF_TC */
+ __u32 parent;
+ __u32 handle;
+ __u32 gen_flags;
+ __u16 priority;
+ } tc;
};
} link_create;
@@ -5519,6 +5527,13 @@ struct bpf_link_info {
struct {
__u32 ifindex;
} xdp;
+ struct {
+ __u32 ifindex;
+ __u32 parent;
+ __u32 handle;
+ __u32 gen_flags;
+ __u16 priority;
+ } tc;
};
} __attribute__((aligned(8)));
--
2.31.1
Powered by blists - more mailing lists