[v3,2/2] net/mlx: support IOVA VA mode

Message ID 20190502090754.36154-2-yskoh@mellanox.com
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series
  • [v3,1/2] bus/pci: add Mellanox kernel driver type
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Yongseok Koh May 2, 2019, 9:07 a.m.
Set RTE_PCI_DRV_IOVA_AS_VA to driver's drv_flags as device's IOMMU takes
virtual address.

Cc: stable@dpdk.org

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

v3:
* no change

v2:
* add RTE_KDRV_NIC_MLX

 drivers/net/mlx4/mlx4.c | 4 ++--
 drivers/net/mlx5/mlx5.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Shahaf Shuler May 2, 2019, 1:06 p.m. | #1
Thursday, May 2, 2019 12:08 PM, Yongseok Koh:
> Subject: [dpdk-dev] [PATCH v3 2/2] net/mlx: support IOVA VA mode
> 
> Set RTE_PCI_DRV_IOVA_AS_VA to driver's drv_flags as device's IOMMU
> takes virtual address.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>

Acked-by: Shahaf Shuler <shahafs@mellanox.com>

> ---
> 
> v3:
> * no change
> 
> v2:
> * add RTE_KDRV_NIC_MLX
> 
>  drivers/net/mlx4/mlx4.c | 4 ++--
>  drivers/net/mlx5/mlx5.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index
> fe559c0407..eccb77b410 100644
> --- a/drivers/net/mlx4/mlx4.c
> +++ b/drivers/net/mlx4/mlx4.c
> @@ -1133,8 +1133,8 @@ static struct rte_pci_driver mlx4_driver = {
>  	},
>  	.id_table = mlx4_pci_id_map,
>  	.probe = mlx4_pci_probe,
> -	.drv_flags = RTE_PCI_DRV_INTR_LSC |
> -		     RTE_PCI_DRV_INTR_RMV,
> +	.drv_flags = RTE_PCI_DRV_INTR_LSC | RTE_PCI_DRV_INTR_RMV |
> +		     RTE_PCI_DRV_IOVA_AS_VA,
>  };
> 
>  #ifdef RTE_IBVERBS_LINK_DLOPEN
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index
> de85e85300..ecab7f899f 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -2101,8 +2101,8 @@ static struct rte_pci_driver mlx5_driver = {
>  	.remove = mlx5_pci_remove,
>  	.dma_map = mlx5_dma_map,
>  	.dma_unmap = mlx5_dma_unmap,
> -	.drv_flags = (RTE_PCI_DRV_INTR_LSC | RTE_PCI_DRV_INTR_RMV |
> -		      RTE_PCI_DRV_PROBE_AGAIN),
> +	.drv_flags = RTE_PCI_DRV_INTR_LSC | RTE_PCI_DRV_INTR_RMV |
> +		     RTE_PCI_DRV_PROBE_AGAIN |
> RTE_PCI_DRV_IOVA_AS_VA,
>  };
> 
>  #ifdef RTE_IBVERBS_LINK_DLOPEN
> --
> 2.11.0

Patch

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index fe559c0407..eccb77b410 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1133,8 +1133,8 @@  static struct rte_pci_driver mlx4_driver = {
 	},
 	.id_table = mlx4_pci_id_map,
 	.probe = mlx4_pci_probe,
-	.drv_flags = RTE_PCI_DRV_INTR_LSC |
-		     RTE_PCI_DRV_INTR_RMV,
+	.drv_flags = RTE_PCI_DRV_INTR_LSC | RTE_PCI_DRV_INTR_RMV |
+		     RTE_PCI_DRV_IOVA_AS_VA,
 };
 
 #ifdef RTE_IBVERBS_LINK_DLOPEN
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index de85e85300..ecab7f899f 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2101,8 +2101,8 @@  static struct rte_pci_driver mlx5_driver = {
 	.remove = mlx5_pci_remove,
 	.dma_map = mlx5_dma_map,
 	.dma_unmap = mlx5_dma_unmap,
-	.drv_flags = (RTE_PCI_DRV_INTR_LSC | RTE_PCI_DRV_INTR_RMV |
-		      RTE_PCI_DRV_PROBE_AGAIN),
+	.drv_flags = RTE_PCI_DRV_INTR_LSC | RTE_PCI_DRV_INTR_RMV |
+		     RTE_PCI_DRV_PROBE_AGAIN | RTE_PCI_DRV_IOVA_AS_VA,
 };
 
 #ifdef RTE_IBVERBS_LINK_DLOPEN