From: Yonghong Song <yhs@fb.com>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>,
Martin KaFai Lau <kafai@fb.com>
Subject: [PATCH bpf-next v4 04/15] bpf: allow tracing programs to use bpf_jiffies64() helper
Date: Tue, 23 Jun 2020 09:17:54 -0700 [thread overview]
Message-ID: <20200623161754.2500657-1-yhs@fb.com> (raw)
In-Reply-To: <20200623161749.2500196-1-yhs@fb.com>
/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>
Signed-off-by: Yonghong Song <yhs@fb.com>
---
kernel/trace/bpf_trace.c | 2 ++
1 file changed, 2 insertions(+)
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;
}
--
2.24.1
next prev parent reply other threads:[~2020-06-23 16:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 16:17 [PATCH bpf-next v4 00/15] implement bpf iterator for tcp and udp sockets Yonghong Song
2020-06-23 16:17 ` [PATCH bpf-next v4 01/15] net: bpf: add bpf_seq_afinfo in tcp_iter_state Yonghong Song
2020-06-23 16:17 ` [PATCH bpf-next v4 02/15] net: bpf: implement bpf iterator for tcp Yonghong Song
2020-06-23 16:17 ` [PATCH bpf-next v4 03/15] bpf: support 'X' in bpf_seq_printf() helper Yonghong Song
2020-06-23 16:17 ` Yonghong Song [this message]
2020-06-23 16:17 ` [PATCH bpf-next v4 05/15] bpf: add bpf_skc_to_tcp6_sock() helper Yonghong Song
2020-06-23 16:17 ` [PATCH bpf-next v4 06/15] bpf: add bpf_skc_to_{tcp,tcp_timewait,tcp_request}_sock() helpers Yonghong Song
2020-06-23 16:17 ` [PATCH bpf-next v4 07/15] net: bpf: add bpf_seq_afinfo in udp_iter_state Yonghong Song
2020-06-23 16:17 ` [PATCH bpf-next v4 08/15] net: bpf: implement bpf iterator for udp Yonghong Song
2020-06-23 16:18 ` [PATCH bpf-next v4 09/15] bpf: add bpf_skc_to_udp6_sock() helper Yonghong Song
2020-06-23 16:18 ` [PATCH bpf-next v4 10/15] selftests/bpf: move newer bpf_iter_* type redefining to a new header file Yonghong Song
2020-06-23 16:18 ` [PATCH bpf-next v4 11/15] selftests/bpf: refactor some net macros to bpf_tracing_net.h Yonghong Song
2020-06-23 18:54 ` Andrii Nakryiko
2020-06-23 16:18 ` [PATCH bpf-next v4 12/15] selftests/bpf: add more common " Yonghong Song
2020-06-23 18:55 ` Andrii Nakryiko
2020-06-23 16:18 ` [PATCH bpf-next v4 13/15] selftests/bpf: implement sample tcp/tcp6 bpf_iter programs Yonghong Song
2020-06-23 16:18 ` [PATCH bpf-next v4 14/15] selftests/bpf: implement sample udp/udp6 " Yonghong Song
2020-06-23 16:18 ` [PATCH bpf-next v4 15/15] selftests/bpf: add tcp/udp iterator programs to selftests Yonghong Song
2020-06-23 21:59 ` [PATCH bpf-next v4 00/15] implement bpf iterator for tcp and udp sockets Martin KaFai Lau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200623161754.2500657-1-yhs@fb.com \
--to=yhs@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).