[dpdk-dev] [PATCH v9 09/12] eal/windows: improve CPU and NUMA node detection
Thomas Monjalon
thomas at monjalon.net
Mon Jun 15 17:21:27 CEST 2020
15/06/2020 02:43, Dmitry Kozlyuk:
> + infos_size = 0;
> + if (!GetLogicalProcessorInformationEx(
> + RelationNumaNode, NULL, &infos_size)) {
> + DWORD error = GetLastError();
> + if (error != ERROR_INSUFFICIENT_BUFFER) {
> + log_early("Cannot get NUMA node info size, error %lu\n",
> + GetLastError());
> + rte_errno = ENOMEM;
> + return -1;
> + }
> + }
> +
> + infos = malloc(infos_size);
> + if (infos == NULL) {
> + log_early("Cannot allocate memory for NUMA node information\n");
> + rte_errno = ENOMEM;
> + return -1;
> + }
> +
> + if (!GetLogicalProcessorInformationEx(
> + RelationNumaNode, infos, &infos_size)) {
> + log_early("Cannot get NUMA node information, error %lu\n",
> + GetLastError());
> + rte_errno = EINVAL;
> + return -1;
> + }
rte_errno is unknown
It seems to be fixed in patch 12:
--- a/lib/librte_eal/windows/eal_windows.h
+++ b/lib/librte_eal/windows/eal_windows.h
@@ -9,8 +9,24 @@
* @file Facilities private to Windows EAL
*/
+#include <rte_errno.h>
#include <rte_windows.h>
I'll merge it in patch 9
More information about the dev
mailing list