DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: ferruh.yigit@intel.com, anatoly.burakov@intel.com,
	thomas@monjalon.net, shahafs@mellanox.com
Cc: dev@dpdk.org, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2 1/2] bus/pci: add Mellanox kernel driver type
Date: Thu,  2 May 2019 00:43:56 -0700	[thread overview]
Message-ID: <20190502074357.32031-1-yskoh@mellanox.com> (raw)
Message-ID: <20190502074356.AeihcR_su28dpNQ7m8-_X8MMM9FIK_HfB9Pu9Ijsu2k@z> (raw)
In-Reply-To: <20190502014436.40545-1-yskoh@mellanox.com>

Mellanox mlx4/5 PMD doesn't need to be detached from kernel driver and
attached to VFIO/UIO. Control path still goes through the existing kernel
drivers, which is mlx4_core/mlx5_core.

Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---

v2:
* add RTE_KDRV_NIC_MLX

 drivers/bus/pci/linux/pci.c             | 6 +++++-
 lib/librte_eal/common/include/rte_dev.h | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index c99d523f0a..b931cf9d10 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -329,6 +329,9 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
 			dev->kdrv = RTE_KDRV_IGB_UIO;
 		else if (!strcmp(driver, "uio_pci_generic"))
 			dev->kdrv = RTE_KDRV_UIO_GENERIC;
+		else if (!strcmp(driver, "mlx4_core") ||
+				!strcmp(driver, "mlx5_core"))
+			dev->kdrv = RTE_KDRV_NIC_MLX;
 		else
 			dev->kdrv = RTE_KDRV_UNKNOWN;
 	} else
@@ -568,7 +571,8 @@ pci_one_device_has_iova_va(void)
 	FOREACH_DRIVER_ON_PCIBUS(drv) {
 		if (drv && drv->drv_flags & RTE_PCI_DRV_IOVA_AS_VA) {
 			FOREACH_DEVICE_ON_PCIBUS(dev) {
-				if (dev->kdrv == RTE_KDRV_VFIO &&
+				if ((dev->kdrv == RTE_KDRV_VFIO ||
+				     dev->kdrv == RTE_KDRV_NIC_MLX) &&
 				    rte_pci_match(drv, dev))
 					return 1;
 			}
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index 56dd52ad9e..a17023d88b 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -63,6 +63,7 @@ enum rte_kernel_driver {
 	RTE_KDRV_VFIO,
 	RTE_KDRV_UIO_GENERIC,
 	RTE_KDRV_NIC_UIO,
+	RTE_KDRV_NIC_MLX,
 	RTE_KDRV_NONE,
 };
 
-- 
2.11.0


  parent reply	other threads:[~2019-05-02  7:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02  1:44 [dpdk-dev] [PATCH] net/mlx: support IOVA VA mode Yongseok Koh
2019-05-02  1:44 ` Yongseok Koh
2019-05-02  7:31 ` Yongseok Koh
2019-05-02  7:31   ` Yongseok Koh
2019-05-02  7:43 ` Yongseok Koh [this message]
2019-05-02  7:43   ` [dpdk-dev] [PATCH v2 1/2] bus/pci: add Mellanox kernel driver type Yongseok Koh
2019-05-02  7:43   ` [dpdk-dev] [PATCH v2 2/2] net/mlx: support IOVA VA mode Yongseok Koh
2019-05-02  7:43     ` Yongseok Koh
2019-05-02  8:10   ` [dpdk-dev] [PATCH v2 1/2] bus/pci: add Mellanox kernel driver type Thomas Monjalon
2019-05-02  8:10     ` Thomas Monjalon
2019-05-02  9:07 ` [dpdk-dev] [PATCH v3 " Yongseok Koh
2019-05-02  9:07   ` Yongseok Koh
2019-05-02  9:07   ` [dpdk-dev] [PATCH v3 2/2] net/mlx: support IOVA VA mode Yongseok Koh
2019-05-02  9:07     ` Yongseok Koh
2019-05-02 13:06     ` Shahaf Shuler
2019-05-02 13:06       ` Shahaf Shuler
2019-06-03 22:39   ` [dpdk-dev] [PATCH v3 1/2] bus/pci: add Mellanox kernel driver type 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=20190502074357.32031-1-yskoh@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=shahafs@mellanox.com \
    --cc=stable@dpdk.org \
    --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).