From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alejandro Lucero Subject: [PATCH 1/6] eal: add internal dma mask Date: Tue, 26 Jun 2018 18:37:28 +0100 Message-ID: <1530034653-28299-2-git-send-email-alejandro.lucero@netronome.com> References: <1530034653-28299-1-git-send-email-alejandro.lucero@netronome.com> Cc: stable@dpdk.org, anatoly.burakov@intel.com To: dev@dpdk.org Return-path: In-Reply-To: <1530034653-28299-1-git-send-email-alejandro.lucero@netronome.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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