diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2015-05-29 23:23:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-31 21:44:44 -0700 |
commit | 17ca8cbf49be3aa94bb1c2b7ee6545fd70094eb4 (patch) | |
tree | 100f160426a26857a776c4b3fd3beb8848bda474 /net/core | |
parent | a24c85abc0815c14d9e5266d06b9acd8a0a57b9a (diff) | |
download | op-kernel-dev-17ca8cbf49be3aa94bb1c2b7ee6545fd70094eb4.zip op-kernel-dev-17ca8cbf49be3aa94bb1c2b7ee6545fd70094eb4.tar.gz |
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 'net/core')
-rw-r--r-- | net/core/filter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 2c30d66..b78a010 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -1423,6 +1423,8 @@ sk_filter_func_proto(enum bpf_func_id func_id) return &bpf_get_smp_processor_id_proto; case BPF_FUNC_tail_call: return &bpf_tail_call_proto; + case BPF_FUNC_ktime_get_ns: + return &bpf_ktime_get_ns_proto; default: return NULL; } |