DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: santosh <santosh.shukla@caviumnetworks.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	jerin.jacob@caviumnetworks.com
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>,
	dev@dpdk.org, Jianfeng Tan <jianfeng.tan@intel.com>
Subject: Re: [dpdk-dev] [PATCH] eal: disable IOVA mode detection by default
Date: Wed, 1 Nov 2017 11:22:55 -0700	[thread overview]
Message-ID: <d9b96c3e-a990-9e0a-13b4-ceda9c519b15@intel.com> (raw)
In-Reply-To: <ab5b7d69-3436-814e-4b71-4c89905a1d70@caviumnetworks.com>

On 11/1/2017 4:06 AM, santosh wrote:
> 
> On Wednesday 01 November 2017 04:01 PM, 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@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.
>> We can improve the autodetect by checking whether rte_kni.ko is loaded.
> 
> IMO, we could introduce a rule for kni in iova autodetection(/for linux case)
> such away that: 
> 
> if cat /proc/modules has rte_kni entry 
> then use default iova=pa mode.

This sounds good as a workaround for this release [1].

For long term I believe KNI should be updated to work with virtual addresses.


[1]
This won't work if both IOVA VA mode only device and KNI used together. But I
assume this is not common use case.


> 
> so +1 to your proposition Thomas.
> 
>> Opinions?
> 

  reply	other threads:[~2017-11-01 18:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01  1:07 Ferruh Yigit
2017-11-01  2:17 ` Tan, Jianfeng
2017-11-01  6:32   ` Ferruh Yigit
2017-11-01  6:37     ` Tan, Jianfeng
2017-11-01  7:29       ` Ferruh Yigit
2017-11-01  7:55         ` Tan, Jianfeng
2017-11-01  3:54 ` santosh
2017-11-01  4:02 ` Jerin Jacob
2017-11-01  6:21   ` Ferruh Yigit
2017-11-01  6:54     ` Jerin Jacob
2017-11-01  7:39       ` Tan, Jianfeng
2017-11-01  8:26         ` Jerin Jacob
2017-11-01  8:53           ` Tan, Jianfeng
2017-11-01 18:31             ` Ferruh Yigit
2017-11-01  8:12       ` Ferruh Yigit
2017-11-01 10:31 ` Thomas Monjalon
2017-11-01 11:06   ` santosh
2017-11-01 18:22     ` Ferruh Yigit [this message]
2017-11-01 18:11   ` Ferruh Yigit

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=d9b96c3e-a990-9e0a-13b4-ceda9c519b15@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=jianfeng.tan@intel.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=sergio.gonzalez.monroy@intel.com \
    --cc=thomas@monjalon.net \
    /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).