Commit 406a6fa4 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

bpf: use bitfields for simple per-subprog bool flags

We have a bunch of bool flags for each subprog. Instead of wasting bytes
for them, use bitfields instead.
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20231204233931.49758-5-andrii@kernel.orgSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 1a1ad782
...@@ -611,12 +611,12 @@ struct bpf_subprog_info { ...@@ -611,12 +611,12 @@ struct bpf_subprog_info {
u32 start; /* insn idx of function entry point */ u32 start; /* insn idx of function entry point */
u32 linfo_idx; /* The idx to the main_prog->aux->linfo */ u32 linfo_idx; /* The idx to the main_prog->aux->linfo */
u16 stack_depth; /* max. stack depth used by this function */ u16 stack_depth; /* max. stack depth used by this function */
bool has_tail_call; bool has_tail_call: 1;
bool tail_call_reachable; bool tail_call_reachable: 1;
bool has_ld_abs; bool has_ld_abs: 1;
bool is_cb; bool is_cb: 1;
bool is_async_cb; bool is_async_cb: 1;
bool is_exception_cb; bool is_exception_cb: 1;
}; };
struct bpf_verifier_env; struct bpf_verifier_env;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment