From: Donald Hunter <donald.hunter@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Barret Rhoden <brho@google.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: Repo for tips / tricks / common code?
Date: Wed, 19 Jul 2023 10:51:12 +0100 [thread overview]
Message-ID: <m2cz0oz0tr.fsf@gmail.com> (raw)
In-Reply-To: <CAADnVQ+MtUZ27vjMnXbFG33j15ZV2FdZgpe4tcDrwXgmp41nxQ@mail.gmail.com> (Alexei Starovoitov's message of "Tue, 18 Jul 2023 15:17:02 -0700")
Alexei Starovoitov <alexei.starovoitov@gmail.com> writes:
> On Tue, Jul 18, 2023 at 9:15 AM Barret Rhoden <brho@google.com> 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
prev parent reply other threads:[~2023-07-19 10:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 16:15 Repo for tips / tricks / common code? Barret Rhoden
2023-07-18 22:17 ` Alexei Starovoitov
2023-07-19 9:51 ` Donald Hunter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2cz0oz0tr.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brho@google.com \
--cc=daniel@iogearbox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.