[v3,0/4] Fixes on IOVA mode selection
mbox series

Message ID 20190718064543.33383-1-jerinj@marvell.com
Headers show
Series
  • Fixes on IOVA mode selection
Related show

Message

Jerin Jacob Kollanukkaran July 18, 2019, 6:45 a.m. UTC
From: Jerin Jacob <jerinj@marvell.com>

Orginal V1 cover letter from David Marchand:

Following the issues reported by Jerin and the discussion that emerged
from it, here are fixes to restore and document the behavior of the EAL
and the pci bus driver.

I pondered all the arguments and tried to have the less changes
possible.
I can't find a need for a flag to just announce support of physical
addresses from the pmd point of view.
So it ended up with something really close to what Jerin had suggested.

But the problem is that this is still unfinished wrt the documentation.
I will be offline for 10 days and we need this to move forward, so
sending
anyway.


v3:
- Patch 2/4 - Remove personal appeals in log messages(Anatoly)
- Patch 4/4 - Added following documentation (Anatoly)
a) #. It is easy to enable large amount of IOVA-contiguous memory use-cases with IOVA in VA mode.
in the reasons for VA as default
b) As a note,
If the device driver needs IOVA as VA and it cannot work with IOVA
as PA then the driver must request the PCI bus layer using
``RTE_PCI_DRV_NEED_IOVA_AS_VA`` requirement flag.
Absence of this flag, dictates, the driver must support both IOVA as PA and VA modes.

v2:
- Changed RTE_PCI_DRV_IOVA_AS_VA flag name as RTE_PCI_DRV_NEED_IOVA_AS_VA(patch 3/4)
- Changed IOVA mode as VA for default case(patch 4/4) with documentation
- Tested the patch series on octeontx2 platform

David Marchand (2):
  Revert "bus/pci: add Mellanox kernel driver type"
  eal: fix IOVA mode selection as VA for pci drivers

Jerin Jacob (2):
  eal: change RTE_PCI_DRV_IOVA_AS_VA flag name
  eal: select IOVA mode as VA for default case
 
 .../prog_guide/env_abstraction_layer.rst      | 45 +++++++++++++++++++
 drivers/bus/pci/linux/pci.c                   | 24 +++-------
 drivers/bus/pci/pci_common.c                  | 30 ++++++++++---
 drivers/bus/pci/rte_bus_pci.h                 |  4 +-
 drivers/event/octeontx/timvf_probe.c          |  2 +-
 drivers/event/octeontx2/otx2_evdev.c          |  2 +-
 drivers/mempool/octeontx/octeontx_fpavf.c     |  2 +-
 drivers/mempool/octeontx2/otx2_mempool.c      |  2 +-
 drivers/net/atlantic/atl_ethdev.c             |  3 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  3 +-
 drivers/net/e1000/em_ethdev.c                 |  3 +-
 drivers/net/e1000/igb_ethdev.c                |  5 +--
 drivers/net/enic/enic_ethdev.c                |  3 +-
 drivers/net/fm10k/fm10k_ethdev.c              |  3 +-
 drivers/net/i40e/i40e_ethdev.c                |  3 +-
 drivers/net/i40e/i40e_ethdev_vf.c             |  2 +-
 drivers/net/iavf/iavf_ethdev.c                |  3 +-
 drivers/net/ice/ice_ethdev.c                  |  3 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  5 +--
 drivers/net/mlx4/mlx4.c                       |  3 +-
 drivers/net/mlx5/mlx5.c                       |  2 +-
 drivers/net/nfp/nfp_net.c                     |  6 +--
 drivers/net/octeontx2/otx2_ethdev.c           |  7 +--
 drivers/net/qede/qede_ethdev.c                |  6 +--
 drivers/raw/ioat/ioat_rawdev.c                |  3 +-
 drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c   |  2 +-
 lib/librte_eal/common/eal_common_bus.c        | 30 +++++++++++--
 lib/librte_eal/common/include/rte_dev.h       |  1 -
 lib/librte_eal/linux/eal/eal.c                |  6 +--
 29 files changed, 132 insertions(+), 81 deletions(-)

Comments

David Marchand July 22, 2019, 11:28 a.m. UTC | #1
On Thu, Jul 18, 2019 at 8:45 AM <jerinj@marvell.com> wrote:
>
> From: Jerin Jacob <jerinj@marvell.com>
>
> Orginal V1 cover letter from David Marchand:
>
> Following the issues reported by Jerin and the discussion that emerged
> from it, here are fixes to restore and document the behavior of the EAL
> and the pci bus driver.
>
> I pondered all the arguments and tried to have the less changes
> possible.
> I can't find a need for a flag to just announce support of physical
> addresses from the pmd point of view.
> So it ended up with something really close to what Jerin had suggested.
>
> But the problem is that this is still unfinished wrt the documentation.
> I will be offline for 10 days and we need this to move forward, so
> sending
> anyway.
>
>
> v3:
> - Patch 2/4 - Remove personal appeals in log messages(Anatoly)
> - Patch 4/4 - Added following documentation (Anatoly)
> a) #. It is easy to enable large amount of IOVA-contiguous memory use-cases with IOVA in VA mode.
> in the reasons for VA as default
> b) As a note,
> If the device driver needs IOVA as VA and it cannot work with IOVA
> as PA then the driver must request the PCI bus layer using
> ``RTE_PCI_DRV_NEED_IOVA_AS_VA`` requirement flag.
> Absence of this flag, dictates, the driver must support both IOVA as PA and VA modes.
>
> v2:
> - Changed RTE_PCI_DRV_IOVA_AS_VA flag name as RTE_PCI_DRV_NEED_IOVA_AS_VA(patch 3/4)
> - Changed IOVA mode as VA for default case(patch 4/4) with documentation
> - Tested the patch series on octeontx2 platform

Many thanks to both of you (Jerin, Anatoly) for working on this while
I was away.
I have some minor comments on the newly added patches, I will send a
v4 with the changes in it directly.