From: Nick Connolly <nick.connolly@mayadata.io>
To: William Tu <u9012063@gmail.com>, dev@dpdk.org
Cc: dmitry.kozliuk@gmail.com, sergey.madaminov@gmail.com
Subject: Re: [dpdk-dev] [PATCH] eal/windows: add sys/queue.h.
Date: Tue, 10 Aug 2021 22:05:56 +0100 [thread overview]
Message-ID: <fcc523a8-189b-e386-a5f4-ccbbef728238@mayadata.io> (raw)
In-Reply-To: <20210805173345.1085-1-u9012063@gmail.com>
> diff --git a/lib/eal/windows/include/meson.build b/lib/eal/windows/include/meson.build
> index b3534b025f..875cc1cf0d 100644
> --- a/lib/eal/windows/include/meson.build
> +++ b/lib/eal/windows/include/meson.build
> @@ -8,3 +8,7 @@ headers += files(
> 'rte_virt2phys.h',
> 'rte_windows.h',
> )
> +
> +sys_headers = []
> +subdir('sys')
> +install_headers(sys_headers, subdir: 'sys')
> diff --git a/lib/eal/windows/include/sys/meson.build b/lib/eal/windows/include/sys/meson.build
> new file mode 100644
> index 0000000000..6896cbf678
> --- /dev/null
> +++ b/lib/eal/windows/include/sys/meson.build
> @@ -0,0 +1,6 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright 2021 VMware, Inc
> +
> +sys_headers += files(
> + 'queue.h',
> +)
Hi William,
If I've understood this change correctly it will create a sys/queue.h
header in the build/include folder.
This seems like a reasonable approach to handle missing functionality,
but unfortunately it is problematic.
An application that links against DPDK is likely to be dealing with
similar issues with missing functionality
and providing a definition in the DPDK includes can conflict with the
approach taken by the application
(in this instance there could be two versions of sys/queue.h in the
include paths leading to ambiguity).
After discussion, the approach adopted by the DPDK community is that:
* DPDK should depend only on the C library and not require POSIX
functionality from the underlying
system (headers, definitions etc). Missing functionality should be
implemented within the DPDK
code.
* DPDK should not export POSIX functionality into the environment
(symbols, macros, headers etc)
to avoid these definitions clashing with the application.
In this instance, it seems that rte_log.h depends upon the system having
sys/queue.h which is not
a standard C dependency. The appropriate response here (based on the
above approach) is to remove
the sys/queue.h dependency from rte_log.h and ensure that it only
depends upon rte_* definitions
contained within the DPDK.
Regards,
Nick
next prev parent reply other threads:[~2021-08-10 21:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 17:33 William Tu
2021-08-10 21:05 ` Nick Connolly [this message]
2021-08-10 22:33 ` Dmitry Kozlyuk
2021-08-11 8:34 ` Nick Connolly
2021-08-11 15:18 ` William Tu
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=fcc523a8-189b-e386-a5f4-ccbbef728238@mayadata.io \
--to=nick.connolly@mayadata.io \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=sergey.madaminov@gmail.com \
--cc=u9012063@gmail.com \
/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).