From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
"Stephen Hemminger" <stephen@networkplumber.org>, <dev@dpdk.org>,
"Tyler Retzlaff" <roretzla@microsoft.com>,
"Bruce Richardson" <bruce.richardson@intel.com>,
"Thomas Monjalon" <thomas@monjalon.net>
Subject: RE: [PATCH v3 0/9] introduce common FOREACH_SAFE macros
Date: Wed, 27 Aug 2025 17:08:50 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9FE79@smartserver.smartshare.dk> (raw)
In-Reply-To: <e9017361-f29b-45da-a1b0-cc745b8c906f@intel.com>
> From: Burakov, Anatoly [mailto:anatoly.burakov@intel.com]
> Sent: Wednesday, 27 August 2025 16.14
>
> On 8/20/2025 8:42 AM, Morten Brørup wrote:
> >> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> >> Sent: Monday, 18 August 2025 18.34
> >>
> >> On Wed, 12 Mar 2025 16:15:29 -0700
> >> Stephen Hemminger <stephen@networkplumber.org> wrote:
> >>
> >>> This series adds common macros for safe iteration over lists.
> >>> It is a subset copy of the macros from FreeBSD that are
> >>> missing from the Linux header sys/queue.h
> >>>
> >>> Chose this over several other options:
> >>> - let each driver define their own as needed.
> >>> One Intel driver got it wrong, others will as well.
> >>> - rename all the queue macros to RTE_XXX variants.
> >>> Seems like useless renaming and confusion.
> >>> - Several distros have libbsd package with the correct macros.
> >>> But adding yet another dependency to DPDK would be annoying
> >>> for something this basic.
> >>>
> >>> There are more macros in FreeBSD header that could be useful,
> >>> but we can add those later as needed here.
> >>>
> >>> lib/eal/include/rte_queue.h | 174 +++++++++++++++++++++++
> >>
> >> Revisiting this and wondering about naming...
> >> The file rte_queue.h is not really DPDK (ie not related to runtime
> >> environment).
> >> Thinking of calling it bsd_queue.h as a compromise
> >
> > Since it replaces sys/queue.h, then maybe sys_queue.h (or rte_sys_queue.h).
> >
> > But more importantly:
> > It is not really DPDK, and thus shouldn't really be part of the EAL.
> > So here's an idea:
> > As part of de-bloating the EAL, can we somehow add a new directory structure
> for independent "libraries" like this?
> > And treat this rte_queue.h file as a "header file only" library, and put it
> there.
> > Then, build wise, the EAL could depend on this "library".
> >
>
> IMO it depends on what you mean by "EAL". EAL is environment abstraction
> layer, and this header abstracts OS, thereby meeting description of an
> "environment abstraction layer"?
This library (header file) is generic, and has zero interaction with the hardware and OS, so it's not an environment abstraction.
The EAL has become a dump for "everything else" that isn't an individual library with its own subdirectory of the /lib directory.
IMO, it would be nice if we could separate generic utility libraries from the EAL.
next prev parent reply other threads:[~2025-08-27 15:08 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-27 18:03 [RFC 0/7] Introduce FreeBSD macros for SAFE iteration Stephen Hemminger
2025-01-27 18:03 ` [RFC 1/7] eal: add queue macro extensions from FreeBSD Stephen Hemminger
2025-01-27 18:03 ` [RFC 2/7] net/qede: fix use after free Stephen Hemminger
2025-01-27 18:03 ` [RFC 3/7] bus/fslmc: " Stephen Hemminger
2025-01-27 18:03 ` [RFC 4/7] net/bnxt: " Stephen Hemminger
2025-01-27 19:25 ` Ajit Khaparde
2025-01-27 18:03 ` [RFC 5/7] net/iavf: replace local version of TAILQ_FOREACH_SAFE Stephen Hemminger
2025-01-27 18:04 ` [RFC 6/7] vhost: replace open coded TAILQ_FOREACH_SAFE Stephen Hemminger
2025-01-27 18:04 ` [RFC 7/7] raw/ifpga: use EAL version of TAILQ_FOREACH_SAFE Stephen Hemminger
2025-01-31 9:03 ` Xu, Rosen
2025-01-27 18:16 ` [RFC 0/7] Introduce FreeBSD macros for SAFE iteration Bruce Richardson
2025-01-27 18:43 ` Stephen Hemminger
2025-01-27 19:29 ` Morten Brørup
2025-01-27 23:14 ` Stephen Hemminger
2025-02-14 17:20 ` [PATCH v2 0/7] Introduce FOREACH_SAFE macros Stephen Hemminger
2025-02-14 17:20 ` [PATCH v2 1/7] eal: add queue macro extensions from FreeBSD Stephen Hemminger
2025-02-19 14:55 ` Thomas Monjalon
2025-02-21 23:05 ` Stephen Hemminger
2025-02-22 8:46 ` Thomas Monjalon
2025-03-12 23:02 ` Stephen Hemminger
2025-03-13 8:00 ` Morten Brørup
2025-03-13 8:56 ` Bruce Richardson
2025-03-13 14:35 ` Thomas Monjalon
2025-03-13 14:41 ` Morten Brørup
2025-03-13 16:24 ` Stephen Hemminger
2025-03-13 16:40 ` Morten Brørup
2025-03-13 17:01 ` Stephen Hemminger
2025-02-14 17:20 ` [PATCH v2 2/7] net/qede: fix use after free Stephen Hemminger
2025-02-14 17:20 ` [PATCH v2 3/7] bus/fslmc: " Stephen Hemminger
2025-02-15 11:12 ` Hemant Agrawal
2025-02-14 17:20 ` [PATCH v2 4/7] net/bnxt: " Stephen Hemminger
2025-02-14 17:20 ` [PATCH v2 5/7] net/iavf: replace local version of TAILQ_FOREACH_SAFE Stephen Hemminger
2025-02-14 17:20 ` [PATCH v2 6/7] vhost: replace open coded TAILQ_FOREACH_SAFE Stephen Hemminger
2025-02-14 17:20 ` [PATCH v2 7/7] raw/ifpga: use EAL version of TAILQ_FOREACH_SAFE Stephen Hemminger
2025-02-15 15:44 ` [PATCH v2 0/7] Introduce FOREACH_SAFE macros Morten Brørup
2025-03-12 23:15 ` [PATCH v3 0/9] introduce common " Stephen Hemminger
2025-03-12 23:15 ` [PATCH v3 1/9] eal: add queue macro extensions from FreeBSD Stephen Hemminger
2025-03-12 23:15 ` [PATCH v3 2/9] net/qede: fix use after free Stephen Hemminger
2025-03-12 23:15 ` [PATCH v3 3/9] bus/fslmc: " Stephen Hemminger
2025-03-12 23:15 ` [PATCH v3 4/9] net/bnxt: " Stephen Hemminger
2025-03-12 23:15 ` [PATCH v3 5/9] net/iavf: replace local version of TAILQ_FOREACH_SAFE Stephen Hemminger
2025-03-12 23:15 ` [PATCH v3 6/9] vhost: replace open coded TAILQ_FOREACH_SAFE Stephen Hemminger
2025-03-12 23:15 ` [PATCH v3 7/9] raw/ifpga: use EAL version of TAILQ_FOREACH_SAFE Stephen Hemminger
2025-03-12 23:15 ` [PATCH v3 8/9] net/i40e: replace open coded version of LIST_FOREACH_SAFE Stephen Hemminger
2025-08-27 14:15 ` Burakov, Anatoly
2025-03-12 23:15 ` [PATCH v3 9/9] net/ice: " Stephen Hemminger
2025-08-27 14:14 ` Burakov, Anatoly
2025-08-18 16:34 ` [PATCH v3 0/9] introduce common FOREACH_SAFE macros Stephen Hemminger
2025-08-20 6:42 ` Morten Brørup
2025-08-27 14:14 ` Burakov, Anatoly
2025-08-27 15:08 ` Morten Brørup [this message]
2025-08-27 15:11 ` Thomas Monjalon
2025-08-27 15:56 ` Morten Brørup
2025-08-27 15:55 ` Bruce Richardson
2025-08-27 16:12 ` Stephen Hemminger
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=98CBD80474FA8B44BF855DF32C47DC35E9FE79@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=roretzla@microsoft.com \
--cc=stephen@networkplumber.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).