[dpdk-stable] [PATCH 1/6] eal: add internal dma mask

Alejandro Lucero alejandro.lucero at netronome.com
Tue Jun 26 19:37:28 CEST 2018


Devices can have addressing limitations and an internal dma mask
will track the more restrictive dma mask set by a device.

Signed-off-by: Alejandro Lucero <alejandro.lucero at netronome.com>
---
 lib/librte_eal/common/eal_common_options.c | 1 +
 lib/librte_eal/common/eal_internal_cfg.h   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 996a034..2d7c839 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -205,6 +205,7 @@ struct device_option {
 	for (i = 0; i < MAX_HUGEPAGE_SIZES; i++)
 		internal_cfg->hugepage_info[i].lock_descriptor = -1;
 	internal_cfg->base_virtaddr = 0;
+	internal_cfg->dma_mask = 0;
 
 	internal_cfg->syslog_facility = LOG_DAEMON;
 
diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h
index fa6ccbe..e1e2944 100644
--- a/lib/librte_eal/common/eal_internal_cfg.h
+++ b/lib/librte_eal/common/eal_internal_cfg.h
@@ -84,6 +84,7 @@ struct internal_config {
 	const char *mbuf_pool_ops_name;   /**< mbuf pool ops name */
 	unsigned num_hugepage_sizes;      /**< how many sizes on this system */
 	struct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES];
+	uint64_t dma_mask;
 };
 extern struct internal_config internal_config; /**< Global EAL configuration. */
 
-- 
1.9.1



More information about the stable mailing list