Re: [RFC Patch bpf-next] bpf: introduce bpf timer
From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2021-04-27 11:52:08
Also in:
bpf
On 2021-04-26 10:01 p.m., Alexei Starovoitov wrote: [..]
quoted
They are already in CC from the very beginning. And our use case is public, it is Cilium conntrack: https://github.com/cilium/cilium/blob/master/bpf/lib/conntrack.h The entries of the code are: https://github.com/cilium/cilium/blob/master/bpf/bpf_lxc.c The maps for conntrack are: https://github.com/cilium/cilium/blob/master/bpf/lib/conntrack_map.hIf that's the only goal then kernel timers are not needed. cilium conntrack works well as-is.
IIRC, the original patch from Cong was driven by need to scale said conntracking in presence of large number of flows. The arguement i heard from Cong is LRU doesnt scale in such a setup. I would argue timers generally are useful for a variety of house keeping purposes and they are currently missing from ebpf. This despite Cong's use case. Currently things in the datapath are triggered by either packets showing up or from a control plane perspective by user space polling. Our use case (honestly, not that it matters to justify why we need timers) is we want to periodically, if some condition is met in the kernel, to send unsolicited housekeeping events to user space. Hope that helps. cheers, jamal