[dpdk-dev] [PATCH] eal: force IOVA mode to physical
Hemant
hemant.agrawal at nxp.com
Thu Aug 30 08:13:57 CEST 2018
On 8/29/2018 9:28 PM, eric zhang wrote:
> This patch adds a configuration option to force the IOVA mode to
> physical address (PA). There exists virtual devices that are not
> directly attached to the PCI bus, and therefore the auto detection
> of the IOVA mode based on probing the PCI bus and IOMMU configuration
> may not report the required addressing mode. Having the configuration
> option permits the mode to be explicitly configured in this scenario.
>
> Signed-off-by: eric zhang <eric.zhang at windriver.com>
> ---
> lib/librte_eal/linuxapp/eal/eal.c | 7 +++++++
you will also need the same in bsdapp/eal
> 1 file changed, 7 insertions(+)
>
> diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
> index e0b5ae1..bee4aed 100644
> --- a/lib/librte_eal/linuxapp/eal/eal.c
> +++ b/lib/librte_eal/linuxapp/eal/eal.c
> @@ -805,6 +805,7 @@ static void rte_eal_init_alert(const char *msg)
> return -1;
> }
>
> +#ifndef RTE_EAL_IOVA_MODE_PA
Add the default option as 'n' in config/common_base
> /* autodetect the iova mapping mode (default is iova_pa) */
> rte_eal_get_configuration()->iova_mode = rte_bus_get_iommu_class();
>
> @@ -816,6 +817,12 @@ static void rte_eal_init_alert(const char *msg)
> "Some devices want IOVA as VA but PA will be used because.. "
> "KNI module inserted\n");
> }
> +#else
> + /* Force iova mapping mode to be physical address */
> + rte_eal_get_configuration()->iova_mode = RTE_IOVA_PA;
> + RTE_LOG(WARNING, EAL,
> + "Force the iova mapping mode to be physical address\n");
> +#endif
>
> if (internal_config.no_hugetlbfs == 0 &&
> internal_config.process_type != RTE_PROC_SECONDARY &&
More information about the dev
mailing list