bpf: make timer data struct more generic
authorBenjamin Tissoires <bentiss@kernel.org>
Sat, 20 Apr 2024 09:09:01 +0000 (11:09 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 24 Apr 2024 01:31:24 +0000 (18:31 -0700)
commitbe2749beff62e0d63cf97fe63cabc79a68443139
tree61df1e8b730fe4ccaf8953e015e043e767f20a30
parenta7de265cb2d849f8986a197499ad58dca0a4f209
bpf: make timer data struct more generic

To be able to add workqueues and reuse most of the timer code, we need
to make bpf_hrtimer more generic.

There is no code change except that the new struct gets a new u64 flags
attribute. We are still below 2 cache lines, so this shouldn't impact
the current running codes.

The ordering is also changed. Everything related to async callback
is now on top of bpf_hrtimer.

Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Link: https://lore.kernel.org/r/20240420-bpf_wq-v2-1-6c986a5a741f@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/helpers.c