eal: introduce helper API for IOVA mode
Introducing rte_eal_iova_mode() helper API. This API used by non-eal library for detecting iova 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> Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
parent
39bef5cb98
commit
93878cf025
@ -119,6 +119,12 @@ rte_eal_get_configuration(void)
|
||||
return &rte_config;
|
||||
}
|
||||
|
||||
enum rte_iova_mode
|
||||
rte_eal_iova_mode(void)
|
||||
{
|
||||
return rte_eal_get_configuration()->iova_mode;
|
||||
}
|
||||
|
||||
/* parse a sysfs (or other) file containing one integer value */
|
||||
int
|
||||
eal_parse_sysfs_value(const char *filename, unsigned long *val)
|
||||
|
@ -243,6 +243,7 @@ DPDK_17.11 {
|
||||
global:
|
||||
|
||||
rte_bus_get_iommu_class;
|
||||
rte_eal_iova_mode;
|
||||
rte_pci_get_iommu_class;
|
||||
rte_pci_match;
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
|
||||
#include <rte_per_lcore.h>
|
||||
#include <rte_config.h>
|
||||
#include <rte_bus.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -87,6 +88,9 @@ struct rte_config {
|
||||
/** Primary or secondary configuration */
|
||||
enum rte_proc_type_t process_type;
|
||||
|
||||
/** PA or VA mapping mode */
|
||||
enum rte_iova_mode iova_mode;
|
||||
|
||||
/**
|
||||
* Pointer to memory configuration, which may be shared across multiple
|
||||
* DPDK instances
|
||||
@ -287,6 +291,14 @@ static inline int rte_gettid(void)
|
||||
return RTE_PER_LCORE(_thread_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the iova mode
|
||||
*
|
||||
* @return
|
||||
* enum rte_iova_mode value.
|
||||
*/
|
||||
enum rte_iova_mode rte_eal_iova_mode(void);
|
||||
|
||||
/**
|
||||
* Run function before main() with low priority.
|
||||
*
|
||||
|
@ -128,6 +128,12 @@ rte_eal_get_configuration(void)
|
||||
return &rte_config;
|
||||
}
|
||||
|
||||
enum rte_iova_mode
|
||||
rte_eal_iova_mode(void)
|
||||
{
|
||||
return rte_eal_get_configuration()->iova_mode;
|
||||
}
|
||||
|
||||
/* parse a sysfs (or other) file containing one integer value */
|
||||
int
|
||||
eal_parse_sysfs_value(const char *filename, unsigned long *val)
|
||||
|
@ -248,6 +248,7 @@ DPDK_17.11 {
|
||||
global:
|
||||
|
||||
rte_bus_get_iommu_class;
|
||||
rte_eal_iova_mode;
|
||||
rte_pci_get_iommu_class;
|
||||
rte_pci_match;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user