From patchwork Tue Jul 3 12:09:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Lucero X-Patchwork-Id: 42148 X-Patchwork-Delegate: thomas@monjalon.net 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 1BE631BE99; Tue, 3 Jul 2018 14:10:03 +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 EF1821BDF7; Tue, 3 Jul 2018 14:09:57 +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 w63C9rAk033390; Tue, 3 Jul 2018 13:09:53 +0100 Received: (from alucero@localhost) by netronome.com (8.14.4/8.14.4/Submit) id w63C9rLv033389; Tue, 3 Jul 2018 13:09:53 +0100 From: Alejandro Lucero To: dev@dpdk.org Cc: stable@dpdk.org, anatoly.burakov@intel.com, maxime.coquelin@redhat.com Date: Tue, 3 Jul 2018 13:09:45 +0100 Message-Id: <1530619789-33337-3-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530619789-33337-1-git-send-email-alejandro.lucero@netronome.com> References: <1530619789-33337-1-git-send-email-alejandro.lucero@netronome.com> Subject: [dpdk-dev] [PATCH v2 2/6] ethdev: add function for checking IOVAs by a device 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" A PMD should invoke this function for checking memsegs iovas are within the supported range by the device. Signed-off-by: Alejandro Lucero --- lib/librte_ether/rte_ethdev.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index eba11ca..e51a432 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -2799,6 +2799,19 @@ int rte_eth_dev_set_vlan_ether_type(uint16_t port_id, int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on); /** + * check device dma mask within expected range based on dma mask. + * + * @param maskbits + * mask length in bits + * + */ +static inline int +rte_eth_dev_check_dma_mask(uint8_t maskbits) +{ + return rte_eal_check_dma_mask(maskbits); +} + +/** * * Retrieve a burst of input packets from a receive queue of an Ethernet * device. The retrieved packets are stored in *rte_mbuf* structures whose