[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <42da4525-d09e-4be9-7d3c-a4662276b721@gmail.com>
Date: Thu, 24 Sep 2020 16:15:21 -0600
From: David Ahern <dsahern@...il.com>
To: bimmy.pujari@...el.com, bpf@...r.kernel.org
Cc: netdev@...r.kernel.org, mchehab@...nel.org, ast@...nel.org,
daniel@...earbox.net, kafai@...com, maze@...gle.com,
ashkan.nikravesh@...el.com
Subject: Re: [PATCH bpf-next v5] bpf: Add bpf_ktime_get_real_ns
On 9/24/20 4:07 PM, bimmy.pujari@...el.com wrote:
> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index a22812561064..198e69a6508d 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> @@ -3586,6 +3586,13 @@ union bpf_attr {
> * the data in *dst*. This is a wrapper of **copy_from_user**\ ().
> * Return
> * 0 on success, or a negative error in case of failure.
> + *
> + * u64 bpf_ktime_get_real_ns(void)
> + * Description
> + * Return the real time in nanoseconds.
> + * See: **clock_gettime**\ (**CLOCK_REALTIME**)
This should be a little more explicit -- something like "See the caveats
regarding use of CLOCK_REALTIME in clock_gettime man page."
> + * Return
> + * Current *ktime*.
> */
> #define __BPF_FUNC_MAPPER(FN) \
> FN(unspec), \
> @@ -3737,6 +3744,7 @@ union bpf_attr {
> FN(inode_storage_delete), \
> FN(d_path), \
> FN(copy_from_user), \
> + FN(ktime_get_real_ns), \
> /* */
>
> /* integer value in 'imm' field of BPF_CALL instruction selects which helper
Powered by blists - more mailing lists