diff options
author | Yonghong Song <yhs@fb.com> | 2020-06-23 16:08:08 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-06-24 18:37:58 -0700 |
commit | 72e2b2b66f9c1225e51fc4a1c1e8512959195b76 (patch) | |
tree | b7eda4bf4f89a5f471d680487312001990e3cb71 /kernel/trace/bpf_trace.c | |
parent | c06b0229579806f5b5e14af64cf9c5dc771445b3 (diff) | |
download | lwn-72e2b2b66f9c1225e51fc4a1c1e8512959195b76.tar.gz lwn-72e2b2b66f9c1225e51fc4a1c1e8512959195b76.zip |
bpf: Allow tracing programs to use bpf_jiffies64() helper
/proc/net/tcp{4,6} uses jiffies for various computations.
Let us add bpf_jiffies64() helper to tracing program
so bpf_iter and other programs can use it.
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200623230808.3988073-1-yhs@fb.com
Diffstat (limited to 'kernel/trace/bpf_trace.c')
-rw-r--r-- | kernel/trace/bpf_trace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index b44505f56b6d..0159f12d2af5 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -1135,6 +1135,8 @@ bpf_tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) return &bpf_ringbuf_discard_proto; case BPF_FUNC_ringbuf_query: return &bpf_ringbuf_query_proto; + case BPF_FUNC_jiffies64: + return &bpf_jiffies64_proto; default: return NULL; } |