DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] bus: fix dpaa returning IOVA as PA
@ 2018-02-06 16:21 Pavan Nikhilesh
  2018-02-06 17:22 ` [dpdk-dev] [PATCH v2] bus/dpaa: fix dpaa returning IOVA as PA by default Pavan Nikhilesh
  0 siblings, 1 reply; 4+ messages in thread
From: Pavan Nikhilesh @ 2018-02-06 16:21 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla, hemant.agrawal, thomas, ferruh.yigit
  Cc: dev, Pavan Nikhilesh

Fix dpaa bus returning IOVA as PA when there is no device attached to
the bus.

Fixes: 1ee9569576f6 ("config: enable dpaaX drivers for generic ARMv8")
Fixes: d5a4e3a00c4a ("bus/dpaa: set IOVA mode as physical")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---

 Currently Octeontx platform is broken due to this, please merge this asap.

 drivers/bus/dpaa/dpaa_bus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 41ee640e2..579870297 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -501,6 +501,10 @@ rte_dpaa_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
 static enum rte_iova_mode
 rte_dpaa_get_iommu_class(void)
 {
+	if ((access(DPAA_DEV_PATH1, F_OK) != 0) &&
+	    (access(DPAA_DEV_PATH2, F_OK) != 0)) {
+		return RTE_IOVA_DC;
+	}
 	return RTE_IOVA_PA;
 }

--
2.16.0

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

end of thread, other threads:[~2018-02-06 17:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06 16:21 [dpdk-dev] [PATCH] bus: fix dpaa returning IOVA as PA Pavan Nikhilesh
2018-02-06 17:22 ` [dpdk-dev] [PATCH v2] bus/dpaa: fix dpaa returning IOVA as PA by default Pavan Nikhilesh
2018-02-06 17:28   ` Hemant Agrawal
2018-02-06 17:39     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).