numam-dpdk/lib/ethdev
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
..
ethdev_driver.h lib: remove C++ include guard from private headers 2021-09-22 22:00:17 +02:00
ethdev_pci.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ethdev_private.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ethdev_private.h lib: remove C++ include guard from private headers 2021-09-22 22:00:17 +02:00
ethdev_profile.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ethdev_profile.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ethdev_trace_points.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ethdev_vdev.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
meson.build lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_class_eth.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_dev_info.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_eth_ctrl.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_ethdev_core.h eal: remove sys/queue.h from public headers 2021-10-01 13:09:43 +02:00
rte_ethdev_trace_fp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_ethdev_trace.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_ethdev.c devargs: parse global device syntax 2021-09-02 17:02:27 +02:00
rte_ethdev.h ethdev: group constant definitions in Doxygen 2021-09-27 13:34:45 +02:00
rte_flow_driver.h ethdev: introduce indirect flow action 2021-04-19 18:25:42 +02:00
rte_flow.c ethdev: fix integrity flow item 2021-05-04 17:37:22 +02:00
rte_flow.h ethdev: use extension header for GTP PSC item 2021-09-28 12:34:58 +02:00
rte_mtr_driver.h ethdev: add pre-defined meter policy API 2021-04-21 12:22:17 +02:00
rte_mtr.c ethdev: add pre-defined meter policy API 2021-04-21 12:22:17 +02:00
rte_mtr.h ethdev: add pre-defined meter policy API 2021-04-21 12:22:17 +02:00
rte_tm_driver.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_tm.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_tm.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
version.map ethdev: promote sibling iterators to stable 2021-09-15 11:48:54 +02:00