Message ID | 20200617211540.1855961-1-yhs@fb.com |
---|---|
State | Changes Requested |
Delegated to: | BPF Maintainers |
Headers | show |
Series | implement bpf iterator for tcp and udp sockets | expand |
On Wed, Jun 17, 2020 at 02:15:40PM -0700, Yonghong Song wrote: > /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. Acked-by: Martin KaFai Lau <kafai@fb.com>
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index dbee30e2ad91..afaec7e082d9 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; }
/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> --- kernel/trace/bpf_trace.c | 2 ++ 1 file changed, 2 insertions(+)