All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eal/linux: fix phys addresses not avaialbe for Xen dom0
@ 2017-05-05 16:10 Jianfeng Tan
  2017-05-10 12:58 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Jianfeng Tan @ 2017-05-05 16:10 UTC (permalink / raw)
  To: dev; +Cc: sergio.gonzalez.monroy, thomas, benjamin.walker, Jianfeng Tan

When physical NICs are binded to igb_uio/uio-pci-generic, they cannot
be used in DPDK app in Xen dom0.

Due to (1) a restriction that phys addresses should be availabe is added
by commit cdc242f260e7 ("eal/linux: support running as unprivileged user"),
(2) and previous implementation of the test to check if phys addresses are
available (using a variable on the stack) just works for non-Xen
environment. Actually, for Xen dom0, the physical addresses are always
available if the memory is initialized successfully..

To fix it, we add an precheck to bypass the physical address availability
test.

Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 618a09b..ebe0683 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -133,6 +133,10 @@ test_phys_addrs_available(void)
 	uint64_t tmp;
 	phys_addr_t physaddr;
 
+	/* For dom0, phys addresses can always be available */
+	if (rte_xen_dom0_supported())
+		return;
+
 	physaddr = rte_mem_virt2phy(&tmp);
 	if (physaddr == RTE_BAD_PHYS_ADDR) {
 		RTE_LOG(ERR, EAL,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] eal/linux: fix phys addresses not avaialbe for Xen dom0
  2017-05-05 16:10 [PATCH] eal/linux: fix phys addresses not avaialbe for Xen dom0 Jianfeng Tan
@ 2017-05-10 12:58 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2017-05-10 12:58 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: dev, sergio.gonzalez.monroy, benjamin.walker

05/05/2017 18:10, Jianfeng Tan:
> When physical NICs are binded to igb_uio/uio-pci-generic, they cannot
> be used in DPDK app in Xen dom0.
> 
> Due to (1) a restriction that phys addresses should be availabe is added
> by commit cdc242f260e7 ("eal/linux: support running as unprivileged user"),
> (2) and previous implementation of the test to check if phys addresses are
> available (using a variable on the stack) just works for non-Xen
> environment. Actually, for Xen dom0, the physical addresses are always
> available if the memory is initialized successfully..
> 
> To fix it, we add an precheck to bypass the physical address availability
> test.
> 
> Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user")
> 
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>

Applied, thanks

Is Xen dom0 working?
Why is there no answer to my questions (in another thread)?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-10 12:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05 16:10 [PATCH] eal/linux: fix phys addresses not avaialbe for Xen dom0 Jianfeng Tan
2017-05-10 12:58 ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.