From: Stephen Hemminger <stephen@networkplumber.org>
To: Marat Khalili <marat.khalili@huawei.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Subject: Re: BPF elf examples
Date: Tue, 21 Oct 2025 06:38:30 -0700 [thread overview]
Message-ID: <20251021063830.1202be65@phoenix.lan> (raw)
In-Reply-To: <1c2a834602b440d6841ea8120ae37db2@huawei.com>
On Tue, 21 Oct 2025 11:42:25 +0000
Marat Khalili <marat.khalili@huawei.com> wrote:
> > -----Original Message-----
> > Tried using AI to generate tests, and as usual it sort of worked but the
> > example code generated won't load or work. Is there anywhere to find working
> > DPDK examples of using BPF load?
>
> Hello! I'm sitting on some patches adding a framework for generating BPF ELF
> files using libelf and some basic unit tests based on it. Hopefully I'll be
> able to upstream it within the next couple of months.
>
> Generating ELF files is probably beyond the reach of current AI, but once the
> framework is there perhaps it could be used to add test cases, would be
> interesting to try...
I have sample programs now (thanks AI). But building them in meson is messy.
And integrating standalone files in UT is brittle.
Perhaps using bpftool like tap driver does to generate a header file (.h) and
then have UT write a /tmp file to load.
prev parent reply other threads:[~2025-10-21 13:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 20:16 Stephen Hemminger
2025-10-21 11:30 ` Konstantin Ananyev
2025-10-21 11:42 ` Marat Khalili
2025-10-21 13:38 ` Stephen Hemminger [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=20251021063830.1202be65@phoenix.lan \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=konstantin.v.ananyev@yandex.ru \
--cc=marat.khalili@huawei.com \
/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).