From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3E8EA0613 for ; Wed, 31 Jul 2019 05:35:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 31E601C000; Wed, 31 Jul 2019 05:35:54 +0200 (CEST) Received: from nh605-vm9.bullet.mail.ssk.yahoo.co.jp (nh605-vm9.bullet.mail.ssk.yahoo.co.jp [182.22.90.82]) by dpdk.org (Postfix) with SMTP id 4D6EC1BFD4 for ; Wed, 31 Jul 2019 05:35:51 +0200 (CEST) Received: from [182.22.66.103] by nh605.bullet.mail.ssk.yahoo.co.jp with NNFMP; 31 Jul 2019 03:35:49 -0000 Received: from [182.22.91.128] by t601.bullet.mail.ssk.yahoo.co.jp with NNFMP; 31 Jul 2019 03:35:49 -0000 Received: from [127.0.0.1] by omp601.mail.ssk.yahoo.co.jp with NNFMP; 31 Jul 2019 03:35:49 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 654736.89216.bm@omp601.mail.ssk.yahoo.co.jp Received: (qmail 95519 invoked by alias); 31 Jul 2019 03:35:49 -0000 Received: from unknown (HELO takeshibookpuro.dhcp.hakozaki.ibm.com) (203.141.91.12 with ) by ymobsmtp6007.mail.ssk.ynwp.yahoo.co.jp with SMTP; 31 Jul 2019 03:35:49 -0000 X-YMail-JAS: H8Nl.x0VM1kop_Mb0s2ztWKkmygjwN1YbAsZ90b7LCS.Lti11Ip5tkxz2INF1f06haoujZEwcqC_mHKfJU8Ot8tW2IGhD3j7eTc96S4lKNgrjK0fy8OxGL_uFzwNGCm55y1PQGMGqwAyJ8E- X-Apparently-From: X-YMail-OSG: kajELAYVM1kl4wXAffTNjz7h5WQvSsfHypy2KuJtpUcB3D5 uIUkCZlJsqL2.v4OVK97goqkJUzQhR3.Jwi.iI9wIhZvmbYweqxHiKrc6zPf OEHvYW6QNIYp4YYB5AoWhBfsVg_zrAL.6c1JBMYbYYTupw178YQR_emCpEUz f.I5MAGTY42TcnnNtttHYdvxF4fQUbWnP2vEcB3kX46ba9pfCGxM1uy.60Wc 1zbBdUFH2YH7NhY9sQJnK3jobzWqDp2mlvMMGfNHS2fWc8N4p93OS5g4ZdC9 .1aS7dzkYetAsk75TuRoFotCGZtCkS9LkUnn7YPygierwAA.y1NWdYqNIQ4H xQ1ZXTgPy6mNrrvOC03mMlA5g1Dy1sXvZ9fTKfTTS1qCgu_VfNGiM_tUS_Ak .DQFUJ_N3dasoxAbz7D49qErEwpPJPVddCxebvmDPupKvTal7MPOMtKzo6bQ 0sS04QWKHnw6Z.Hz61gRdb4DNbI8Lvpa0hd6ZE9CVAgTykSoNDuUtFZ47t0D qU.8uTebd3tnHblt0tZeUF.vFFJwtBJjoDSpKqVXWG58jn.9H6QRwsXbe9IJ u2h_nTDrsNi.lEYgb8h7L21JMkEVMNsmRCzssRBGIz6B.n7xPyWLurZW7wZ1 NCQDjHWFR2F2sPbPohrilrKhxAwuGjhKa_4ehCF0Zx4QhWA-- From: Takeshi Yoshimura To: dev@dpdk.org Cc: Takeshi Yoshimura Date: Wed, 31 Jul 2019 12:35:23 +0900 Message-Id: <20190731033523.2482-1-tyos@jp.ibm.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] eal: forcing IOVA as PA in ppc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Commit b76fafb174d2 ("eal: fix IOVA mode selection as VA for PCI drivers") breaks ppc apps with no IOVA configs (or RTE_IOVA_DC) because of the inconsistency of user's request and the result of device capability for IOVA mode. I updated the code to force IOVA as PA in ppc as before because current ppc driver does not support VA mode. Theoretically, ppc can support VA mode, but I suspect that ppc with VA mode may have performance issues to create a big DMA window (VA often uses higher addresses than PA). So, I didn't change the code to check device capability in ppc. Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linux/eal/eal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c index 946222ccd..db2dec922 100644 --- a/lib/librte_eal/linux/eal/eal.c +++ b/lib/librte_eal/linux/eal/eal.c @@ -1121,6 +1121,12 @@ rte_eal_init(int argc, char **argv) RTE_LOG(DEBUG, EAL, "KNI can not work since physical addresses are unavailable\n"); } } +#endif +#ifdef RTE_ARCH_PPC_64 + if (iova_mode == RTE_IOVA_VA) { + iova_mode = RTE_IOVA_PA; + RTE_LOG(WARNING, EAL, "Forcing IOVA as 'PA' because PPC uses PA mode.\n"); + } #endif rte_eal_get_configuration()->iova_mode = iova_mode; } else { -- 2.17.1