Thread (42 messages) 42 messages, 5 authors, 2021-08-11

Re: [RFC Patch bpf-next] bpf: introduce bpf timer

From: Alexei Starovoitov <hidden>
Date: 2021-04-26 23:05:31
Also in: bpf

On Mon, Apr 26, 2021 at 4:00 PM Cong Wang [off-list ref] wrote:
Hi, Alexei

On Wed, Apr 14, 2021 at 9:25 PM Alexei Starovoitov
[off-list ref] wrote:
quoted
On Wed, Apr 14, 2021 at 9:02 PM Cong Wang [off-list ref] wrote:
quoted
Then how do you prevent prog being unloaded when the timer callback
is still active?
As I said earlier:
"
If prog refers such hmap as above during prog free the kernel does
for_each_map_elem {if (elem->opaque) del_timer().}
"
I have discussed this with my colleagues, sharing timers among different
eBPF programs is a must-have feature for conntrack.

For conntrack, we need to attach two eBPF programs, one on egress and
one on ingress. They share a conntrack table (an eBPF map), and no matter
we use a per-map or per-entry timer, updating the timer(s) could happen
on both sides, hence timers must be shared for both.

So, your proposal we discussed does not work well for this scenario.
why? The timer inside the map element will be shared just fine.
Just like different progs can see the same map value.

Also if your colleagues have something to share they should be
posting to the mailing list. Right now you're acting as a broken phone
passing info back and forth and the knowledge gets lost.
Please ask your colleagues to participate online.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help