On 07/11/2017 08:16 AM, Santosh Shukla wrote:
diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h
index af9f0e13f..7a0cfb165 100644
--- a/lib/librte_eal/common/include/rte_bus.h
+++ b/lib/librte_eal/common/include/rte_bus.h
@@ -55,6 +55,15 @@ extern "C" {
  /** Double linked list of buses */
  TAILQ_HEAD(rte_bus_list, rte_bus);
+
+/**
+ * IOVA mapping mode.
+ */
+enum rte_iova_mode {
+       RTE_IOVA_PA = 1,
+       RTE_IOVA_VA
+};
+
  /**
   * Bus specific scan for devices attached on the bus.
   * For each bus object, the scan would be responsible for finding devices and
diff --git a/lib/librte_eal/common/include/rte_pci.h 
b/lib/librte_eal/common/include/rte_pci.h
index 4a485674e..c58361132 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -383,6 +383,17 @@ int
  rte_pci_match(const struct rte_pci_driver *pci_drv,
              const struct rte_pci_device *pci_dev);
+
+/**
+ * Get iommu class of PCI devices on the bus.
+ * And return their preferred iova mapping mode.
+ *
+ * @return
+ *   - enum rte_iova_mode.
+ */
+enum rte_iova_mode
+rte_pci_get_iommu_class(void);
+
  /**
   * Map the PCI device resources in user space virtual memory address
   *

I would have put this in a separate patch, as not bsd specifics.

Maxime

Reply via email to