DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: <dev@dpdk.org>
Cc: <david.marchand@redhat.com>
Subject: Re: [PATCH v3] build: drop dependency on libbsd
Date: Tue, 15 Sep 2026 17:35:07 +0100	[thread overview]
Message-ID: <aqlzu6RsCibSzzIj@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20260629142931.2666673-1-bruce.richardson@intel.com>

On Mon, Jun 29, 2026 at 03:29:20PM +0100, Bruce Richardson wrote:
> Glibc added the strlcpy and strlcat functions to version 2.38, released
> in 2023, meaning they are natively available in modern linux distros. At
> this point, the value of having the libbsd provided versions of these
> functions is reduced, so let's simplify the code options here by
> providing just two options for strlcpy rather than three:
> 
> 1. native implementation for BSD and recent Linux
> 2. DPDK-specific fallbacks using snprintf
> 
> Since the strlcpy and strlcat functions are the only two items used from
> libbsd, we can then drop completely any DPDK dependency on libbsd.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> v3:
> * removed additional references to libbsd in scripts and docs
> * corrected detection of strlcpy by adding _GNU_SOURCE to detection
>   check, which matches DPDK build.
> * added extra macro check in fallback header, to handle case where
>   strlcpy is available for DPDK build, but not for app builds, e.g.
>   where strict c11 compliance is required.
> 
> v2:
> * Took the work further than v1, dropping libbsd dependency entirely.
>   Now DPDK just supports native strlcpy or it's own fallback version.
> ---
>  .github/workflows/build.yml       |  2 --
>  app/test/test_string_fns.c        |  4 ++--
>  buildtools/pkg-config/meson.build |  3 +--
>  config/meson.build                |  7 +++----
>  devtools/process-iwyu.py          | 10 +++++-----
>  doc/guides/howto/af_xdp_dp.rst    |  1 -
>  lib/eal/include/rte_string_fns.h  | 22 ++++++----------------
>  lib/eal/meson.build               |  4 +---
>  lib/telemetry/telemetry.c         |  2 --
>  lib/telemetry/telemetry_data.c    |  1 -
>  lib/telemetry/telemetry_legacy.c  |  2 --
>  11 files changed, 18 insertions(+), 40 deletions(-)
> 
Ping for review or comments on this change!

  reply	other threads:[~2026-09-15 16:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24 11:35 [PATCH] build: use native Linux strlcpy when available Bruce Richardson
2026-06-25 13:08 ` [PATCH v2] build: drop dependency on libbsd Bruce Richardson
2026-06-29 11:30   ` David Marchand
2026-06-29 11:52     ` Bruce Richardson
2026-06-29 11:55       ` David Marchand
2026-06-29 14:29 ` [PATCH v3] " Bruce Richardson
2026-09-15 16:35   ` Bruce Richardson [this message]
2026-09-16 11:38   ` David Marchand

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=aqlzu6RsCibSzzIj@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.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