Go to file
William Tu f1f6ebc0ea eal: remove sys/queue.h from public headers
Currently there are some public headers that include 'sys/queue.h', which
is not POSIX, but usually provided by the Linux/BSD system library.
(Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008. Present on the BSDs.)
The file is missing on Windows. During the Windows build, DPDK uses a
bundled copy, so building a DPDK library works fine.  But when OVS or other
applications use DPDK as a library, because some DPDK public headers
include 'sys/queue.h', on Windows, it triggers an error due to no such
file.

One solution is to install the 'lib/eal/windows/include/sys/queue.h' into
Windows environment, such as [1]. However, this means DPDK exports the
functionalities of 'sys/queue.h' into the environment, which might cause
symbols, macros, headers clashing with other applications.

The patch fixes it by removing the "#include <sys/queue.h>" from
DPDK public headers, so programs including DPDK headers don't depend
on the system to provide 'sys/queue.h'. When these public headers use
macros such as TAILQ_xxx, we replace it by the ones with RTE_ prefix.
For Windows, we copy the definitions from <sys/queue.h> to rte_os.h
in Windows EAL. Note that these RTE_ macros are compatible with
<sys/queue.h>, both at the level of API (to use with <sys/queue.h>
macros in C files) and ABI (to avoid breaking it).

Additionally, the TAILQ_FOREACH_SAFE is not part of <sys/queue.h>,
the patch replaces it with RTE_TAILQ_FOREACH_SAFE.

[1] http://mails.dpdk.org/archives/dev/2021-August/216304.html

Suggested-by: Nick Connolly <nick.connolly@mayadata.io>
Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
2021-10-01 13:09:43 +02:00
.ci build: update minimum required Meson version 2021-04-16 18:51:51 +02:00
.github/workflows version: 21.11-rc0 2021-08-17 08:37:52 +02:00
app ethdev: use extension header for GTP PSC item 2021-09-28 12:34:58 +02:00
buildtools build: add optional NUMA and CPU counts detection 2021-09-16 09:43:28 +02:00
config config/arm: make N2 crypto an optional feature 2021-09-16 18:12:46 +02:00
devtools net/bnxt: support tunnel offload 2021-09-21 06:26:00 +02:00
doc net/iavf: build on Windows 2021-09-30 22:09:49 +02:00
drivers eal: remove sys/queue.h from public headers 2021-10-01 13:09:43 +02:00
examples examples/ipsec-secgw: clear soft expiry configuration 2021-09-28 14:16:37 +02:00
kernel kni: fix crash on userspace VA for segmented packets 2021-06-24 10:04:25 +02:00
lib eal: remove sys/queue.h from public headers 2021-10-01 13:09:43 +02:00
license lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
usertools raw/cnxk_bphy: add baseband PHY skeleton driver 2021-07-05 23:08:11 +02:00
.editorconfig doc: add Meson coding style to contributors guide 2021-04-21 14:04:09 +02:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add flow API features tables 2021-05-18 19:06:56 +02:00
.travis.yml version: 21.11-rc0 2021-08-17 08:37:52 +02:00
ABI_VERSION version: 21.11-rc0 2021-08-17 08:37:52 +02:00
MAINTAINERS maintainers: sort NXP raw drivers 2021-09-22 21:50:54 +02:00
Makefile build: create dummy Makefile 2020-09-07 23:51:57 +02:00
meson_options.txt build: add optional NUMA and CPU counts detection 2021-09-16 09:43:28 +02:00
meson.build lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
VERSION version: 21.11-rc0 2021-08-17 08:37:52 +02:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org