DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/qede: support IOVA VA mode
@ 2019-03-07 18:39 Kevin Traynor
  2019-03-07 21:09 ` [dpdk-dev] [EXT] " Rasesh Mody
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kevin Traynor @ 2019-03-07 18:39 UTC (permalink / raw)
  To: rmody, dev; +Cc: Kevin Traynor, stable

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") 

Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---

 drivers/net/qede/qede_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 518673dce..6b330c2b2 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -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,
-- 
2.20.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [EXT] [PATCH] net/qede: support IOVA VA mode
  2019-03-07 18:39 [dpdk-dev] [PATCH] net/qede: support IOVA VA mode Kevin Traynor
@ 2019-03-07 21:09 ` Rasesh Mody
  2019-03-08  5:15 ` [dpdk-dev] " Shahed Shaikh
  2019-03-08  9:28 ` [dpdk-dev] [PATCH v2] " Kevin Traynor
  2 siblings, 0 replies; 6+ messages in thread
From: Rasesh Mody @ 2019-03-07 21:09 UTC (permalink / raw)
  To: Kevin Traynor, dev; +Cc: stable

>From: Kevin Traynor <ktraynor@redhat.com>
>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.
>
>The flag was introduced generically but not in pmds in commit:
>815c7deaed2d ("pci: get IOMMU class on Linux")
>
>Cc: stable@dpdk.org
>
>Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
>---

Acked-by: Rasesh Mody <rmody@marvell.com>
>
> drivers/net/qede/qede_ethdev.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/qede/qede_ethdev.c
>b/drivers/net/qede/qede_ethdev.c index 518673dce..6b330c2b2 100644
>--- a/drivers/net/qede/qede_ethdev.c
>+++ b/drivers/net/qede/qede_ethdev.c
>@@ -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,
>--
>2.20.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] net/qede: support IOVA VA mode
  2019-03-07 18:39 [dpdk-dev] [PATCH] net/qede: support IOVA VA mode Kevin Traynor
  2019-03-07 21:09 ` [dpdk-dev] [EXT] " Rasesh Mody
@ 2019-03-08  5:15 ` Shahed Shaikh
  2019-03-08  9:28 ` [dpdk-dev] [PATCH v2] " Kevin Traynor
  2 siblings, 0 replies; 6+ messages in thread
From: Shahed Shaikh @ 2019-03-08  5:15 UTC (permalink / raw)
  To: Kevin Traynor, Rasesh Mody, dev; +Cc: stable

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Kevin Traynor
> Sent: Friday, March 8, 2019 12:09 AM
> To: Rasesh Mody <rmody@marvell.com>; dev@dpdk.org
> Cc: Kevin Traynor <ktraynor@redhat.com>; stable@dpdk.org
> 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.
> 
> The flag was introduced generically but not in pmds in commit:
> 815c7deaed2d ("pci: get IOMMU class on Linux")
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>

Acked-by: Shahed Shaikh <shshaikh@marvell.com>

Thanks,
Shahed
> ---
> 
>  drivers/net/qede/qede_ethdev.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
> index 518673dce..6b330c2b2 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -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,
> --
> 2.20.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v2] net/qede: support IOVA VA mode
  2019-03-07 18:39 [dpdk-dev] [PATCH] net/qede: support IOVA VA mode Kevin Traynor
  2019-03-07 21:09 ` [dpdk-dev] [EXT] " Rasesh Mody
  2019-03-08  5:15 ` [dpdk-dev] " Shahed Shaikh
@ 2019-03-08  9:28 ` Kevin Traynor
  2019-03-15 18:18   ` Ferruh Yigit
  2 siblings, 1 reply; 6+ messages in thread
From: Kevin Traynor @ 2019-03-08  9:28 UTC (permalink / raw)
  To: rmody, shshaikh, dev; +Cc: Kevin Traynor, stable

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")

Cc: stable@dpdk.org

Acked-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
v2: fixed spacing error

 drivers/net/qede/qede_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 518673dce..0b2f305e1 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -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,
-- 
2.20.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/qede: support IOVA VA mode
  2019-03-08  9:28 ` [dpdk-dev] [PATCH v2] " Kevin Traynor
@ 2019-03-15 18:18   ` Ferruh Yigit
  2019-03-15 18:18     ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2019-03-15 18:18 UTC (permalink / raw)
  To: Kevin Traynor, rmody, shshaikh, dev; +Cc: stable

On 3/8/2019 9:28 AM, Kevin Traynor wrote:
> 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")
> 
> Cc: stable@dpdk.org
> 
> Acked-by: Shahed Shaikh <shshaikh@marvell.com>
> Acked-by: Rasesh Mody <rmody@marvell.com>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/qede: support IOVA VA mode
  2019-03-15 18:18   ` Ferruh Yigit
@ 2019-03-15 18:18     ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2019-03-15 18:18 UTC (permalink / raw)
  To: Kevin Traynor, rmody, shshaikh, dev; +Cc: stable

On 3/8/2019 9:28 AM, Kevin Traynor wrote:
> 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")
> 
> Cc: stable@dpdk.org
> 
> Acked-by: Shahed Shaikh <shshaikh@marvell.com>
> Acked-by: Rasesh Mody <rmody@marvell.com>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-03-15 18:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 18:39 [dpdk-dev] [PATCH] net/qede: support IOVA VA mode Kevin Traynor
2019-03-07 21:09 ` [dpdk-dev] [EXT] " Rasesh Mody
2019-03-08  5:15 ` [dpdk-dev] " Shahed Shaikh
2019-03-08  9:28 ` [dpdk-dev] [PATCH v2] " Kevin Traynor
2019-03-15 18:18   ` Ferruh Yigit
2019-03-15 18:18     ` Ferruh Yigit

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).