eal: auto detect IOVA mode
authorSantosh Shukla <santosh.shukla@caviumnetworks.com>
Fri, 6 Oct 2017 11:03:43 +0000 (16:33 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 6 Oct 2017 18:39:07 +0000 (20:39 +0200)
commitcf408c22476c9f866deacac634dd17591e07a5c5
tree1f5d3fa446be97bcbfd9e6512bdc344e8a787967
parent93878cf0255e9dc21322ed99ad535adc048fa44f
eal: auto detect IOVA mode

iova autodetection depends on rte_bus_scan result. Result of bus scan will
have updated device_list and each device in that list has its '.kdev' state
updated. That kdrv state used to detect iova mapping mode for that device.

_device_parse() has dependency on rt_bus_scan so,
Below calls moved up in the eal initialization order:
- eal_option_device_parse
- rte_bus_scan

And based on the result of rte_bus_scan_iommu_class - select iova
mapping mode.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
lib/librte_eal/bsdapp/eal/eal.c
lib/librte_eal/linuxapp/eal/eal.c