Skip to content

Commit 966789f

Browse files
borkmanndavem330
authored andcommitted
bpf: remove cg_skb_func_proto and use sk_filter_func_proto directly
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 <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f735b64 commit 966789f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

net/core/filter.c

+1-7
Original file line numberDiff line numberDiff line change
@@ -2774,12 +2774,6 @@ xdp_func_proto(enum bpf_func_id func_id)
27742774
}
27752775
}
27762776

2777-
static const struct bpf_func_proto *
2778-
cg_skb_func_proto(enum bpf_func_id func_id)
2779-
{
2780-
return sk_filter_func_proto(func_id);
2781-
}
2782-
27832777
static const struct bpf_func_proto *
27842778
lwt_inout_func_proto(enum bpf_func_id func_id)
27852779
{
@@ -3344,7 +3338,7 @@ const struct bpf_verifier_ops xdp_prog_ops = {
33443338
};
33453339

33463340
const struct bpf_verifier_ops cg_skb_prog_ops = {
3347-
.get_func_proto = cg_skb_func_proto,
3341+
.get_func_proto = sk_filter_func_proto,
33483342
.is_valid_access = sk_filter_is_valid_access,
33493343
.convert_ctx_access = bpf_convert_ctx_access,
33503344
.test_run = bpf_prog_test_run_skb,

0 commit comments

Comments
 (0)