numam-dpdk/drivers/net/failsafe
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
..
failsafe_args.c devargs: unify scratch buffer storage 2021-04-14 22:25:08 +02:00
failsafe_eal.c devargs: unify scratch buffer storage 2021-04-14 22:25:08 +02:00
failsafe_ether.c net/failsafe: check stop call status 2020-10-16 22:26:41 +02:00
failsafe_flow.c eal: remove sys/queue.h from public headers 2021-10-01 13:09:43 +02:00
failsafe_intr.c net/failsafe: fix fd leak 2020-05-11 22:27:39 +02:00
failsafe_ops.c ethdev: replace callback getting filter operations 2021-03-26 18:37:13 +01:00
failsafe_private.h ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
failsafe_rxtx.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
failsafe.c net: add macro to extract MAC address bytes 2021-09-07 19:08:05 +02:00
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
version.map version: 21.11-rc0 2021-08-17 08:37:52 +02:00