*count = 0;
ret = glob(MEM_NODE_PATH_GLOB, 0, NULL, &result);
+ if (ret != 0)
+ ret = glob(MEM_NODE_PATH_GLOB_VM, 0, NULL, &result);
+
if (ret != 0) {
- DPAAX_DEBUG("Unable to glob device-tree memory node: (%s)(%d)",
- MEM_NODE_PATH_GLOB, ret);
+ DPAAX_DEBUG("Unable to glob device-tree memory node (err: %d)",
+ ret);
goto out;
}
goto cleanup;
}
- DPAAX_DEBUG("Size of device-tree mem node: %lu", statbuf.st_size);
+ DPAAX_DEBUG("Size of device-tree mem node: %" PRIu64, statbuf.st_size);
if (statbuf.st_size > MEM_NODE_FILE_LEN) {
DPAAX_DEBUG("More memory nodes available than assumed.");
DPAAX_DEBUG("System may not work properly!");
*/
*count = (statbuf.st_size / 16);
if ((*count) <= 0 || (statbuf.st_size % 16 != 0)) {
- DPAAX_DEBUG("Invalid memory node values or count. (size=%lu)",
+ DPAAX_DEBUG("Invalid memory node values or count. (size=%" PRIu64 ")",
statbuf.st_size);
goto cleanup;
}
DPAAX_DEBUG("Device-tree memory node data:");
do {
- DPAAX_DEBUG("\n %08" PRIx64 " %08zu", nodes[j].addr, nodes[j].len);
+ DPAAX_DEBUG(" %08" PRIx64 " %08zu",
+ nodes[j].addr, nodes[j].len);
} while (--j);
cleanup:
/* Release memory associated with nodes array - not required now */
free(nodes);
- DPAAX_DEBUG("Adding mem-event handler\n");
+ DPAAX_DEBUG("Adding mem-event handler");
ret = dpaax_handle_memevents();
if (ret) {
DPAAX_ERR("Unable to add mem-event handler");
* case.
*/
entry[i].pages[e_offset] = align_vaddr;
+#ifdef RTE_COMMON_DPAAX_DEBUG
DPAAX_DEBUG("Added: vaddr=%zu for Phy:%"PRIu64" at %zu"
" remaining len %zu", align_vaddr,
align_paddr, e_offset, req_length);
-
+#endif
/* Incoming request can be larger than the
* DPAAX_MEM_SPLIT size - in which case, multiple
* entries in entry->pages[] are filled up.
vaddr, paddr);
return -1;
}
-
+#ifdef RTE_COMMON_DPAAX_DEBUG
DPAAX_DEBUG("Add: Found slot at (%"PRIu64")[(%zu)] for vaddr:(%p),"
" phy(%"PRIu64"), len(%zu)", entry[i].start, e_offset,
vaddr, paddr, length);
+#endif
return 0;
}
phys_addr = rte_mem_virt2phy(ms->addr);
virt_addr = ms->addr;
map_len = ms->len;
-
+#ifdef RTE_COMMON_DPAAX_DEBUG
DPAAX_DEBUG("Request for %s, va=%p, virt_addr=%p,"
"iova=%"PRIu64", map_len=%zu",
type == RTE_MEM_EVENT_ALLOC ?
"alloc" : "dealloc",
va, virt_addr, phys_addr, map_len);
-
+#endif
if (type == RTE_MEM_EVENT_ALLOC)
ret = dpaax_iova_table_update(phys_addr, virt_addr,
map_len);