From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: dev@dpdk.org
Cc: "Dmitry Malloy (MESHCHANINOV)" <dmitrym@microsoft.com>,
Narcisa Ana Maria Vasile <Narcisa.Vasile@microsoft.com>,
Fady Bader <fady@mellanox.com>,
Tal Shnaiderman <talshn@mellanox.com>,
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
Thomas Monjalon <thomas@monjalon.net>,
Anatoly Burakov <anatoly.burakov@intel.com>,
Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,
Omar Cardona <ocardona@microsoft.com>,
Pallavi Kadam <pallavi.kadam@intel.com>,
Ranjit Menon <ranjit.menon@intel.com>
Subject: [dpdk-dev] [PATCH v3 06/10] eal: introduce memory management wrappers
Date: Tue, 14 Apr 2020 22:44:21 +0300 [thread overview]
Message-ID: <20200414194426.1640704-7-dmitry.kozliuk@gmail.com> (raw)
In-Reply-To: <20200414194426.1640704-1-dmitry.kozliuk@gmail.com>
System meory management is implemented differently for POSIX and
Windows. Introduce wrapper functions for operations used across DPDK:
* rte_mem_map()
Create memory mapping for a regular file or a page file (swap).
This supports mapping to a reserved memory region even on Windows.
* rte_mem_unmap()
Remove mapping created with rte_mem_map().
* rte_get_page_size()
Obtain default system page size.
* rte_mem_lock()
Make arbitrary-sized memory region non-swappable.
Wrappers follow POSIX semantics limited to DPDK tasks, but their
signatures deliberately differ from POSIX ones to be more safe and
expressive.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
config/meson.build | 10 +-
lib/librte_eal/common/eal_private.h | 51 +++-
lib/librte_eal/include/rte_memory.h | 68 +++++
lib/librte_eal/rte_eal_exports.def | 4 +
lib/librte_eal/rte_eal_version.map | 4 +
lib/librte_eal/unix/eal_memory.c | 113 +++++++
lib/librte_eal/unix/meson.build | 1 +
lib/librte_eal/windows/eal.c | 6 +
lib/librte_eal/windows/eal_memory.c | 437 +++++++++++++++++++++++++++
lib/librte_eal/windows/eal_windows.h | 67 ++++
lib/librte_eal/windows/meson.build | 1 +
11 files changed, 758 insertions(+), 4 deletions(-)
create mode 100644 lib/librte_eal/unix/eal_memory.c
create mode 100644 lib/librte_eal/windows/eal_memory.c
diff --git a/config/meson.build b/config/meson.build
index 4607655d9..bceb5ef7b 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -256,14 +256,20 @@ if is_freebsd
endif
if is_windows
- # Minimum supported API is Windows 7.
- add_project_arguments('-D_WIN32_WINNT=0x0601', language: 'c')
+ # VirtualAlloc2() is available since Windows 10 / Server 2016.
+ add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c')
# Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
if cc.get_id() == 'gcc'
add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
endif
+ # Contrary to docs, VirtualAlloc2() is exported by mincore.lib
+ # in Windows SDK, while MinGW exports it by advapi32.a.
+ if is_ms_linker
+ add_project_link_arguments('-lmincore', language: 'c')
+ endif
+
add_project_link_arguments('-ladvapi32', language: 'c')
endif
diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h
index 65d61ff13..1e89338f2 100644
--- a/lib/librte_eal/common/eal_private.h
+++ b/lib/librte_eal/common/eal_private.h
@@ -11,6 +11,7 @@
#include <rte_dev.h>
#include <rte_lcore.h>
+#include <rte_memory.h>
/**
* Structure storing internal configuration (per-lcore)
@@ -202,6 +203,16 @@ int rte_eal_alarm_init(void);
*/
int rte_eal_check_module(const char *module_name);
+/**
+ * Memory reservation flags.
+ */
+enum eal_mem_reserve_flags {
+ /**< Reserve hugepages (support may be limited or missing). */
+ EAL_RESERVE_HUGEPAGES = 1 << 0,
+ /**< Fail if requested address is not available. */
+ EAL_RESERVE_EXACT_ADDRESS = 1 << 1
+};
+
/**
* Get virtual area of specified size from the OS.
*
@@ -232,8 +243,8 @@ int rte_eal_check_module(const char *module_name);
#define EAL_VIRTUAL_AREA_UNMAP (1 << 2)
/**< immediately unmap reserved virtual area. */
void *
-eal_get_virtual_area(void *requested_addr, size_t *size,
- size_t page_sz, int flags, int mmap_flags);
+eal_get_virtual_area(void *requested_addr, size_t *size, size_t page_sz,
+ int flags, int mmap_flags);
/**
* Get cpu core_id.
@@ -488,4 +499,40 @@ int eal_file_lock(int fd, enum eal_flock_op op, enum eal_flock_mode mode);
*/
int eal_file_truncate(int fd, ssize_t size);
+/**
+ * Reserve a region of virtual memory.
+ *
+ * Use eal_mem_free() to free reserved memory.
+ *
+ * @param requested_addr
+ * A desired reservation address. The system may not respect it.
+ * NULL means the address will be chosen by the system.
+ * @param size
+ * Reservation size. Must be a multiple of system page size.
+ * @param flags
+ * Reservation options.
+ * @returns
+ * Starting address of the reserved area on success, NULL on failure.
+ * Callers must not access this memory until remapping it.
+ */
+void *eal_mem_reserve(void *requested_addr, size_t size,
+ enum eal_mem_reserve_flags flags);
+
+/**
+ * Free memory obtained by eal_mem_reserve() or eal_mem_alloc().
+ *
+ * If @code virt @endcode and @code size @endcode describe a part of the
+ * reserved region, only this part of the region is freed (accurately
+ * up to the system page size). If @code virt @endcode points to allocated
+ * memory, @code size @endcode must match the one specified on allocation.
+ * The behavior is undefined if the memory pointed by @code virt @endcode
+ * is obtained from another source than listed above.
+ *
+ * @param virt
+ * A virtual address in a region previously reserved.
+ * @param size
+ * Number of bytes to unreserve.
+ */
+void eal_mem_free(void *virt, size_t size);
+
#endif /* _EAL_PRIVATE_H_ */
diff --git a/lib/librte_eal/include/rte_memory.h b/lib/librte_eal/include/rte_memory.h
index 3d8d0bd69..1b7c3e5df 100644
--- a/lib/librte_eal/include/rte_memory.h
+++ b/lib/librte_eal/include/rte_memory.h
@@ -85,6 +85,74 @@ struct rte_memseg_list {
struct rte_fbarray memseg_arr;
};
+/**
+ * Memory protection flags.
+ */
+enum rte_mem_prot {
+ RTE_PROT_READ = 1 << 0, /**< Read access. */
+ RTE_PROT_WRITE = 1 << 1, /**< Write access. */
+ RTE_PROT_EXECUTE = 1 << 2 /**< Code execution. */
+};
+
+/**
+ * Memory mapping additional flags.
+ *
+ * In Linux and FreeBSD, each flag is semantically equivalent
+ * to OS-specific mmap(3) flag with the same or similar name.
+ * In Windows, POSIX and MAP_ANONYMOUS semantics are followed.
+ */
+enum rte_map_flags {
+ /** Changes of mapped memory are visible to other processes. */
+ RTE_MAP_SHARED = 1 << 0,
+ /** Mapping is not backed by a regular file. */
+ RTE_MAP_ANONYMOUS = 1 << 1,
+ /** Copy-on-write mapping, changes are invisible to other processes. */
+ RTE_MAP_PRIVATE = 1 << 2,
+ /** Fail if requested address cannot be taken. */
+ RTE_MAP_FIXED = 1 << 3
+};
+
+/**
+ * OS-independent implementation of POSIX mmap(3)
+ * with MAP_ANONYMOUS Linux/FreeBSD extension.
+ */
+__rte_experimental
+void *rte_mem_map(void *requested_addr, size_t size, enum rte_mem_prot prot,
+ enum rte_map_flags flags, int fd, size_t offset);
+
+/**
+ * OS-independent implementation of POSIX munmap(3).
+ */
+__rte_experimental
+int rte_mem_unmap(void *virt, size_t size);
+
+/**
+ * Get system page size. This function never failes.
+ *
+ * @return
+ * Positive page size in bytes.
+ */
+__rte_experimental
+int rte_get_page_size(void);
+
+/**
+ * Lock region in physical memory and prevent it from swapping.
+ *
+ * @param virt
+ * The virtual address.
+ * @param size
+ * Size of the region.
+ * @return
+ * 0 on success, negative on error.
+ *
+ * @note Implementations may require @p virt and @p size to be multiples
+ * of system page size.
+ * @see rte_get_page_size()
+ * @see rte_mem_lock_page()
+ */
+__rte_experimental
+int rte_mem_lock(const void *virt, size_t size);
+
/**
* Lock page in physical memory and prevent from swapping.
*
diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 12a6c79d6..bacf9a107 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -5,5 +5,9 @@ EXPORTS
rte_eal_mp_remote_launch
rte_eal_mp_wait_lcore
rte_eal_remote_launch
+ rte_get_page_size
rte_log
+ rte_mem_lock
+ rte_mem_map
+ rte_mem_unmap
rte_vlog
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index f9ede5b41..07128898f 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -337,5 +337,9 @@ EXPERIMENTAL {
rte_thread_is_intr;
# added in 20.05
+ rte_get_page_size;
rte_log_can_log;
+ rte_mem_lock;
+ rte_mem_map;
+ rte_mem_unmap;
};
diff --git a/lib/librte_eal/unix/eal_memory.c b/lib/librte_eal/unix/eal_memory.c
new file mode 100644
index 000000000..6bd087d94
--- /dev/null
+++ b/lib/librte_eal/unix/eal_memory.c
@@ -0,0 +1,113 @@
+#include <string.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+#include <rte_errno.h>
+#include <rte_log.h>
+#include <rte_memory.h>
+
+#include "eal_private.h"
+
+static void *
+mem_map(void *requested_addr, size_t size, int prot, int flags,
+ int fd, size_t offset)
+{
+ void *virt = mmap(requested_addr, size, prot, flags, fd, offset);
+ if (virt == MAP_FAILED) {
+ RTE_LOG(ERR, EAL,
+ "Cannot mmap(%p, 0x%zx, 0x%x, 0x%x, %d, 0x%zx): %s\n",
+ requested_addr, size, prot, flags, fd, offset,
+ strerror(errno));
+ rte_errno = errno;
+ return NULL;
+ }
+ return virt;
+}
+
+static int
+mem_unmap(void *virt, size_t size)
+{
+ int ret = munmap(virt, size);
+ if (ret < 0) {
+ RTE_LOG(ERR, EAL, "Cannot munmap(%p, 0x%zx): %s\n",
+ virt, size, strerror(errno));
+ rte_errno = errno;
+ }
+ return ret;
+}
+
+void *
+eal_mem_reserve(void *requested_addr, size_t size,
+ enum eal_mem_reserve_flags flags)
+{
+ int sys_flags = MAP_PRIVATE | MAP_ANONYMOUS;
+
+#ifdef MAP_HUGETLB
+ if (flags & EAL_RESERVE_HUGEPAGES)
+ sys_flags |= MAP_HUGETLB;
+#endif
+ if (flags & EAL_RESERVE_EXACT_ADDRESS)
+ sys_flags |= MAP_FIXED;
+
+ return mem_map(requested_addr, size, PROT_NONE, sys_flags, -1, 0);
+}
+
+void
+eal_mem_free(void *virt, size_t size)
+{
+ mem_unmap(virt, size);
+}
+
+static int
+mem_rte_to_sys_prot(enum rte_mem_prot prot)
+{
+ int sys_prot = 0;
+
+ if (prot & RTE_PROT_READ)
+ sys_prot |= PROT_READ;
+ if (prot & RTE_PROT_WRITE)
+ sys_prot |= PROT_WRITE;
+ if (prot & RTE_PROT_EXECUTE)
+ sys_prot |= PROT_EXEC;
+
+ return sys_prot;
+}
+
+void *
+rte_mem_map(void *requested_addr, size_t size, enum rte_mem_prot prot,
+ enum rte_map_flags flags, int fd, size_t offset)
+{
+ int sys_prot = 0;
+ int sys_flags = 0;
+
+ sys_prot = mem_rte_to_sys_prot(prot);
+
+ if (flags & RTE_MAP_SHARED)
+ sys_flags |= MAP_SHARED;
+ if (flags & RTE_MAP_ANONYMOUS)
+ sys_flags |= MAP_ANONYMOUS;
+ if (flags & RTE_MAP_PRIVATE)
+ sys_flags |= MAP_PRIVATE;
+ if (flags & RTE_MAP_FIXED)
+ sys_flags |= MAP_FIXED;
+
+ return mem_map(requested_addr, size, sys_prot, sys_flags, fd, offset);
+}
+
+int
+rte_mem_unmap(void *virt, size_t size)
+{
+ return mem_unmap(virt, size);
+}
+
+int
+rte_get_page_size(void)
+{
+ return getpagesize();
+}
+
+int
+rte_mem_lock(const void *virt, size_t size)
+{
+ return mlock(virt, size);
+}
diff --git a/lib/librte_eal/unix/meson.build b/lib/librte_eal/unix/meson.build
index 13564838e..50c019a56 100644
--- a/lib/librte_eal/unix/meson.build
+++ b/lib/librte_eal/unix/meson.build
@@ -3,4 +3,5 @@
sources += files(
'eal.c',
+ 'eal_memory.c',
)
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 9dba895e7..cf55b56da 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -339,6 +339,12 @@ rte_eal_init(int argc, char **argv)
internal_config.memory = MEMSIZE_IF_NO_HUGE_PAGE;
}
+ if (eal_mem_win32api_init() < 0) {
+ rte_eal_init_alert("Cannot access Win32 memory management");
+ rte_errno = ENOTSUP;
+ return -1;
+ }
+
eal_thread_init_master(rte_config.master_lcore);
RTE_LCORE_FOREACH_SLAVE(i) {
diff --git a/lib/librte_eal/windows/eal_memory.c b/lib/librte_eal/windows/eal_memory.c
new file mode 100644
index 000000000..5697187ce
--- /dev/null
+++ b/lib/librte_eal/windows/eal_memory.c
@@ -0,0 +1,437 @@
+#include <io.h>
+
+#include <rte_errno.h>
+#include <rte_memory.h>
+
+#include "eal_private.h"
+#include "eal_windows.h"
+
+/* MinGW-w64 headers lack VirtualAlloc2() in some distributions.
+ * Provide a copy of definitions and code to load it dynamically.
+ * Note: definitions are copied verbatim from Microsoft documentation
+ * and don't follow DPDK code style.
+ */
+#ifndef MEM_PRESERVE_PLACEHOLDER
+
+/* https://docs.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-mem_extended_parameter_type */
+typedef enum MEM_EXTENDED_PARAMETER_TYPE {
+ MemExtendedParameterInvalidType,
+ MemExtendedParameterAddressRequirements,
+ MemExtendedParameterNumaNode,
+ MemExtendedParameterPartitionHandle,
+ MemExtendedParameterMax,
+ MemExtendedParameterUserPhysicalHandle,
+ MemExtendedParameterAttributeFlags
+} *PMEM_EXTENDED_PARAMETER_TYPE;
+
+#define MEM_EXTENDED_PARAMETER_TYPE_BITS 4
+
+/* https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-mem_extended_parameter */
+typedef struct MEM_EXTENDED_PARAMETER {
+ struct {
+ DWORD64 Type : MEM_EXTENDED_PARAMETER_TYPE_BITS;
+ DWORD64 Reserved : 64 - MEM_EXTENDED_PARAMETER_TYPE_BITS;
+ } DUMMYSTRUCTNAME;
+ union {
+ DWORD64 ULong64;
+ PVOID Pointer;
+ SIZE_T Size;
+ HANDLE Handle;
+ DWORD ULong;
+ } DUMMYUNIONNAME;
+} MEM_EXTENDED_PARAMETER, *PMEM_EXTENDED_PARAMETER;
+
+/* https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc2 */
+typedef PVOID (*VirtualAlloc2_type)(
+ HANDLE Process,
+ PVOID BaseAddress,
+ SIZE_T Size,
+ ULONG AllocationType,
+ ULONG PageProtection,
+ MEM_EXTENDED_PARAMETER *ExtendedParameters,
+ ULONG ParameterCount
+);
+
+/* VirtualAlloc2() flags. */
+#define MEM_COALESCE_PLACEHOLDERS 0x00000001
+#define MEM_PRESERVE_PLACEHOLDER 0x00000002
+#define MEM_REPLACE_PLACEHOLDER 0x00004000
+#define MEM_RESERVE_PLACEHOLDER 0x00040000
+
+/* Named exactly as the function, so that user code does not depend
+ * on it being found at compile time or dynamically.
+ */
+static VirtualAlloc2_type VirtualAlloc2;
+
+int
+eal_mem_win32api_init(void)
+{
+ static const char library_name[] = "kernelbase.dll";
+ static const char function[] = "VirtualAlloc2";
+
+ OSVERSIONINFO info;
+ HMODULE library = NULL;
+ int ret = 0;
+
+ /* Already done. */
+ if (VirtualAlloc2 != NULL)
+ return 0;
+
+ /* IsWindows10OrGreater() may also be unavailable. */
+ memset(&info, 0, sizeof(info));
+ info.dwOSVersionInfoSize = sizeof(info);
+ GetVersionEx(&info);
+
+ /* Checking for Windows 10+ will also detect Windows Server 2016+.
+ * Do not abort, because Windows may report false version depending
+ * on executable manifest, compatibility mode, etc.
+ */
+ if (info.dwMajorVersion < 10)
+ RTE_LOG(DEBUG, EAL, "Windows 10+ or Windows Server 2016+ "
+ "is required for advanced memory features\n");
+
+ library = LoadLibraryA(library_name);
+ if (library == NULL) {
+ RTE_LOG_WIN32_ERR("LoadLibraryA(\"%s\")", library_name);
+ return -1;
+ }
+
+ VirtualAlloc2 = (VirtualAlloc2_type)(
+ (void *)GetProcAddress(library, function));
+ if (VirtualAlloc2 == NULL) {
+ RTE_LOG_WIN32_ERR("GetProcAddress(\"%s\", \"%s\")\n",
+ library_name, function);
+ ret = -1;
+ }
+
+ FreeLibrary(library);
+
+ return ret;
+}
+
+#else
+
+/* Stub in case VirtualAlloc2() is provided by the compiler. */
+int
+eal_mem_win32api_init(void)
+{
+ return 0;
+}
+
+#endif /* no VirtualAlloc2() */
+
+/* Approximate error mapping from VirtualAlloc2() to POSIX mmap(3). */
+static void
+set_errno_from_win32_alloc_error(DWORD code)
+{
+ switch (code) {
+ case ERROR_SUCCESS:
+ rte_errno = 0;
+ break;
+
+ case ERROR_INVALID_ADDRESS:
+ /* A valid requested address is not available. */
+ case ERROR_COMMITMENT_LIMIT:
+ /* May occcur when committing regular memory. */
+ case ERROR_NO_SYSTEM_RESOURCES:
+ /* Occurs when the system runs out of hugepages. */
+ rte_errno = ENOMEM;
+ break;
+
+ case ERROR_INVALID_PARAMETER:
+ default:
+ rte_errno = EINVAL;
+ break;
+ }
+}
+
+void *
+eal_mem_reserve(void *requested_addr, size_t size,
+ enum eal_mem_reserve_flags flags)
+{
+ void *virt;
+
+ /* Windows requires hugepages to be committed. */
+ if (flags & EAL_RESERVE_HUGEPAGES) {
+ RTE_LOG(ERR, EAL, "Hugepage reservation is not supported\n");
+ rte_errno = ENOTSUP;
+ return NULL;
+ }
+
+ virt = VirtualAlloc2(GetCurrentProcess(), requested_addr, size,
+ MEM_RESERVE | MEM_RESERVE_PLACEHOLDER, PAGE_NOACCESS,
+ NULL, 0);
+ if (virt == NULL) {
+ DWORD err = GetLastError();
+ RTE_LOG_WIN32_ERR("VirtualAlloc2()");
+ set_errno_from_win32_alloc_error(err);
+ }
+
+ if ((flags & EAL_RESERVE_EXACT_ADDRESS) && (virt != requested_addr)) {
+ if (!VirtualFree(virt, 0, MEM_RELEASE))
+ RTE_LOG_WIN32_ERR("VirtualFree()");
+ rte_errno = ENOMEM;
+ return NULL;
+ }
+
+ return virt;
+}
+
+void *
+eal_mem_alloc(size_t size, enum rte_page_sizes page_size)
+{
+ if (page_size != 0)
+ return eal_mem_alloc_socket(size, SOCKET_ID_ANY);
+
+ return VirtualAlloc(
+ NULL, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
+}
+
+void *
+eal_mem_alloc_socket(size_t size, int socket_id)
+{
+ DWORD flags = MEM_RESERVE | MEM_COMMIT;
+ void *addr;
+
+ flags = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES;
+ addr = VirtualAllocExNuma(GetCurrentProcess(), NULL, size, flags,
+ PAGE_READWRITE, eal_socket_numa_node(socket_id));
+ if (addr == NULL)
+ rte_errno = ENOMEM;
+ return addr;
+}
+
+void*
+eal_mem_commit(void *requested_addr, size_t size, int socket_id)
+{
+ MEM_EXTENDED_PARAMETER param;
+ DWORD param_count = 0;
+ DWORD flags;
+ void *addr;
+
+ if (requested_addr != NULL) {
+ MEMORY_BASIC_INFORMATION info;
+ if (VirtualQuery(requested_addr, &info, sizeof(info)) == 0) {
+ RTE_LOG_WIN32_ERR("VirtualQuery()");
+ return NULL;
+ }
+
+ /* Split reserved region if only a part is committed. */
+ flags = MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER;
+ if ((info.RegionSize > size) &&
+ !VirtualFree(requested_addr, size, flags)) {
+ RTE_LOG_WIN32_ERR("VirtualFree(%p, %zu, "
+ "<split placeholder>)", requested_addr, size);
+ return NULL;
+ }
+ }
+
+ if (socket_id != SOCKET_ID_ANY) {
+ param_count = 1;
+ memset(¶m, 0, sizeof(param));
+ param.Type = MemExtendedParameterNumaNode;
+ param.ULong = eal_socket_numa_node(socket_id);
+ }
+
+ flags = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES;
+ if (requested_addr != NULL)
+ flags |= MEM_REPLACE_PLACEHOLDER;
+
+ addr = VirtualAlloc2(GetCurrentProcess(), requested_addr, size,
+ flags, PAGE_READWRITE, ¶m, param_count);
+ if (addr == NULL) {
+ DWORD err = GetLastError();
+ RTE_LOG_WIN32_ERR("VirtualAlloc2(%p, %zu, "
+ "<replace placeholder>)", addr, size);
+ set_errno_from_win32_alloc_error(err);
+ return NULL;
+ }
+
+ return addr;
+}
+
+int
+eal_mem_decommit(void *addr, size_t size)
+{
+ if (!VirtualFree(addr, size, MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER)) {
+ RTE_LOG_WIN32_ERR("VirtualFree(%p, %zu, ...)", addr, size);
+ return -1;
+ }
+ return 0;
+}
+
+/**
+ * Free a reserved memory region in full or in part.
+ *
+ * @param addr
+ * Starting address of the area to free.
+ * @param size
+ * Number of bytes to free. Must be a multiple of page size.
+ * @param reserved
+ * Fail if the region is not in reserved state.
+ * @return
+ * * 0 on successful deallocation;
+ * * 1 if region mut be in reserved state but it is not;
+ * * (-1) on system API failures.
+ */
+static int
+mem_free(void *addr, size_t size, bool reserved)
+{
+ MEMORY_BASIC_INFORMATION info;
+ if (VirtualQuery(addr, &info, sizeof(info)) == 0) {
+ RTE_LOG_WIN32_ERR("VirtualQuery()");
+ return -1;
+ }
+
+ if (reserved && (info.State != MEM_RESERVE))
+ return 1;
+
+ /* Free complete region. */
+ if ((addr == info.AllocationBase) && (size == info.RegionSize)) {
+ if (!VirtualFree(addr, 0, MEM_RELEASE)) {
+ RTE_LOG_WIN32_ERR("VirtualFree(%p, 0, MEM_RELEASE)",
+ addr);
+ }
+ return 0;
+ }
+
+ /* Split the part to be freed and the remaining reservation. */
+ if (!VirtualFree(addr, size, MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER)) {
+ RTE_LOG_WIN32_ERR("VirtualFree(%p, %zu, "
+ "MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER)", addr, size);
+ return -1;
+ }
+
+ /* Actually free reservation part. */
+ if (!VirtualFree(addr, 0, MEM_RELEASE)) {
+ RTE_LOG_WIN32_ERR("VirtualFree(%p, 0, MEM_RELEASE)", addr);
+ return -1;
+ }
+
+ return 0;
+}
+
+void
+eal_mem_free(void *virt, size_t size)
+{
+ mem_free(virt, size, false);
+}
+
+void *
+rte_mem_map(void *requested_addr, size_t size, enum rte_mem_prot prot,
+ enum rte_map_flags flags, int fd, size_t offset)
+{
+ HANDLE file_handle = INVALID_HANDLE_VALUE;
+ HANDLE mapping_handle = INVALID_HANDLE_VALUE;
+ DWORD sys_prot = 0;
+ DWORD sys_access = 0;
+ DWORD size_high = (DWORD)(size >> 32);
+ DWORD size_low = (DWORD)size;
+ DWORD offset_high = (DWORD)(offset >> 32);
+ DWORD offset_low = (DWORD)offset;
+ LPVOID virt = NULL;
+
+ if (prot & RTE_PROT_EXECUTE) {
+ if (prot & RTE_PROT_READ) {
+ sys_prot = PAGE_EXECUTE_READ;
+ sys_access = FILE_MAP_READ | FILE_MAP_EXECUTE;
+ }
+ if (prot & RTE_PROT_WRITE) {
+ sys_prot = PAGE_EXECUTE_READWRITE;
+ sys_access = FILE_MAP_WRITE | FILE_MAP_EXECUTE;
+ }
+ } else {
+ if (prot & RTE_PROT_READ) {
+ sys_prot = PAGE_READONLY;
+ sys_access = FILE_MAP_READ;
+ }
+ if (prot & RTE_PROT_WRITE) {
+ sys_prot = PAGE_READWRITE;
+ sys_access = FILE_MAP_WRITE;
+ }
+ }
+
+ if (flags & RTE_MAP_PRIVATE)
+ sys_access |= FILE_MAP_COPY;
+
+ if ((flags & RTE_MAP_ANONYMOUS) == 0)
+ file_handle = (HANDLE)_get_osfhandle(fd);
+
+ mapping_handle = CreateFileMapping(
+ file_handle, NULL, sys_prot, size_high, size_low, NULL);
+ if (mapping_handle == INVALID_HANDLE_VALUE) {
+ RTE_LOG_WIN32_ERR("CreateFileMapping()");
+ return NULL;
+ }
+
+ /* TODO: there is a race for the requested_addr between mem_free()
+ * and MapViewOfFileEx(). MapViewOfFile3() that can replace a reserved
+ * region with a mapping in a single operation, but it does not support
+ * private mappings.
+ */
+ if (requested_addr != NULL) {
+ int ret = mem_free(requested_addr, size, true);
+ if (ret) {
+ if (ret > 0) {
+ RTE_LOG(ERR, EAL, "Cannot map memory "
+ "to a region not reserved\n");
+ rte_errno = EADDRNOTAVAIL;
+ }
+ return NULL;
+ }
+ }
+
+ virt = MapViewOfFileEx(mapping_handle, sys_access,
+ offset_high, offset_low, size, requested_addr);
+ if (!virt) {
+ RTE_LOG_WIN32_ERR("MapViewOfFileEx()");
+ return NULL;
+ }
+
+ if ((flags & RTE_MAP_FIXED) && (virt != requested_addr)) {
+ BOOL ret = UnmapViewOfFile(virt);
+ virt = NULL;
+ if (!ret)
+ RTE_LOG_WIN32_ERR("UnmapViewOfFile()");
+ }
+
+ if (!CloseHandle(mapping_handle))
+ RTE_LOG_WIN32_ERR("CloseHandle()");
+
+ return virt;
+}
+
+int
+rte_mem_unmap(void *virt, size_t size)
+{
+ RTE_SET_USED(size);
+
+ if (!UnmapViewOfFile(virt)) {
+ rte_errno = GetLastError();
+ RTE_LOG_WIN32_ERR("UnmapViewOfFile()");
+ return -1;
+ }
+ return 0;
+}
+
+int
+rte_get_page_size(void)
+{
+ SYSTEM_INFO info;
+ GetSystemInfo(&info);
+ return info.dwPageSize;
+}
+
+int
+rte_mem_lock(const void *virt, size_t size)
+{
+ /* VirtualLock() takes `void*`, work around compiler warning. */
+ void *addr = (void *)((uintptr_t)virt);
+
+ if (!VirtualLock(addr, size)) {
+ RTE_LOG_WIN32_ERR("VirtualLock()");
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/lib/librte_eal/windows/eal_windows.h b/lib/librte_eal/windows/eal_windows.h
index 390d2fd66..b202a1aa5 100644
--- a/lib/librte_eal/windows/eal_windows.h
+++ b/lib/librte_eal/windows/eal_windows.h
@@ -36,4 +36,71 @@ int eal_thread_create(pthread_t *thread);
*/
unsigned int eal_socket_numa_node(unsigned int socket_id);
+/**
+ * Locate Win32 memory management routines in system libraries.
+ *
+ * @return 0 on success, (-1) on failure.
+ */
+int eal_mem_win32api_init(void);
+
+/**
+ * Allocate a contiguous chunk of virtual memory.
+ *
+ * Use eal_mem_free() to free allocated memory.
+ *
+ * @param size
+ * Number of bytes to allocate.
+ * @param page_size
+ * If non-zero, means memory must be allocated in hugepages
+ * of the specified size. The @code size @endcode parameter
+ * must then be a multiple of the largest hugepage size requested.
+ * @return
+ * Address of allocated memory or NULL on failure (rte_errno is set).
+ */
+void *eal_mem_alloc(size_t size, enum rte_page_sizes page_size);
+
+/**
+ * Allocate new memory in hugepages on the specified NUMA node.
+ *
+ * @param size
+ * Number of bytes to allocate. Must be a multiple of huge page size.
+ * @param socket_id
+ * Socket ID.
+ * @return
+ * Address of the memory allocated on success or NULL on failure.
+ */
+void *eal_mem_alloc_socket(size_t size, int socket_id);
+
+/**
+ * Commit memory previously reserved with @ref eal_mem_reserve()
+ * or decommitted from hugepages by @ref eal_mem_decommit().
+ *
+ * @param requested_addr
+ * Address within a reserved region. Must not be NULL.
+ * @param size
+ * Number of bytes to commit. Must be a multiple of page size.
+ * @param socket_id
+ * Socket ID to allocate on. Can be SOCKET_ID_ANY.
+ * @return
+ * On success, address of the committed memory, that is, requested_addr.
+ * On failure, NULL and @code rte_errno @endcode is set.
+ */
+void *eal_mem_commit(void *requested_addr, size_t size, int socket_id);
+
+/**
+ * Put allocated or committed memory back into reserved state.
+ *
+ * @param addr
+ * Address of the region to decommit.
+ * @param size
+ * Number of bytes to decommit.
+ *
+ * The @code addr @endcode and @code param @endcode must match
+ * location and size of previously allocated or committed region.
+ *
+ * @return
+ * 0 on success, (-1) on failure.
+ */
+int eal_mem_decommit(void *addr, size_t size);
+
#endif /* _EAL_WINDOWS_H_ */
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 5f118bfe2..81d3ee095 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -8,6 +8,7 @@ sources += files(
'eal_debug.c',
'eal_hugepages.c',
'eal_lcore.c',
+ 'eal_memory.c',
'eal_thread.c',
'getopt.c',
)
--
2.25.1
next prev parent reply other threads:[~2020-04-14 19:45 UTC|newest]
Thread overview: 218+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 4:10 [dpdk-dev] [RFC PATCH 0/9] Windows basic memory management Dmitry Kozlyuk
2020-03-30 4:10 ` [dpdk-dev] [PATCH 1/1] virt2phys: virtual to physical address translator for Windows Dmitry Kozlyuk
2020-03-30 6:58 ` Jerin Jacob
2020-03-30 13:41 ` Dmitry Kozlyuk
2020-04-10 1:45 ` Ranjit Menon
2020-04-10 2:50 ` Dmitry Kozlyuk
2020-04-10 2:59 ` Dmitry Kozlyuk
2020-04-10 19:39 ` Ranjit Menon
2020-03-30 4:10 ` [dpdk-dev] [RFC PATCH 2/9] eal/windows: do not expose private EAL facilities Dmitry Kozlyuk
2020-03-30 4:10 ` [dpdk-dev] [RFC PATCH 3/9] eal/windows: improve CPU and NUMA node detection Dmitry Kozlyuk
2020-03-30 4:10 ` [dpdk-dev] [RFC PATCH 4/9] eal/windows: initialize hugepage info Dmitry Kozlyuk
2020-03-30 4:10 ` [dpdk-dev] [RFC PATCH 5/9] eal: introduce internal wrappers for file operations Dmitry Kozlyuk
2020-03-30 7:04 ` Jerin Jacob
2020-03-30 4:10 ` [dpdk-dev] [RFC PATCH 6/9] eal: introduce memory management wrappers Dmitry Kozlyuk
2020-03-30 7:31 ` Thomas Monjalon
2020-03-30 4:10 ` [dpdk-dev] [RFC PATCH 7/9] eal/windows: fix rte_page_sizes with Clang on Windows Dmitry Kozlyuk
2020-03-30 4:10 ` [dpdk-dev] [RFC PATCH 8/9] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-03-30 4:10 ` [dpdk-dev] [RFC PATCH 9/9] eal/windows: implement basic memory management Dmitry Kozlyuk
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 00/10] eal: Windows " Dmitry Kozlyuk
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 1/1] virt2phys: virtual to physical address translator for Windows Dmitry Kozlyuk
2020-04-13 5:32 ` Ranjit Menon
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 02/10] eal/windows: do not expose private EAL facilities Dmitry Kozlyuk
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 03/10] eal/windows: improve CPU and NUMA node detection Dmitry Kozlyuk
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 04/10] eal/windows: initialize hugepage info Dmitry Kozlyuk
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 05/10] eal: introduce internal wrappers for file operations Dmitry Kozlyuk
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 06/10] eal: introduce memory management wrappers Dmitry Kozlyuk
2020-04-13 7:50 ` Tal Shnaiderman
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 07/10] eal: extract common code for memseg list initialization Dmitry Kozlyuk
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 08/10] eal/windows: fix rte_page_sizes with Clang on Windows Dmitry Kozlyuk
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 09/10] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-04-10 16:43 ` [dpdk-dev] [PATCH v2 10/10] eal/windows: implement basic memory management Dmitry Kozlyuk
2020-04-10 22:04 ` Narcisa Ana Maria Vasile
2020-04-11 1:16 ` Dmitry Kozlyuk
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 00/10] Windows " Dmitry Kozlyuk
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 1/1] virt2phys: virtual to physical address translator for Windows Dmitry Kozlyuk
2020-04-14 23:35 ` Ranjit Menon
2020-04-15 15:19 ` Thomas Monjalon
2020-04-21 6:23 ` Ophir Munk
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 02/10] eal/windows: do not expose private EAL facilities Dmitry Kozlyuk
2020-04-21 22:40 ` Thomas Monjalon
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 03/10] eal/windows: improve CPU and NUMA node detection Dmitry Kozlyuk
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 04/10] eal/windows: initialize hugepage info Dmitry Kozlyuk
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 05/10] eal: introduce internal wrappers for file operations Dmitry Kozlyuk
2020-04-15 21:48 ` Thomas Monjalon
2020-04-17 12:24 ` Burakov, Anatoly
2020-04-28 23:50 ` Dmitry Kozlyuk
2020-04-14 19:44 ` Dmitry Kozlyuk [this message]
2020-04-15 22:17 ` [dpdk-dev] [PATCH v3 06/10] eal: introduce memory management wrappers Thomas Monjalon
2020-04-15 23:32 ` Dmitry Kozlyuk
2020-04-17 12:43 ` Burakov, Anatoly
2020-04-20 5:59 ` Tal Shnaiderman
2020-04-21 23:36 ` Dmitry Kozlyuk
2020-04-22 0:55 ` Ranjit Menon
2020-04-22 2:07 ` Ranjit Menon
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 07/10] eal: extract common code for memseg list initialization Dmitry Kozlyuk
2020-04-15 22:19 ` Thomas Monjalon
2020-04-17 13:04 ` Burakov, Anatoly
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 08/10] eal/windows: fix rte_page_sizes with Clang on Windows Dmitry Kozlyuk
2020-04-15 9:34 ` Jerin Jacob
2020-04-15 10:32 ` Dmitry Kozlyuk
2020-04-15 10:57 ` Jerin Jacob
2020-04-15 11:09 ` Dmitry Kozlyuk
2020-04-15 11:17 ` Jerin Jacob
2020-05-06 5:41 ` Ray Kinsella
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 09/10] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-04-14 19:44 ` [dpdk-dev] [PATCH v3 10/10] eal/windows: implement basic memory management Dmitry Kozlyuk
2020-04-15 9:42 ` Jerin Jacob
2020-04-16 18:34 ` Ranjit Menon
2020-04-23 1:00 ` Dmitry Kozlyuk
2020-04-14 23:37 ` [dpdk-dev] [PATCH v3 00/10] Windows " Kadam, Pallavi
2020-04-28 23:50 ` [dpdk-dev] [PATCH v4 0/8] " Dmitry Kozlyuk
2020-04-28 23:50 ` [dpdk-dev] [PATCH v4 1/8] eal: replace rte_page_sizes with a set of constants Dmitry Kozlyuk
2020-04-28 23:50 ` [dpdk-dev] [PATCH v4 2/8] eal: introduce internal wrappers for file operations Dmitry Kozlyuk
2020-04-29 16:41 ` Burakov, Anatoly
2020-04-28 23:50 ` [dpdk-dev] [PATCH v4 3/8] eal: introduce memory management wrappers Dmitry Kozlyuk
2020-04-29 17:13 ` Burakov, Anatoly
2020-04-30 13:59 ` Burakov, Anatoly
2020-05-01 19:00 ` Dmitry Kozlyuk
2020-05-05 14:43 ` Burakov, Anatoly
2020-04-28 23:50 ` [dpdk-dev] [PATCH v4 4/8] eal: extract common code for memseg list initialization Dmitry Kozlyuk
2020-05-05 16:08 ` Burakov, Anatoly
2020-04-28 23:50 ` [dpdk-dev] [PATCH v4 5/8] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-04-28 23:50 ` [dpdk-dev] [PATCH v4 6/8] eal/windows: improve CPU and NUMA node detection Dmitry Kozlyuk
2020-04-28 23:50 ` [dpdk-dev] [PATCH v4 7/8] eal/windows: initialize hugepage info Dmitry Kozlyuk
2020-04-28 23:50 ` [dpdk-dev] [PATCH v4 8/8] eal/windows: implement basic memory management Dmitry Kozlyuk
2020-04-29 1:18 ` Ranjit Menon
2020-05-01 19:19 ` Dmitry Kozlyuk
2020-05-05 16:24 ` Burakov, Anatoly
2020-05-05 23:20 ` Dmitry Kozlyuk
2020-05-06 9:46 ` Burakov, Anatoly
2020-05-06 21:53 ` Dmitry Kozlyuk
2020-05-07 11:57 ` Burakov, Anatoly
2020-05-13 8:24 ` Fady Bader
2020-05-13 8:42 ` Dmitry Kozlyuk
2020-05-13 9:09 ` Fady Bader
2020-05-13 9:22 ` Fady Bader
2020-05-13 9:38 ` Dmitry Kozlyuk
2020-05-13 12:25 ` Fady Bader
2020-05-18 0:17 ` Dmitry Kozlyuk
2020-05-18 22:25 ` Dmitry Kozlyuk
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 0/8] Windows " Dmitry Kozlyuk
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 01/11] eal: replace rte_page_sizes with a set of constants Dmitry Kozlyuk
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 02/11] eal: introduce internal wrappers for file operations Dmitry Kozlyuk
2020-05-28 7:59 ` Thomas Monjalon
2020-05-28 10:09 ` Dmitry Kozlyuk
2020-05-28 11:29 ` Thomas Monjalon
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 03/11] eal: introduce memory management wrappers Dmitry Kozlyuk
2020-05-27 6:33 ` Ray Kinsella
2020-05-27 16:34 ` Dmitry Kozlyuk
2020-05-28 11:26 ` Burakov, Anatoly
2020-06-01 21:08 ` Thomas Monjalon
2020-05-28 11:52 ` Burakov, Anatoly
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 04/11] eal/mem: extract common code for memseg list initialization Dmitry Kozlyuk
2020-05-28 7:31 ` Thomas Monjalon
2020-05-28 10:04 ` Dmitry Kozlyuk
2020-05-28 11:46 ` Burakov, Anatoly
2020-05-28 14:41 ` Dmitry Kozlyuk
2020-05-29 8:49 ` Burakov, Anatoly
2020-05-28 12:19 ` Burakov, Anatoly
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 05/11] eal/mem: extract common code for dynamic memory allocation Dmitry Kozlyuk
2020-05-28 8:34 ` Thomas Monjalon
2020-05-28 12:21 ` Burakov, Anatoly
2020-05-28 13:24 ` Dmitry Kozlyuk
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 06/11] trace: add size_t field emitter Dmitry Kozlyuk
2020-05-25 5:53 ` Jerin Jacob
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 07/11] eal/windows: add tracing support stubs Dmitry Kozlyuk
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 08/11] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 09/11] eal/windows: improve CPU and NUMA node detection Dmitry Kozlyuk
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 10/11] eal/windows: initialize hugepage info Dmitry Kozlyuk
2020-05-25 0:37 ` [dpdk-dev] [PATCH v5 11/11] eal/windows: implement basic memory management Dmitry Kozlyuk
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 00/11] Windows " Dmitry Kozlyuk
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 01/11] eal: replace rte_page_sizes with a set of constants Dmitry Kozlyuk
2020-06-03 1:59 ` Stephen Hemminger
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 02/11] eal: introduce internal wrappers for file operations Dmitry Kozlyuk
2020-06-03 12:07 ` Neil Horman
2020-06-03 12:34 ` Dmitry Kozlyuk
2020-06-04 21:07 ` Neil Horman
2020-06-05 0:16 ` Dmitry Kozlyuk
2020-06-05 11:19 ` Neil Horman
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 03/11] eal: introduce memory management wrappers Dmitry Kozlyuk
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 04/11] eal/mem: extract common code for memseg list initialization Dmitry Kozlyuk
2020-06-09 13:36 ` Burakov, Anatoly
2020-06-09 14:17 ` Dmitry Kozlyuk
2020-06-10 10:26 ` Burakov, Anatoly
2020-06-10 14:31 ` Dmitry Kozlyuk
2020-06-10 15:48 ` Burakov, Anatoly
2020-06-10 16:39 ` Dmitry Kozlyuk
2020-06-11 8:59 ` Burakov, Anatoly
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 05/11] eal/mem: extract common code for dynamic memory allocation Dmitry Kozlyuk
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 06/11] trace: add size_t field emitter Dmitry Kozlyuk
2020-06-03 3:29 ` Jerin Jacob
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 07/11] eal/windows: add tracing support stubs Dmitry Kozlyuk
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 08/11] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 09/11] eal/windows: improve CPU and NUMA node detection Dmitry Kozlyuk
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 10/11] eal/windows: initialize hugepage info Dmitry Kozlyuk
2020-06-02 23:03 ` [dpdk-dev] [PATCH v6 11/11] eal/windows: implement basic memory management Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v6 00/11] Windows " Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 01/11] eal: replace rte_page_sizes with a set of constants Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 02/11] eal: introduce internal wrappers for file operations Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 03/11] eal: introduce memory management wrappers Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 04/11] eal/mem: extract common code for memseg list initialization Dmitry Kozlyuk
2020-06-09 11:14 ` Tal Shnaiderman
2020-06-09 13:49 ` Burakov, Anatoly
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 05/11] eal/mem: extract common code for dynamic memory allocation Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 06/11] trace: add size_t field emitter Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 07/11] eal/windows: add tracing support stubs Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 08/11] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 09/11] eal/windows: improve CPU and NUMA node detection Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 10/11] eal/windows: initialize hugepage info Dmitry Kozlyuk
2020-06-08 7:41 ` [dpdk-dev] [PATCH v7 11/11] eal/windows: implement basic memory management Dmitry Kozlyuk
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 00/11] Windows " Dmitry Kozlyuk
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 01/11] eal: replace rte_page_sizes with a set of constants Dmitry Kozlyuk
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 02/11] eal: introduce internal wrappers for file operations Dmitry Kozlyuk
2020-06-11 17:13 ` Thomas Monjalon
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 03/11] eal: introduce memory management wrappers Dmitry Kozlyuk
2020-06-12 10:47 ` Thomas Monjalon
2020-06-12 13:44 ` Dmitry Kozliuk
2020-06-12 13:54 ` Thomas Monjalon
2020-06-12 20:24 ` Dmitry Kozliuk
2020-06-12 21:37 ` Thomas Monjalon
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 04/11] eal/mem: extract common code for memseg list initialization Dmitry Kozlyuk
2020-06-12 15:39 ` Thomas Monjalon
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 05/11] eal/mem: extract common code for dynamic memory allocation Dmitry Kozlyuk
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 06/11] trace: add size_t field emitter Dmitry Kozlyuk
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 07/11] eal/windows: add tracing support stubs Dmitry Kozlyuk
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 08/11] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 09/11] eal/windows: improve CPU and NUMA node detection Dmitry Kozlyuk
2020-06-12 21:45 ` Thomas Monjalon
2020-06-12 22:09 ` Thomas Monjalon
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 10/11] eal/windows: initialize hugepage info Dmitry Kozlyuk
2020-06-12 21:55 ` Thomas Monjalon
2020-06-10 14:27 ` [dpdk-dev] [PATCH v8 11/11] eal/windows: implement basic memory management Dmitry Kozlyuk
2020-06-12 22:12 ` Thomas Monjalon
2020-06-11 17:29 ` [dpdk-dev] [PATCH v8 00/11] Windows " Thomas Monjalon
2020-06-12 22:00 ` Thomas Monjalon
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 00/12] " Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 01/12] eal: replace rte_page_sizes with a set of constants Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 02/12] eal: introduce internal wrappers for file operations Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 03/12] eal: introduce memory management wrappers Dmitry Kozlyuk
2020-06-15 6:03 ` Kinsella, Ray
2020-06-15 7:41 ` Dmitry Kozlyuk
2020-06-15 7:41 ` Kinsella, Ray
2020-06-15 10:53 ` Neil Horman
2020-06-15 11:10 ` Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 04/12] eal/mem: extract common code for memseg list initialization Dmitry Kozlyuk
2020-06-15 13:13 ` Thomas Monjalon
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 05/12] eal/mem: extract common code for dynamic memory allocation Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 06/12] trace: add size_t field emitter Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 07/12] eal/windows: add tracing support stubs Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 08/12] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 09/12] eal/windows: improve CPU and NUMA node detection Dmitry Kozlyuk
2020-06-15 15:21 ` Thomas Monjalon
2020-06-15 15:39 ` Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 10/12] doc/windows: split build and run instructions Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 11/12] eal/windows: initialize hugepage info Dmitry Kozlyuk
2020-06-15 0:43 ` [dpdk-dev] [PATCH v9 12/12] eal/windows: implement basic memory management Dmitry Kozlyuk
2020-06-15 17:34 ` [dpdk-dev] [PATCH v9 00/12] Windows " Thomas Monjalon
2020-06-16 1:52 ` Ranjit Menon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200414194426.1640704-7-dmitry.kozliuk@gmail.com \
--to=dmitry.kozliuk@gmail.com \
--cc=Narcisa.Vasile@microsoft.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=dmitrym@microsoft.com \
--cc=fady@mellanox.com \
--cc=harini.ramakrishnan@microsoft.com \
--cc=ocardona@microsoft.com \
--cc=pallavi.kadam@intel.com \
--cc=ranjit.menon@intel.com \
--cc=talshn@mellanox.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).