diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2022-08-09 09:47:14 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2022-08-09 09:47:14 -0700 |
| commit | 11b9148590146ff8a4e90c7f0186efe06009ec1b (patch) | |
| tree | 50f2f527d2b291be74a67b6f1ae6c03166838e37 /tools/include/uapi/linux/bpf.h | |
| parent | b2d8ef19c6e7ed71ba5092feb0710063a751834f (diff) | |
| parent | 64e15820b987cc8e5864a8b907dfc17861e6ab5a (diff) | |
| download | linux-next-11b9148590146ff8a4e90c7f0186efe06009ec1b.tar.gz linux-next-11b9148590146ff8a4e90c7f0186efe06009ec1b.zip | |
Merge branch 'Add BPF-helper for accessing CLOCK_TAI'
Kurt Kanzenbach says:
====================
Hi,
add a BPF-helper for accessing CLOCK_TAI. Use cases for such a BPF helper
include functionalities such as Tx launch time (e.g. ETF and TAPRIO Qdiscs),
timestamping and policing.
Patch #1 - Introduce BPF helper
Patch #2 - Add test case (skb based)
Changes since v1:
* Update changelog (Alexei Starovoitov)
* Add test case (Alexei Starovoitov, Andrii Nakryiko)
* Add missing function prototype (netdev ci)
Previous versions:
* v1: https://lore.kernel.org/r/20220606103734.92423-1-kurt@linutronix.de/
Jesper Dangaard Brouer (1):
bpf: Add BPF-helper for accessing CLOCK_TAI
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/include/uapi/linux/bpf.h')
| -rw-r--r-- | tools/include/uapi/linux/bpf.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index f58d58e1d547..e174ad28aeb7 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -5341,6 +5341,18 @@ union bpf_attr { * **-EACCES** if the SYN cookie is not valid. * * **-EPROTONOSUPPORT** if CONFIG_IPV6 is not builtin. + * + * u64 bpf_ktime_get_tai_ns(void) + * Description + * A nonsettable system-wide clock derived from wall-clock time but + * ignoring leap seconds. This clock does not experience + * discontinuities and backwards jumps caused by NTP inserting leap + * seconds as CLOCK_REALTIME does. + * + * See: **clock_gettime**\ (**CLOCK_TAI**) + * Return + * Current *ktime*. + * */ #define __BPF_FUNC_MAPPER(FN) \ FN(unspec), \ @@ -5551,6 +5563,7 @@ union bpf_attr { FN(tcp_raw_gen_syncookie_ipv6), \ FN(tcp_raw_check_syncookie_ipv4), \ FN(tcp_raw_check_syncookie_ipv6), \ + FN(ktime_get_tai_ns), \ /* */ /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
