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

Re: [dpdk-dev] [PATCH v9 03/12] eal: introduce memory management wrappers

From: Dmitry Kozlyuk <hidden>
Date: 2020-06-15 11:10:09

On Mon, 15 Jun 2020 06:53:45 -0400
Neil Horman [off-list ref] wrote:
On Mon, Jun 15, 2020 at 10:41:20AM +0300, Dmitry Kozlyuk wrote:
quoted
On Mon, 15 Jun 2020 07:03:23 +0100
"Kinsella, Ray" [off-list ref] wrote:

[snip]  
quoted
quoted
+
+INTERNAL {
+	global:
+
+	rte_mem_lock;
+	rte_mem_map;
+	rte_mem_page_size;
+	rte_mem_unmap;
+};    
Don't

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

Belong in the map file also?  
No need to export these funtions, they're only used by librte_eal.
  
But theres lots of locations in dpdk that could be using these functions.  I
count 57 calls sites in dpdk for sysconf(SC_PAGESIZE), spread throughout the
library collection, as well as some others for sysconf(_SC_IOV_MAX) and
sysconf(_SC_NPROCESSORS_CONF).  If the goal is to abstract away the use of
sysconf in dpdk, you probably at least want to export rte_mem_page_size.

the same is likely true for mmap/munmap
My comment (and Ray's one, I believe) was about eal_mem_*() functions. Those
you're talking about, rte_mem_*(), are exported from EAL, but only visible to
DPDK. Everything above is true, sysconf(), etc. can be replaced as the need
arises to make the calling code OS-agnostic.

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