numam-dpdk/lib/librte_eal
Alejandro Lucero 84e7477e10 mem: add thread unsafe version for DMA mask check
During memory initialization calling rte_mem_check_dma_mask
leads to a deadlock because memory_hotplug_lock is locked by a
writer, the current code in execution, and rte_memseg_walk
tries to lock as a reader.

This patch adds a thread_unsafe version which will call the final
function specifying the memory_hotplug_lock does not need to be
acquired. The patch also modified rte_mem_check_dma_mask as a
intermediate step which will call the final function as before,
implying memory_hotplug_lock will be acquired.

PMDs should always use the version acquiring the lock with the
thread_unsafe one being just for internal EAL memory code.

Fixes: 223b7f1d5e ("mem: add function for checking memseg IOVA")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-11-05 01:02:14 +01:00
..
bsdapp eal: force IOVA to a particular mode 2018-10-29 00:01:05 +01:00
common mem: add thread unsafe version for DMA mask check 2018-11-05 01:02:14 +01:00
linuxapp mem: add thread unsafe version for DMA mask check 2018-11-05 01:02:14 +01:00
Makefile lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
meson.build mk: build with _GNU_SOURCE defined by default 2018-10-22 11:28:27 +02:00
rte_eal_version.map mem: add thread unsafe version for DMA mask check 2018-11-05 01:02:14 +01:00