Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> writes: > On Tue, Jul 18, 2023 at 9:15 AM Barret Rhoden <brho@xxxxxxxxxx> wrote: >> >> Hi - >> >> Is there any interest in a repo or something for reusable BPF code bits? >> I've got some stuff that I do in my programs that might be useful to >> others, but not to the level of a full bpf helper. >> >> For instance, one technique I've developed is to have list-like data >> structures for *mmappable* data that are e.g. per-cpu and per-task. >> Internally, it's an Array map, and each element is identified by its >> index in the array instead of by point. And the linked-list is built >> with index integers instead of pointers. >> >> Anyway, that's just an example, and I imagine other people have their >> own techniques. I've got the code sitting in an open-source repo >> elsewhere, and had a couple people off-list ask me about it. I could >> email it to the list, but it'd get lost in the noise. >> >> If you're curious about specifics, the linked list code is here [1], and >> I briefly mentioned the data structures in my LPC 22 talk [2]. I've got >> an AVL tree that works with this stuff too. > > I think github would be the best place for such code. > https://github.com/libbpf/.../ maybe? Or potentially: https://github.com/xdp-project/bpf-examples > >> Thanks, >> Barret