aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorDmitrii Banshchikov <[email protected]>2020-11-17 18:45:49 +0000
committerDaniel Borkmann <[email protected]>2020-11-18 22:25:32 +0000
commitd055126180564a57fe533728a4e93d0cb53d49b3 (patch)
treebc4413bce59ff96530fb58525010f22cbb1ff5b3 /tools/bpf/bpftool/prog.c
parentbpf: Add tests for bpf_bprm_opts_set helper (diff)
downloadkernel-d055126180564a57fe533728a4e93d0cb53d49b3.tar.gz
kernel-d055126180564a57fe533728a4e93d0cb53d49b3.zip
bpf: Add bpf_ktime_get_coarse_ns helper
The helper uses CLOCK_MONOTONIC_COARSE source of time that is less accurate but more performant. We have a BPF CGROUP_SKB firewall that supports event logging through bpf_perf_event_output(). Each event has a timestamp and currently we use bpf_ktime_get_ns() for it. Use of bpf_ktime_get_coarse_ns() saves ~15-20 ns in time required for event logging. bpf_ktime_get_ns(): EgressLogByRemoteEndpoint 113.82ns 8.79M bpf_ktime_get_coarse_ns(): EgressLogByRemoteEndpoint 95.40ns 10.48M Signed-off-by: Dmitrii Banshchikov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Martin KaFai Lau <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
0 files changed, 0 insertions, 0 deletions