On 2021-10-20 19:16, Toke Høiland-Jørgensen wrote:
Lorenz Bauer <lmb@xxxxxxxxxxxxxx> writes:
+bool cookie_init_timestamp_raw(struct tcphdr *th, __be32 *tsval, __be32 *tsecr)
I'm probably missing context, Is there something in this function that
means you can't implement it in BPF?
I was about to reply with some other comments but upon closer inspection
I ended up at the same conclusion: this helper doesn't seem to be needed
at all?
tcp_time_stamp_raw() uses ktime_get_ns(), while bpf_ktime_get_ns() uses
ktime_get_mono_fast_ns(). Is it fine to use ktime_get_mono_fast_ns()
instead of ktime_get_ns()? I'm a bit worried about this note in
Documentation/core-api/timekeeping.rst:
> most drivers should never call them,
> since the time is allowed to jump under certain conditions.