From 814ed5011f52a8e7d9f4494076f3236d36d521ef Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Fri, 1 May 2020 13:23:35 -0700 Subject: [PATCH] sync: auto-generate latest BPF helpers Latest changes to BPF helper definitions. --- src/bpf_helper_defs.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/bpf_helper_defs.h b/src/bpf_helper_defs.h index 67a83c4..acc89a6 100644 --- a/src/bpf_helper_defs.h +++ b/src/bpf_helper_defs.h @@ -83,6 +83,8 @@ static int (*bpf_probe_read)(void *dst, __u32 size, const void *unsafe_ptr) = (v * bpf_ktime_get_ns * * Return the time elapsed since system boot, in nanoseconds. + * Does not include time the system was suspended. + * See: clock_gettime(CLOCK_MONOTONIC) * * Returns * Current *ktime*. @@ -1248,7 +1250,7 @@ static int (*bpf_skb_adjust_room)(struct __sk_buff *skb, __s32 len_diff, __u32 m * * Returns * **XDP_REDIRECT** on success, or the value of the two lower bits - * of the **flags* argument on error. + * of the *flags* argument on error. */ static int (*bpf_redirect_map)(void *map, __u32 key, __u64 flags) = (void *) 51; @@ -2927,4 +2929,16 @@ static __u64 (*bpf_get_current_ancestor_cgroup_id)(int ancestor_level) = (void * */ static int (*bpf_sk_assign)(struct __sk_buff *skb, struct bpf_sock *sk, __u64 flags) = (void *) 124; +/* + * bpf_ktime_get_boot_ns + * + * Return the time elapsed since system boot, in nanoseconds. + * Does include the time the system was suspended. + * See: clock_gettime(CLOCK_BOOTTIME) + * + * Returns + * Current *ktime*. + */ +static __u64 (*bpf_ktime_get_boot_ns)(void) = (void *) 125; +