Thread (218 messages) 218 messages, 13 authors, 2020-06-16

Re: [dpdk-dev] [PATCH v5 03/11] eal: introduce memory management wrappers

From: Burakov, Anatoly <hidden>
Date: 2020-05-28 11:52:59

On 25-May-20 1:37 AM, Dmitry Kozlyuk wrote:
Introduce OS-independent wrappers for memory management operations used
across DPDK and specifically in common code of EAL:

* rte_mem_map()
* rte_mem_unmap()
* rte_get_page_size()
* rte_mem_lock()

Windows uses different APIs for memory mapping and reservation, while
Unices reserve memory by mapping it. Introduce EAL private functions to
support memory reservation in common code:

* eal_mem_reserve()
* eal_mem_free()
* eal_mem_set_dump()

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 <redacted>
---
<snip>
+	} else if (mapped_addr == NULL) {
  		RTE_LOG(ERR, EAL, "Cannot get a virtual area: %s\n",
-			strerror(errno));
-		/* pass errno up the call chain */
-		rte_errno = errno;
+			strerror(rte_errno));
Also, please check that you're using rte_strerror with rte_errno :)

-- 
Thanks,
Anatoly
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help