Skip to contentSkip to conversation

net/qede: support IOVA VA mode

PATCH Superseded Kevin Traynor 4 participants 5 messages Mar 7, 2019 – Mar 15, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/qede: support IOVA VA mode

Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags. This allows initializing qede PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be acccessed without CAP_SYS_ADMIN privileges.

The flag was introduced generically but not in pmds in commit:
815c7deaed2d ("pci: get IOMMU class on Linux")

---

 drivers/net/qede/qede_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/qede/qede_ethdev.c +4 -2
index 518673dce..6b330c2b2 100644
@@ -2736,5 +2736,6 @@ static int qedevf_eth_dev_pci_remove(struct rte_pci_device *pci_dev)
 static struct rte_pci_driver rte_qedevf_pmd = {
 	.id_table = pci_id_qedevf_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING |RTE_PCI_DRV_INTR_LSC |
+		     RTE_PCI_DRV_IOVA_AS_VA,
 	.probe = qedevf_eth_dev_pci_probe,
 	.remove = qedevf_eth_dev_pci_remove,
@@ -2755,5 +2756,6 @@ static int qede_eth_dev_pci_remove(struct rte_pci_device *pci_dev)
 static struct rte_pci_driver rte_qede_pmd = {
 	.id_table = pci_id_qede_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
+		     RTE_PCI_DRV_IOVA_AS_VA,
 	.probe = qede_eth_dev_pci_probe,
 	.remove = qede_eth_dev_pci_remove,
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines

From: Kevin Traynor <[email protected]>
Sent: Thursday, March 07, 2019 10:39 AM

----------------------------------------------------------------------
Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags. This allows initializing qede PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be acccessed without CAP_SYS_ADMIN privileges.

Quoted 7 lines

The flag was introduced generically but not in pmds in commit:
815c7deaed2d ("pci: get IOMMU class on Linux")

---

Quoted 30 lines

drivers/net/qede/qede_ethdev.c | 6 ++++--

1 file changed, 4 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/net/qede/qede_ethdev.c index 518673dce..6b330c2b2 100644

drivers/net/qede/qede_ethdev.c +1 -1
@@ -2736,5 +2736,6 @@ static int qedevf_eth_dev_pci_remove(struct
 rte_pci_device *pci_dev)  static struct rte_pci_driver rte_qedevf_pmd = {
 	.id_table = pci_id_qedevf_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING |
 RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING

|RTE_PCI_DRV_INTR_LSC |

drivers/net/qede/qede_ethdev.c +1 -0
+		     RTE_PCI_DRV_IOVA_AS_VA,

.probe = qedevf_eth_dev_pci_probe,
.remove = qedevf_eth_dev_pci_remove,

drivers/net/qede/qede_ethdev.c +1 -1
@@ -2755,5 +2756,6 @@ static int qede_eth_dev_pci_remove(struct
 rte_pci_device *pci_dev)  static struct rte_pci_driver rte_qede_pmd = {
 	.id_table = pci_id_qede_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING |
 RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING |

RTE_PCI_DRV_INTR_LSC |

drivers/net/qede/qede_ethdev.c +1 -0
+		     RTE_PCI_DRV_IOVA_AS_VA,

.probe = qede_eth_dev_pci_probe,
.remove = qede_eth_dev_pci_remove,
--
2.20.1

Acked-by on v1 1/1
#2 lore raw
In reply to Kevin Traynor
Quoted 11 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Kevin Traynor
Sent: Friday, March 8, 2019 12:09 AM
To: Rasesh Mody <[email protected]>; [email protected]
Cc: Kevin Traynor <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/qede: support IOVA VA mode

Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags. This allows initializing qede PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be acccessed without CAP_SYS_ADMIN privileges.

Quoted 6 lines

The flag was introduced generically but not in pmds in commit:
815c7deaed2d ("pci: get IOMMU class on Linux")

Thanks,
Shahed

Quoted 28 lines

---

 drivers/net/qede/qede_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/qede/qede_ethdev.c +3 -2
index 518673dce..6b330c2b2 100644
@@ -2736,5 +2736,6 @@ static int qedevf_eth_dev_pci_remove(struct
 rte_pci_device *pci_dev)  static struct rte_pci_driver rte_qedevf_pmd = {
 	.id_table = pci_id_qedevf_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING |RTE_PCI_DRV_INTR_LSC |
+		     RTE_PCI_DRV_IOVA_AS_VA,
 	.probe = qedevf_eth_dev_pci_probe,
 	.remove = qedevf_eth_dev_pci_remove,
@@ -2755,5 +2756,6 @@ static int qede_eth_dev_pci_remove(struct
 rte_pci_device *pci_dev)  static struct rte_pci_driver rte_qede_pmd = {
 	.id_table = pci_id_qede_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC

|

drivers/net/qede/qede_ethdev.c +1 -1
+		     RTE_PCI_DRV_IOVA_AS_VA,
 	.probe = qede_eth_dev_pci_probe,
 	.remove = qede_eth_dev_pci_remove,
--

2.20.1

#3 lore raw

PATCH v2 1/1 net/qede: support IOVA VA mode

In reply to Kevin Traynor

Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags. This allows initializing qede PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be acccessed without CAP_SYS_ADMIN privileges.

The flag was introduced generically but not in pmds in commit:
815c7deaed2d ("pci: get IOMMU class on Linux")

---
v2: fixed spacing error

 drivers/net/qede/qede_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/qede/qede_ethdev.c +4 -2
index 518673dce..0b2f305e1 100644
@@ -2736,5 +2736,6 @@ static int qedevf_eth_dev_pci_remove(struct rte_pci_device *pci_dev)
 static struct rte_pci_driver rte_qedevf_pmd = {
 	.id_table = pci_id_qedevf_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
+		     RTE_PCI_DRV_IOVA_AS_VA,
 	.probe = qedevf_eth_dev_pci_probe,
 	.remove = qedevf_eth_dev_pci_remove,
@@ -2755,5 +2756,6 @@ static int qede_eth_dev_pci_remove(struct rte_pci_device *pci_dev)
 static struct rte_pci_driver rte_qede_pmd = {
 	.id_table = pci_id_qede_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
+		     RTE_PCI_DRV_IOVA_AS_VA,
 	.probe = qede_eth_dev_pci_probe,
 	.remove = qede_eth_dev_pci_remove,
Signature · 1 line
2.20.1
Applied
#4 lore raw
Quoted 4 lines · Kevin Traynor

Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags. This allows initializing qede PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be acccessed without CAP_SYS_ADMIN privileges.

Quoted 8 lines

The flag was introduced generically but not in pmds in commit:
815c7deaed2d ("pci: get IOMMU class on Linux")

Applied to dpdk-next-net/master, thanks.