Repo for tips / tricks / common code?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Thanks,
Barret


[1] https://github.com/google/ghost-userspace/blob/main/lib/queue.bpf.h
[2] https://lpc.events/event/16/contributions/1365/attachments/986/1912/lpc22-ebpf-kernel-scheduling-with-ghost.pdf




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux