From: Edvard Fagerholm <edvard.fagerholm@gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
stable@dpdk.org
Subject: Re: [PATCH v2] cpp: Fix missing extern "C" closing bracket
Date: Fri, 27 Jun 2025 18:48:32 +0300 [thread overview]
Message-ID: <CAMF0iZ5OY9xL1YF1nt8Sd25Z8ghpYZo2cmbJnM6QipTU-+6-Zg@mail.gmail.com> (raw)
In-Reply-To: <5036333.A7TYtsqqnE@thomas>
On Fri, Jun 27, 2025 at 6:16 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 24/06/2025 21:58, Edvard Fagerholm:
> > RTE_FORCE_INTRINSICS with a C++ compiler causes rte_atomic.h and
> > rte_byteorder.h to emit on x86 an extern "C" without a closing
> > brace.
> >
> > Signed-off-by: Edvard Fagerholm <edvard.fagerholm@gmail.com>
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Added root cause tracking:
> Fixes: 719834a6849e ("use C linkage where appropriate in headers")
> Cc: stable@dpdk.org
>
> And changed the #endif comments to show the #ifndef condition is negative
> with an exclamation mark:
> #endif /* !RTE_FORCE_INTRINSICS */
>
> Applied, thanks and welcome!
>
> PS: I see you used AI to code your DPDK app, that's interesting
> and we will probably look to improve such tools in a near future.
>
> PS2: Thanks for the mobile games ;)
>
LLMs do manage to create the scaffolding for a DPDK application quite
well. Basically, NIC setup with different hardware accelerations is
quite tedious to set up for the first time together with starting
worker threads on the right cores. Since I needed to create my
application for ARM and x86 the LLM produced some clearly incorrect
patterns like turning RTE_FORCE_INTRINSICS on for x86 in the generated
cmake file. Hence, why I ran into this bug in the first place...
However, they also generated very inefficient code like updating
atomic variables with stats on every packet as well as making a copy
of each packet (into a malloc'd buffer). In other words, you won't be
able to vibe code yourself into a very efficient application just yet.
I did get all the scaffolding I needed to port an existing XDP
application to DPDK in only a few days, since the XDP application's
entry point is just getting the raw buffer with the packet, modifying
it in-place and sending it back. This is basically what you get in
DPDK too.
Best,
Edvard
prev parent reply other threads:[~2025-06-27 15:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 11:12 [PATCH] " Edvard Fagerholm
2025-06-24 13:52 ` Bruce Richardson
2025-06-24 14:17 ` Edvard Fagerholm
2025-06-24 19:58 ` [PATCH v2] " Edvard Fagerholm
2025-06-27 15:16 ` Thomas Monjalon
2025-06-27 15:48 ` Edvard Fagerholm [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=CAMF0iZ5OY9xL1YF1nt8Sd25Z8ghpYZo2cmbJnM6QipTU-+6-Zg@mail.gmail.com \
--to=edvard.fagerholm@gmail.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.v.ananyev@yandex.ru \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.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 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).