summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/verifier.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2021-02-10 04:36:26 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-02-11 16:17:50 +0100
commit700d4796ef59f5faf240d307839bd419e2b6bdff (patch)
treedc3d98f6691576479f2b727ce0d9ce7726b33ad7 /kernel/bpf/verifier.c
parentbpf_lru_list: Read double-checked variable once without lock (diff)
downloadlinux-700d4796ef59f5faf240d307839bd419e2b6bdff.tar.xz
linux-700d4796ef59f5faf240d307839bd419e2b6bdff.zip
bpf: Optimize program stats
Move bpf_prog_stats from prog->aux into prog to avoid one extra load in critical path of program execution. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210210033634.62081-2-alexei.starovoitov@gmail.com
Diffstat (limited to '')
-rw-r--r--kernel/bpf/verifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 400d79e99fc8..424c1ba0f52f 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -11253,7 +11253,7 @@ static int jit_subprogs(struct bpf_verifier_env *env)
/* BPF_PROG_RUN doesn't call subprogs directly,
* hence main prog stats include the runtime of subprogs.
* subprogs don't have IDs and not reachable via prog_get_next_id
- * func[i]->aux->stats will never be accessed and stays NULL
+ * func[i]->stats will never be accessed and stays NULL
*/
func[i] = bpf_prog_alloc_no_stats(bpf_prog_size(len), GFP_USER);
if (!func[i])