[v3,1/5] bus/fslmc: fix physical addressing check

Message ID 20181013122130.22588-2-shreyansh.jain@nxp.com (mailing list archive)
State Superseded, archived
Headers
Series [v3,1/5] bus/fslmc: fix physical addressing check |

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Shreyansh Jain Oct. 13, 2018, 12:21 p.m. UTC
  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(+)
  

Comments

Pavan Nikhilesh Oct. 13, 2018, 4:08 p.m. UTC | #1
On Sat, Oct 13, 2018 at 05:51:26PM +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 960f55071..19e33caf1 100644
> --- a/drivers/bus/fslmc/fslmc_bus.c
> +++ b/drivers/bus/fslmc/fslmc_bus.c
> @@ -493,6 +493,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
> +

I think you forgot to move it below the device list check as discussed in
previous patchset? :).

>         if (TAILQ_EMPTY(&rte_fslmc_bus.device_list))
>                 return RTE_IOVA_DC;
>
> --
> 2.17.1
>
  
Shreyansh Jain Oct. 15, 2018, 6:36 a.m. UTC | #2
On Saturday 13 October 2018 09:38 PM, Pavan Nikhilesh wrote:
> On Sat, Oct 13, 2018 at 05:51:26PM +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 960f55071..19e33caf1 100644
>> --- a/drivers/bus/fslmc/fslmc_bus.c
>> +++ b/drivers/bus/fslmc/fslmc_bus.c
>> @@ -493,6 +493,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
>> +
> 
> I think you forgot to move it below the device list check as discussed in
> previous patchset? :).

Yes, :(. Sorry.
I mixed up my internal branches.

> 
>>          if (TAILQ_EMPTY(&rte_fslmc_bus.device_list))
>>                  return RTE_IOVA_DC;
>>
>> --
>> 2.17.1
>>
  

Patch

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 960f55071..19e33caf1 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -493,6 +493,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
+
 	if (TAILQ_EMPTY(&rte_fslmc_bus.device_list))
 		return RTE_IOVA_DC;