From patchwork Tue Jun 26 17:37:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Lucero X-Patchwork-Id: 41608 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C7C851BE40; Tue, 26 Jun 2018 19:38:06 +0200 (CEST) Received: from netronome.com (host-79-78-33-110.static.as9105.net [79.78.33.110]) by dpdk.org (Postfix) with ESMTP id 78AE21BE3C; Tue, 26 Jun 2018 19:38:04 +0200 (CEST) Received: from netronome.com (localhost [127.0.0.1]) by netronome.com (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id w5QHbb0r028350; Tue, 26 Jun 2018 18:37:37 +0100 Received: (from alucero@localhost) by netronome.com (8.14.4/8.14.4/Submit) id w5QHbbkk028349; Tue, 26 Jun 2018 18:37:37 +0100 From: Alejandro Lucero To: dev@dpdk.org Cc: stable@dpdk.org, anatoly.burakov@intel.com Date: Tue, 26 Jun 2018 18:37:28 +0100 Message-Id: <1530034653-28299-2-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530034653-28299-1-git-send-email-alejandro.lucero@netronome.com> References: <1530034653-28299-1-git-send-email-alejandro.lucero@netronome.com> Subject: [dpdk-dev] [PATCH 1/6] eal: add internal dma mask X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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. */