summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2019-11-14 10:57:15 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2019-11-15 23:44:48 +0100
commit91cc1a99740e2ed1d903b5906afb470cc5a07379 (patch)
treeea7c450f397b2f02a81cde66a5f1e4f5fb819c5c /net/core
parent9cc31b3a092d9bf2a18f09ad77e727ddb42a5b1e (diff)
downloadblackbird-op-linux-91cc1a99740e2ed1d903b5906afb470cc5a07379.tar.gz
blackbird-op-linux-91cc1a99740e2ed1d903b5906afb470cc5a07379.zip
bpf: Annotate context types
Annotate BPF program context types with program-side type and kernel-side type. This type information is used by the verifier. btf_get_prog_ctx_type() is used in the later patches to verify that BTF type of ctx in BPF program matches to kernel expected ctx type. For example, the XDP program type is: BPF_PROG_TYPE(BPF_PROG_TYPE_XDP, xdp, struct xdp_md, struct xdp_buff) That means that XDP program should be written as: int xdp_prog(struct xdp_md *ctx) { ... } Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20191114185720.1641606-16-ast@kernel.org
Diffstat (limited to 'net/core')
-rw-r--r--net/core/filter.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index f72face90659..49ded4a7588a 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -8684,16 +8684,6 @@ out:
}
#ifdef CONFIG_INET
-struct sk_reuseport_kern {
- struct sk_buff *skb;
- struct sock *sk;
- struct sock *selected_sk;
- void *data_end;
- u32 hash;
- u32 reuseport_id;
- bool bind_inany;
-};
-
static void bpf_init_reuseport_kern(struct sk_reuseport_kern *reuse_kern,
struct sock_reuseport *reuse,
struct sock *sk, struct sk_buff *skb,
OpenPOWER on IntegriCloud