git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vfio: set errno on unsupported OS
[dpdk.git]
/
lib
/
eal
/
windows
/
eal_memory.c
diff --git
a/lib/eal/windows/eal_memory.c
b/lib/eal/windows/eal_memory.c
index
2cf5a5e
..
2fd37d9
100644
(file)
--- a/
lib/eal/windows/eal_memory.c
+++ b/
lib/eal/windows/eal_memory.c
@@
-198,6
+198,13
@@
exit:
return ret;
}
return ret;
}
+void
+eal_mem_virt2iova_cleanup(void)
+{
+ if (virt2phys_device != INVALID_HANDLE_VALUE)
+ CloseHandle(virt2phys_device);
+}
+
phys_addr_t
rte_mem_virt2phy(const void *virt)
{
phys_addr_t
rte_mem_virt2phy(const void *virt)
{
@@
-218,19
+225,17
@@
rte_mem_virt2phy(const void *virt)
return phys.QuadPart;
}
return phys.QuadPart;
}
-/* Windows currently only supports IOVA as PA. */
rte_iova_t
rte_mem_virt2iova(const void *virt)
{
phys_addr_t phys;
rte_iova_t
rte_mem_virt2iova(const void *virt)
{
phys_addr_t phys;
- if (
virt2phys_device == INVALID_HANDLE_VALUE
)
- return
RTE_BAD_IOVA
;
+ if (
rte_eal_iova_mode() == RTE_IOVA_VA
)
+ return
(rte_iova_t)virt
;
phys = rte_mem_virt2phy(virt);
if (phys == RTE_BAD_PHYS_ADDR)
return RTE_BAD_IOVA;
phys = rte_mem_virt2phy(virt);
if (phys == RTE_BAD_PHYS_ADDR)
return RTE_BAD_IOVA;
-
return (rte_iova_t)phys;
}
return (rte_iova_t)phys;
}
@@
-508,7
+513,7
@@
eal_mem_set_dump(void *virt, size_t size, bool dump)
void *
rte_mem_map(void *requested_addr, size_t size, int prot, int flags,
void *
rte_mem_map(void *requested_addr, size_t size, int prot, int flags,
- int fd,
size
_t offset)
+ int fd,
uint64
_t offset)
{
HANDLE file_handle = INVALID_HANDLE_VALUE;
HANDLE mapping_handle = INVALID_HANDLE_VALUE;
{
HANDLE file_handle = INVALID_HANDLE_VALUE;
HANDLE mapping_handle = INVALID_HANDLE_VALUE;