DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>,
	"Bruce Richardson" <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>
Subject: RE: [RFC 0/7] Introduce FreeBSD macros for SAFE iteration
Date: Mon, 27 Jan 2025 20:29:55 +0100	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F9F8@smartserver.smartshare.dk> (raw)
In-Reply-To: <20250127104341.749f7cff@hermes.local>

> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Monday, 27 January 2025 19.44
> 
> On Mon, 27 Jan 2025 18:16:18 +0000
> Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
> > On Mon, Jan 27, 2025 at 10:03:54AM -0800, Stephen Hemminger 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.
> > >
> >
> > Actually, I wouldn't be that quick to eliminate the last option. It
> may
> > give us some additional options for simplification. For example, the
> > strlcpy and strlcat functions are in libbsd too, and if we had that
> as
> > mandatory dependency, perhaps we could remove some extra code there
> too?
> >
> > /Bruce
> >
> 
> I would be ok with using libbsd but only if we didn't have to keep a
> parallel
> copy for all the other compiler and OS variants. And would it be global
> or
> a per-driver dependency?

+1 to providing our own implementations of relevant libbsd features in the DPDK EAL, rather than depending on the entire libbsd (and libbsd-dev for development). Providing these features as part of a "utilities library" (which is currently integrated into the EAL) is better for non-Unix environments.

Furthermore, libbsd has plenty of stuff we don't need:
https://manpages.debian.org/testing/libbsd-dev/index.html


  reply	other threads:[~2025-01-27 19:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 18:03 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-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 [this message]
2025-01-27 23:14       ` 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=98CBD80474FA8B44BF855DF32C47DC35E9F9F8@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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).