Skip to content

Commit

Permalink
bpf: remove cg_skb_func_proto and use sk_filter_func_proto directly
Browse files Browse the repository at this point in the history
Since cg_skb_func_proto() doesn't do anything else than just calling
into sk_filter_func_proto(), remove it and set sk_filter_func_proto()
directly for .get_func_proto callback.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Borkmann authored and David S. Miller committed Jun 10, 2017
1 parent f735b64 commit 966789f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2774,12 +2774,6 @@ xdp_func_proto(enum bpf_func_id func_id)
}
}

static const struct bpf_func_proto *
cg_skb_func_proto(enum bpf_func_id func_id)
{
return sk_filter_func_proto(func_id);
}

static const struct bpf_func_proto *
lwt_inout_func_proto(enum bpf_func_id func_id)
{
Expand Down Expand Up @@ -3344,7 +3338,7 @@ const struct bpf_verifier_ops xdp_prog_ops = {
};

const struct bpf_verifier_ops cg_skb_prog_ops = {
.get_func_proto = cg_skb_func_proto,
.get_func_proto = sk_filter_func_proto,
.is_valid_access = sk_filter_is_valid_access,
.convert_ctx_access = bpf_convert_ctx_access,
.test_run = bpf_prog_test_run_skb,
Expand Down

0 comments on commit 966789f

Please sign in to comment.