| f1f6ebc0 | 24-Aug-2021 |
William Tu <[email protected]> |
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 POSI
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 <[email protected]> Suggested-by: Dmitry Kozlyuk <[email protected]> Signed-off-by: William Tu <[email protected]> Acked-by: Dmitry Kozlyuk <[email protected]> Acked-by: Narcisa Vasile <[email protected]>
show more ...
|
| 45d62067 | 10-Apr-2021 |
Dmitry Kozlyuk <[email protected]> |
eal: make OS shims internal
DPDK code often relies on functions and macros that are not standard C, but are found on all platforms, even if by slightly different names. Windows <rte_os.h> provided m
eal: make OS shims internal
DPDK code often relies on functions and macros that are not standard C, but are found on all platforms, even if by slightly different names. Windows <rte_os.h> provided macros or inline definitions for such symbols. However, when placed in public header, these symbols were unnecessarily exposed, breaking consumer POSIX compatibility code.
Move most of the shims to <rte_os_shim.h>, a header to be used instead of <rte_os.h> by internal code. Include it in libraries and PMDs that previously imported shims from <rte_os.h>. Directly replace shims that were only used inside EAL: * index -> strchr, rindex -> strrchr * sleep -> rte_delay_us_sleep * strerror_r -> strerror_s
Signed-off-by: Dmitry Kozlyuk <[email protected]> Acked-by: Thomas Monjalon <[email protected]> Acked-by: Ranjit Menon <[email protected]>
show more ...
|
| 8d935fff | 26-Jan-2021 |
Maxime Coquelin <[email protected]> |
bus/vdev: add driver IOVA VA mode requirement
This patch adds driver flag in vdev bus driver so that vdev drivers can require VA IOVA mode to be used, which for example the case of Virtio-user PMD.
bus/vdev: add driver IOVA VA mode requirement
This patch adds driver flag in vdev bus driver so that vdev drivers can require VA IOVA mode to be used, which for example the case of Virtio-user PMD.
The patch implements the .get_iommu_class() callback, that is called before devices probing to determine the IOVA mode to be used, and adds a check right before the device is probed to ensure compatible IOVA mode has been selected.
It also adds a ABI exception rule to accommodate with an update on the driver registration API
Signed-off-by: Maxime Coquelin <[email protected]> Acked-by: David Marchand <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|