From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cbtest1.netronome.com (host-79-78-33-110.static.as9105.net [79.78.33.110]) by dpdk.org (Postfix) with ESMTP id 2B79D6CA6 for ; Thu, 12 May 2016 16:34:04 +0200 (CEST) Received: from cbtest1.netronome.com (localhost [127.0.0.1]) by cbtest1.netronome.com (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u4CEY3Yi030779 for ; Thu, 12 May 2016 15:34:03 +0100 Received: (from alucero@localhost) by cbtest1.netronome.com (8.14.4/8.14.4/Submit) id u4CEY0ZR030778 for dev@dpdk.org; Thu, 12 May 2016 15:34:00 +0100 From: Alejandro Lucero To: dev@dpdk.org Date: Thu, 12 May 2016 15:33:57 +0100 Message-Id: <1463063640-30715-1-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH 0/3] add support for devices with addressing limitations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2016 14:34:04 -0000 A kernel driver uses a dma mask specifying the memory address range supported by the device for DMA operations. With DPDK there is no possibility for doing the same thing so it could lead to problems with those devices not being able to use all the available physical memory. This patchset adds support for a PMD setting a device dma mask. If this dma mask is set this will imply a call for checking hugepages allocated are within the supported device range. First patch adds the checking function. If there is a hugepage (memseg) out of the device supported range an error is raised. Nothing really we can do as any other available hugepage (and not allocated) will be also out of range as hugepages are ordered by physical address before allocating. Second patch adds call to the checking function if device dma mask is set during PMD initialization. Depending on how hugepages are created and the amount of them the checking could slow down initialization. If a device has not addressing limitations the checking is not done. Third patch adds support for setting dma mask in the PMD NFP. Current NFP card just supports 40 bits. Future versions will support 64 bits. Alejandro Lucero (3): eal/linux: add function for checking hugepages within device supported address range eth_dev: add support for device dma mask nfp: set device dma mask drivers/net/nfp/nfp_net.c | 11 +++++++++++ lib/librte_eal/common/include/rte_memory.h | 6 ++++++ lib/librte_eal/linuxapp/eal/eal_memory.c | 27 +++++++++++++++++++++++++++ lib/librte_ether/rte_ethdev.c | 7 +++++++ lib/librte_ether/rte_ethdev.h | 1 + 5 files changed, 52 insertions(+) -- 1.9.1