[RFC 01/47] eal: add BSD version of queue.h
Bruce Richardson
bruce.richardson at intel.com
Tue Aug 19 10:00:05 CEST 2025
On Mon, Aug 18, 2025 at 04:27:12PM -0700, Stephen Hemminger wrote:
> The version of sys/queue.h on Linux from glibc was derived
> from an older version of BSD and is missing several key macros
> such as LIST_FOREACH_SAFE. This leads to drivers re-implementing
> the macros (sometimes badly) and other bugs.
>
> Introduce a version of queue.h derived from the current FreeBSD
> header (only comments changed).
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> lib/eal/include/bsd_queue.h | 1075 +++++++++++++++++++++++++++++++++++
> lib/eal/include/meson.build | 1 +
> 2 files changed, 1076 insertions(+)
> create mode 100644 lib/eal/include/bsd_queue.h
>
<snip>
> diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
> index d903577caa..c10b2f09e0 100644
> --- a/lib/eal/include/meson.build
> +++ b/lib/eal/include/meson.build
> @@ -4,6 +4,7 @@
> includes += include_directories('.')
>
> headers += files(
> + 'bsd_queue.h',
> 'rte_alarm.h',
> 'rte_bitmap.h',
> 'rte_bitops.h',
> --
While I agree that bsd_queue is a good name for this file, since it's
exported by DPDK, I would tend to think that it should still have the
rte_prefix on it to avoid any naming conflicts. Therefore, I'd rather it be
called "rte_bsd_queue.h".
/Bruce
More information about the dev
mailing list