DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Darek Stojaczyk <dariusz.stojaczyk@intel.com>,
	Santosh Shukla <santosh.shukla@caviumnetworks.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Chas Williams <chas3@att.com>,
	gaetan.rivet@6wind.com, stephen@networkplumber.org,
	ferruh.yigit@intel.com, arybchenko@solarflare.com
Subject: Re: [dpdk-dev] [PATCH] pci/linux: use RTE_IOVA_VA whenever possible
Date: Thu, 11 Oct 2018 11:48:44 +0200	[thread overview]
Message-ID: <7239766.tk8ES4I1iR@xps> (raw)
In-Reply-To: <20180907145340.79670-1-dariusz.stojaczyk@intel.com>

Someone to review this patch please?


07/09/2018 16:53, Darek Stojaczyk:
> This allows DPDK to use RTE_IOVA_VA with VFIO/UIO-bound PCI
> devices present on the system, but not attached to any
> rte_pci_driver at the time of init.
> 
> So far we used RTE_IOVA_VA whenever there was at least one
> device attached to a driver with an RTE_PCI_DRV_IOVA_AS_VA flag,
> meaning that other drivers which didn't explicitly report such
> flag could have been forced to work in RTE_IOVA_VA as well.
> 
> This patch makes the RTE_PCI_DRV_IOVA_AS_VA explicitly a hint.
> If it's set, but RTE_IOVA_VA cannot be used, then EAL will print
> a proper warning.
> 
> Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
> ---
>  drivers/bus/pci/linux/pci.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
> index 04648ac93..961e24024 100644
> --- a/drivers/bus/pci/linux/pci.c
> +++ b/drivers/bus/pci/linux/pci.c
> @@ -534,7 +534,7 @@ pci_one_device_bound_uio(void)
>   * Any one of the device has iova as va
>   */
>  static inline int
> -pci_one_device_has_iova_va(void)
> +pci_one_device_want_iova_va(void)
>  {
>  	struct rte_pci_device *dev = NULL;
>  	struct rte_pci_driver *drv = NULL;
> @@ -635,7 +635,7 @@ rte_pci_get_iommu_class(void)
>  {
>  	bool is_bound;
>  	bool is_vfio_noiommu_enabled = true;
> -	bool has_iova_va;
> +	bool want_iova_va;
>  	bool is_bound_uio;
>  	bool iommu_no_va;
>  
> @@ -643,7 +643,7 @@ rte_pci_get_iommu_class(void)
>  	if (!is_bound)
>  		return RTE_IOVA_DC;
>  
> -	has_iova_va = pci_one_device_has_iova_va();
> +	want_iova_va = pci_one_device_want_iova_va();
>  	is_bound_uio = pci_one_device_bound_uio();
>  	iommu_no_va = !pci_devices_iommu_support_va();
>  #ifdef VFIO_PRESENT
> @@ -651,11 +651,10 @@ rte_pci_get_iommu_class(void)
>  					true : false;
>  #endif
>  
> -	if (has_iova_va && !is_bound_uio && !is_vfio_noiommu_enabled &&
> -			!iommu_no_va)
> +	if (!is_bound_uio && !is_vfio_noiommu_enabled && !iommu_no_va)
>  		return RTE_IOVA_VA;
>  
> -	if (has_iova_va) {
> +	if (want_iova_va) {
>  		RTE_LOG(WARNING, EAL, "Some devices want iova as va but pa will be used because.. ");
>  		if (is_vfio_noiommu_enabled)
>  			RTE_LOG(WARNING, EAL, "vfio-noiommu mode configured\n");
> 

  reply	other threads:[~2018-10-11  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 14:53 Darek Stojaczyk
2018-10-11  9:48 ` Thomas Monjalon [this message]
2018-10-11 10:00 ` Alejandro Lucero
2018-10-11 10:26   ` Burakov, Anatoly
2018-10-11 10:47     ` Jerin Jacob
2018-10-28 18:56       ` 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=7239766.tk8ES4I1iR@xps \
    --to=thomas@monjalon.net \
    --cc=anatoly.burakov@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=chas3@att.com \
    --cc=dariusz.stojaczyk@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gaetan.rivet@6wind.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=stephen@networkplumber.org \
    /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).