diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2015-05-29 23:23:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-01 06:44:44 +0200 |
commit | 17ca8cbf49be3aa94bb1c2b7ee6545fd70094eb4 (patch) | |
tree | 100f160426a26857a776c4b3fd3beb8848bda474 /kernel/trace/bpf_trace.c | |
parent | isdn/capi: Use setup_timer (diff) | |
download | linux-17ca8cbf49be3aa94bb1c2b7ee6545fd70094eb4.tar.xz linux-17ca8cbf49be3aa94bb1c2b7ee6545fd70094eb4.zip |
ebpf: allow bpf_ktime_get_ns_proto also for networking
As this is already exported from tracing side via commit d9847d310ab4
("tracing: Allow BPF programs to call bpf_ktime_get_ns()"), we might
as well want to move it to the core, so also networking users can make
use of it, e.g. to measure diffs for certain flows from ingress/egress.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/trace/bpf_trace.c')
-rw-r--r-- | kernel/trace/bpf_trace.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 646445e41bd4..50c4015a8ad3 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -79,18 +79,6 @@ static const struct bpf_func_proto bpf_probe_read_proto = { .arg3_type = ARG_ANYTHING, }; -static u64 bpf_ktime_get_ns(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5) -{ - /* NMI safe access to clock monotonic */ - return ktime_get_mono_fast_ns(); -} - -static const struct bpf_func_proto bpf_ktime_get_ns_proto = { - .func = bpf_ktime_get_ns, - .gpl_only = true, - .ret_type = RET_INTEGER, -}; - /* * limited trace_printk() * only %d %u %x %ld %lu %lx %lld %llu %llx %p conversion specifiers allowed |