From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: Shreyansh Jain <shreyansh.jain@nxp.com>,
anatoly.burakov@intel.com, hemant.agrawal@nxp.com,
jkollanukkaran@caviumnetworks.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 1/5] bus/fslmc: fix physical addressing check
Date: Fri, 12 Oct 2018 21:59:00 +0530 [thread overview]
Message-ID: <20181012162607.GA21825@wstn-pvn> (raw)
In-Reply-To: <ceb77651-0946-ec8d-157c-360c7062d1d2@nxp.com>
On Fri, Oct 12, 2018 at 04:14:36PM +0530, Shreyansh Jain wrote:
> On Friday 12 October 2018 02:31 PM, Pavan Nikhilesh wrote:
> > Hi Shreyansh,
> >
> > On Tue, Oct 09, 2018 at 04:55:44PM +0530, Shreyansh Jain wrote:
> > > In case RTE_LIBRTE_DPAA2_USE_PHYS_IOVA is enabled, only supported
> > > class is RTE_IOVA_PA.
> > >
> > > Fixes: f7768afac101 ("bus/fslmc: support dynamic IOVA")
> > > Cc: hemant.agrawal@nxp.com
> > >
> > > Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> > > ---
> > > drivers/bus/fslmc/fslmc_bus.c | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
> > > index bfe81e236..a4f9a9eee 100644
> > > --- a/drivers/bus/fslmc/fslmc_bus.c
> > > +++ b/drivers/bus/fslmc/fslmc_bus.c
> > > @@ -491,6 +491,10 @@ rte_dpaa2_get_iommu_class(void)
> > > bool is_vfio_noiommu_enabled = 1;
> > > bool has_iova_va;
> > >
> > > +#ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA
> > > + return RTE_IOVA_PA;
> > > +#endif
> > > +
> >
> > As, RTE_LIBRTE_DPAA2_USE_PHYS_IOVA is set to true by default[1] and fslmc bus
> > being always registered[2] irrespective of the underlying platform, the IOVA class
> > will be always returned as PA.
> > This will break multiple platforms as some work only when IOVA as VA. I think
> > you need to verify if the underlying platform is really FLMC similar to DPAA[3]
>
> Thats a good catch and bad patch from me :( - Thanks for review.
> I will do this now:
>
> ---->8---
> static enum rte_iova_mode
> rte_dpaa2_get_iommu_class(void)
> {
> bool is_vfio_noiommu_enabled = 1;
> bool has_iova_va;
>
> - #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA
> - return RTE_IOVA_PA;
> - #endif
>
> if (TAILQ_EMPTY(&rte_fslmc_bus.device_list))
> return RTE_IOVA_DC;
>
> + #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA
> + return RTE_IOVA_PA;
> + #endif
> ---->8---
>
> In this case, in case no FSLMC device is detected (which would be cases
> you are referring to), DC would be returned.
>
> There is no other explicit way for me to check the PA/VA combination on
> the DPAA2 bus. Even for the DPAA function [3]that you have mentioned,
> that is not actually checking PA/VA applicability - it is just checking
> if we have DPAA enabled or not (complete bus).
>
> Is that OK?
Looks good to me :) cheers - Pavan.
>
> >
> > [1]
> > ->[master]ltp-pvn[dpdk] $ grep -nir "RTE_LIBRTE_DPAA2_USE_PHYS_IOVA" config/
> > config/meson.build:86:dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true)
> > config/common_base:218:CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=y
> >
> > [2]
> > config/common_linuxapp:45:CONFIG_RTE_LIBRTE_FSLMC_BUS=y
> >
> > [3]
> > 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;
> > }
> >
> >
> > > if (TAILQ_EMPTY(&rte_fslmc_bus.device_list))
> > > return RTE_IOVA_DC;
> > >
>
next prev parent reply other threads:[~2018-10-12 16:29 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 12:54 [dpdk-dev] [PATCH 0/5] Add a PA-VA Translation table for DPAAx Shreyansh Jain
2018-09-25 12:54 ` [dpdk-dev] [PATCH 1/5] bus/fslmc: fix physical addressing check Shreyansh Jain
2018-09-25 12:54 ` [dpdk-dev] [PATCH 2/5] drivers: common as dependency for bus Shreyansh Jain
2018-09-25 12:54 ` [dpdk-dev] [PATCH 3/5] common/dpaax: add library for PA VA translation table Shreyansh Jain
2018-09-25 13:28 ` Burakov, Anatoly
2018-09-25 13:39 ` Shreyansh Jain
2018-09-25 13:51 ` Burakov, Anatoly
2018-09-25 14:00 ` Shreyansh Jain
2018-09-25 14:08 ` Burakov, Anatoly
2018-09-26 10:16 ` Burakov, Anatoly
2018-10-09 10:45 ` Shreyansh Jain
2018-10-11 9:03 ` Burakov, Anatoly
2018-10-11 10:02 ` Shreyansh Jain
2018-10-11 10:07 ` Shreyansh Jain
2018-10-11 10:13 ` Burakov, Anatoly
2018-10-11 10:39 ` Shreyansh Jain
2018-10-11 10:46 ` Burakov, Anatoly
2018-10-11 10:09 ` Burakov, Anatoly
2018-09-25 12:54 ` [dpdk-dev] [PATCH 4/5] dpaa: enable dpaax library Shreyansh Jain
2018-09-25 12:54 ` [dpdk-dev] [PATCH 5/5] fslmc: " Shreyansh Jain
2018-10-09 11:25 ` [dpdk-dev] [PATCH v2 0/5] Add a PA-VA Translation table for DPAAx Shreyansh Jain
2018-10-09 11:25 ` [dpdk-dev] [PATCH v2 1/5] bus/fslmc: fix physical addressing check Shreyansh Jain
2018-10-12 9:01 ` Pavan Nikhilesh
2018-10-12 10:44 ` Shreyansh Jain
2018-10-12 16:29 ` Pavan Nikhilesh [this message]
2018-10-09 11:25 ` [dpdk-dev] [PATCH v2 2/5] drivers: common as dependency for bus Shreyansh Jain
2018-10-09 11:25 ` [dpdk-dev] [PATCH v2 3/5] common/dpaax: add library for PA VA translation table Shreyansh Jain
2018-10-09 11:25 ` [dpdk-dev] [PATCH v2 4/5] dpaa: enable dpaax library Shreyansh Jain
2018-10-09 11:25 ` [dpdk-dev] [PATCH v2 5/5] fslmc: " Shreyansh Jain
2018-10-13 12:21 ` [dpdk-dev] [PATCH v3 0/5] Add a PA-VA Translation table for DPAAx Shreyansh Jain
2018-10-13 12:21 ` [dpdk-dev] [PATCH v3 1/5] bus/fslmc: fix physical addressing check Shreyansh Jain
2018-10-13 16:08 ` Pavan Nikhilesh
2018-10-15 6:36 ` Shreyansh Jain
2018-10-13 12:21 ` [dpdk-dev] [PATCH v3 2/5] drivers: common as dependency for bus Shreyansh Jain
2018-10-13 12:21 ` [dpdk-dev] [PATCH v3 3/5] common/dpaax: add library for PA VA translation table Shreyansh Jain
2018-10-13 12:21 ` [dpdk-dev] [PATCH v3 4/5] dpaa: enable dpaax library Shreyansh Jain
2018-10-13 12:21 ` [dpdk-dev] [PATCH v3 5/5] fslmc: " Shreyansh Jain
2018-10-15 6:41 ` [dpdk-dev] [PATCH v4 0/5] Add a PA-VA Translation table for DPAAx Shreyansh Jain
2018-10-15 6:41 ` [dpdk-dev] [PATCH v4 1/5] bus/fslmc: fix physical addressing check Shreyansh Jain
2018-10-15 6:41 ` [dpdk-dev] [PATCH v4 2/5] drivers: common as dependency for bus Shreyansh Jain
2018-10-15 6:42 ` [dpdk-dev] [PATCH v4 3/5] common/dpaax: add library for PA VA translation table Shreyansh Jain
2018-10-15 6:42 ` [dpdk-dev] [PATCH v4 4/5] dpaa: enable dpaax library Shreyansh Jain
2018-10-15 6:42 ` [dpdk-dev] [PATCH v4 5/5] fslmc: " Shreyansh Jain
2018-10-15 12:01 ` [dpdk-dev] [PATCH v5 0/5] Shreyansh Jain
2018-10-15 12:01 ` [dpdk-dev] [PATCH v5 1/5] bus/fslmc: fix physical addressing check Shreyansh Jain
2018-10-16 10:02 ` Thomas Monjalon
2018-10-15 12:01 ` [dpdk-dev] [PATCH v5 2/5] drivers: common as dependency for bus Shreyansh Jain
2018-10-15 12:01 ` [dpdk-dev] [PATCH v5 3/5] common/dpaax: add library for PA VA translation table Shreyansh Jain
2018-10-15 23:17 ` Thomas Monjalon
2018-10-15 12:01 ` [dpdk-dev] [PATCH v5 4/5] dpaa: enable dpaax library Shreyansh Jain
2018-10-15 12:01 ` [dpdk-dev] [PATCH v5 5/5] fslmc: " Shreyansh Jain
2018-10-16 10:18 ` [dpdk-dev] [PATCH v5 0/5] Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181012162607.GA21825@wstn-pvn \
--to=pbhagavatula@caviumnetworks.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=jkollanukkaran@caviumnetworks.com \
--cc=shreyansh.jain@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).