On Thu, 6 Sep 2018 at 17:13, Alexei Starovoitov <alexei.starovoi...@gmail.com> wrote: > bpf_map_pop_elem() is trying to do lookup_and_delete and preserve > validity of value without races. > With pcpu_freelist I don't think there is a solution. > We can have this queue/stack map without prealloc and use kmalloc/kfree > back and forth. Performance will not be as great, but for your use case, > I suspect, it will be good enough. > The key issue with kmalloc/kfree is unbounded time of rcu callbacks. > If somebody starts doing push/pop for every packet, the rcu subsystem > will struggle and nothing we can do about it. > > The only way I could think of to resolve this problem is to reuse > the logic that Joe is working on for socket lookups inside the program. > Joe, > how is that going? Could you repost the latest patches?
I can rebase & send them out. Was just wanting to get a little more testing in. Cheers, Joe