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 8B501A10DA for ; Thu, 1 Aug 2019 15:01:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9EBA41C1DB; Thu, 1 Aug 2019 15:01:52 +0200 (CEST) Received: from mail-vs1-f65.google.com (mail-vs1-f65.google.com [209.85.217.65]) by dpdk.org (Postfix) with ESMTP id 897F01C1DA for ; Thu, 1 Aug 2019 15:01:49 +0200 (CEST) Received: by mail-vs1-f65.google.com with SMTP id h28so48770305vsl.12 for ; Thu, 01 Aug 2019 06:01:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3Clc4xAhFzRjSegg8pHLydvEhKCwkvOyGuCEmY4vZN8=; b=pWVnU0Zv7cycCAV2Gsc2aApYxClzEJ5IqdGlBz2gu/QbhtJG91w2uRs0OgyXKpZKtf VNSF1FEOj85lSfqi2wJyiDVgv1QKwTk/bXwXRXGVrsNOtPo9HizKF681P/mVoT5fT3gD Cc667C/FU+O2pKZIFaqZZr1SsVemIoJWjid95JzlgF+rIaqPNGir1y8XQ68ylaApX38U +Wgajz5E3AbNsAW+8+eLTe2FbpNJ440IhuyQljEohm6GmuSk/J/BJbf+fRMNC9HlJZ9c GMd2Jnvyyt5FIA71aL15h75JOawp9HGoJj4D0qu/mtCzP18mDGJhpmO9b2T89fPQkXlu uDRA== X-Gm-Message-State: APjAAAUFbJCP9TnVWE+exNbcmcZg5MpZq/wfzNryLPPnX8SrhdCTmLKC wiUNmMr+xmeYwOKGCKFF17AGp38zUyGS5PaJDOQonw== X-Google-Smtp-Source: APXvYqylfRUusJFhE/LAaiKDAtZSHrs5MX25E59tRFMm36CLRDtzCZalTBc96uldSQ+t17FCs+G2kn4Psxlq1D9XzTc= X-Received: by 2002:a67:da99:: with SMTP id w25mr46866778vsj.141.1564664507782; Thu, 01 Aug 2019 06:01:47 -0700 (PDT) MIME-Version: 1.0 References: <20190731033523.2482-1-tyos@jp.ibm.com> In-Reply-To: <20190731033523.2482-1-tyos@jp.ibm.com> From: David Marchand Date: Thu, 1 Aug 2019 15:01:36 +0200 Message-ID: To: "Burakov, Anatoly" Cc: dev , Takeshi Yoshimura Content-Type: text/plain; charset="UTF-8" Subject: Re: [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" Hello Anatoly, On Wed, Jul 31, 2019 at 5:36 AM Takeshi Yoshimura wrote: > > 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 > Afaiu, this problem is linked to a specific iommu implementation. Does it make sense to introduce a check "iommu_support_va" in eal, a bit like what we have in the pci bus ? -- David Marchand