eal/freebsd: fix use of newer cpuset macrosFreeBSD has updated its CPU macros to align more with the definitionsused on Linux[1]. Unfortunately, while this makes compatibility betterin future, it
eal/freebsd: fix use of newer cpuset macrosFreeBSD has updated its CPU macros to align more with the definitionsused on Linux[1]. Unfortunately, while this makes compatibility betterin future, it means we need to have both legacy and newer definitionsupport. Use a meson check to determine which set of macros are used.[1] https://cgit.freebsd.org/src/commit/?id=e2650af157bcBugzilla ID: 1014Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affinity")Fixes: b6be16acfeb1 ("eal: fix control thread affinity with --lcores")Cc: [email protected]Signed-off-by: David Marchand <[email protected]>Signed-off-by: Bruce Richardson <[email protected]>Tested-by: Daxue Gao <[email protected]>
show more ...
eal/freebsd: add missing C++ include guardsAdd missing 'extern "C"' to file.Fixes: 428eb983f5f7 ("eal: add OS specific header file")Cc: [email protected]Signed-off-by: Bruce Richardson <bruce.ri
eal/freebsd: add missing C++ include guardsAdd missing 'extern "C"' to file.Fixes: 428eb983f5f7 ("eal: add OS specific header file")Cc: [email protected]Signed-off-by: Bruce Richardson <[email protected]>
eal: remove sys/queue.h from public headersCurrently there are some public headers that include 'sys/queue.h', whichis not POSIX, but usually provided by the Linux/BSD system library.(Not in POSI
eal: remove sys/queue.h from public headersCurrently there are some public headers that include 'sys/queue.h', whichis 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 abundled copy, so building a DPDK library works fine. But when OVS or otherapplications use DPDK as a library, because some DPDK public headersinclude 'sys/queue.h', on Windows, it triggers an error due to no suchfile.One solution is to install the 'lib/eal/windows/include/sys/queue.h' intoWindows environment, such as [1]. However, this means DPDK exports thefunctionalities of 'sys/queue.h' into the environment, which might causesymbols, macros, headers clashing with other applications.The patch fixes it by removing the "#include <sys/queue.h>" fromDPDK public headers, so programs including DPDK headers don't dependon the system to provide 'sys/queue.h'. When these public headers usemacros 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.hin 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.htmlSuggested-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]>
eal: add timespec_get shimC11 timespec_get() is not provided on some platforms:* MinGW-w64 does not currently implement it [1].* FreeBSD 11 with Clang 10.0.0 does not provide it.Add internal s
eal: add timespec_get shimC11 timespec_get() is not provided on some platforms:* MinGW-w64 does not currently implement it [1].* FreeBSD 11 with Clang 10.0.0 does not provide it.Add internal shims to Windows and FreeBSD EALs.For Windows, it can be removed after [1] is fixed.[1]: https://sourceforge.net/p/mingw-w64/mailman/message/37224689/Signed-off-by: Dmitry Kozlyuk <[email protected]>Acked-by: Jie Zhou <[email protected]>Acked-by: Nick Connolly <[email protected]>
lib: remove librte_ prefix from directory namesThere is no reason for the DPDK libraries to all have 'librte_' prefix onthe directory names. This prefix makes the directory names longer and alsom
lib: remove librte_ prefix from directory namesThere is no reason for the DPDK libraries to all have 'librte_' prefix onthe directory names. This prefix makes the directory names longer and alsomakes it awkward to add features referring to individual libraries in thebuild - should the lib names be specified with or without the prefix.Therefore, we can just remove the library prefix and use the library'sunique name as the directory name, i.e. 'eal' rather than 'librte_eal'Signed-off-by: Bruce Richardson <[email protected]>