[dpdk-dev] [PATCH] eal: disable IOVA mode detection by default

Ferruh Yigit ferruh.yigit at intel.com
Wed Nov 1 19:11:53 CET 2017


On 11/1/2017 3:31 AM, Thomas Monjalon wrote:
> 01/11/2017 02:07, Ferruh Yigit:
>> Fix kernel crash with KNI because KNI requires physical addresses.
>>
>> A config option introduced to disable IOVA mode detection and to set it
>> to physical address by default. Disabling config option will enable IOVA
>> mode detection.
>>
>> When there is no intension to use KNI, it is safe to enable detection.
>>
>> Config option disable IOVA mode detection by default to be sure only who
>> is aware of result enable it.
>>
>> Fixes: 72d013644bd6 ("mem: honor IOVA mode in malloc virt2phy")
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
>> ---
>> +#ifdef RTE_EAL_USE_PHYS_IOVA
>> +	rte_eal_get_configuration()->iova_mode = RTE_IOVA_PA;
>> +#else
>>  	/* autodetect the iova mapping mode (default is iova_pa) */
>>  	rte_eal_get_configuration()->iova_mode = rte_bus_get_iommu_class();
>> +#endif
> 
> I don't understand why you are adding a compile-time option.
> I think it should be an EAL option --use-phys-addr.
> The opposite option may be required to force VA: --use-virt-addr.
> And if there is no option given, we fallback to autodetect.

It was to have old behavior by default without doing anything special, so that
previous KNI applications can continue to run as it is.

> We can improve the autodetect by checking whether rte_kni.ko is loaded.
> 
> Opinions?
> 



More information about the dev mailing list