From: "Björn Svensson A" <bjorn.a.svensson@est.tech>
To: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: librte_bpf: roadmap or any specific plans for this library
Date: Mon, 2 May 2022 14:28:41 +0000 [thread overview]
Message-ID: <DB9P189MB18333831FC62E9A7E36B138BB9C19@DB9P189MB1833.EURP189.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <8e8fcdea-5265-1126-4912-c7fec9b659c4@yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]
Thanks for the feedback.
>> Example of the new API:
>> struct rte_bpf *
>> rte_bpf_elf_image_load(const struct rte_bpf_prm *prm, char *image,
>> size_t size, const char *sname);
>>
> Did you look at rte_bpf_load()?
> Basically it works with already pre-loaded into memory bpf program.
> In fact, rte_bpf_elf_load() calls it internally after reading elf
> sections, resolving external references, etc.
> Would it meet your needs?
Yes, I think we could create our own elf_image_load() function that uses rte_bpf_load().
I understand that we don't want to have a bunch of specific variants of load-functions in dpdk,
specially if they are not used in any example or usecase.
> AFAIK linux BPF is restricted to work with a single argument only.
> I don't want DPDK version to fork too far away from 'canonical' version.
> Though, as I said above, nothing prevents you to create a struct
> with several fields, and pass pointer to that struct to your BPF program.
> Would such approach work for you?
Good alternative idea. We will test this approach.
I guess we will use the RTE_BPF_ARG_PTR as an argument for the program in this case.
Just as sidenote: we have also had a glance at
https://github.com/iovisor/ubpf
as an alternative. This is a standalone BPF VM lib, but with Apache 2.0 license and it's not bound to the dpdk log framework.
I have no views on benefits using this in dpdk, but it might be an input for future talks about a common library / collaboration.
Thanks again.
Bjorn
[-- Attachment #2: Type: text/html, Size: 4798 bytes --]
next prev parent reply other threads:[~2022-05-03 8:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 23:38 Björn Svensson A
2022-04-28 10:34 ` David Marchand
2022-04-28 17:03 ` Konstantin Ananyev
2022-05-02 14:28 ` Björn Svensson A [this message]
2022-05-03 23:17 ` Konstantin Ananyev
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=DB9P189MB18333831FC62E9A7E36B138BB9C19@DB9P189MB1833.EURP189.PROD.OUTLOOK.COM \
--to=bjorn.a.svensson@est.tech \
--cc=dev@dpdk.org \
--cc=konstantin.v.ananyev@yandex.ru \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).