From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 56F001B434; Tue, 10 Jul 2018 10:57:44 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3BD0814F0B6; Tue, 10 Jul 2018 08:57:43 +0000 (UTC) Received: from [10.36.117.44] (ovpn-117-44.ams2.redhat.com [10.36.117.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE5D9111C4AA; Tue, 10 Jul 2018 08:57:40 +0000 (UTC) From: "Eelco Chaudron" To: "Alejandro Lucero" Cc: dev@dpdk.org, stable@dpdk.org, anatoly.burakov@intel.com, maxime.coquelin@redhat.com, ferruh.yigit@intel.com, "Andrew Rybchenko" Date: Tue, 10 Jul 2018 10:57:39 +0200 Message-ID: <5BCBEF5B-AA29-4F18-A95B-D5C5478B0432@redhat.com> In-Reply-To: <1530708838-2682-3-git-send-email-alejandro.lucero@netronome.com> References: <1530708838-2682-1-git-send-email-alejandro.lucero@netronome.com> <1530708838-2682-3-git-send-email-alejandro.lucero@netronome.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 10 Jul 2018 08:57:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 10 Jul 2018 08:57:44 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'echaudro@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v3 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: , X-List-Received-Date: Tue, 10 Jul 2018 08:57:44 -0000 On 4 Jul 2018, at 14:53, Alejandro Lucero wrote: > A PMD should invoke this function for checking memsegs iovas are > within > the supported range by the device. > > Signed-off-by: Alejandro Lucero Agree with Andrew here, why not call rte_eal_check_dma_mask() directly in nfp_net_txq_full()? > --- > lib/librte_ether/rte_ethdev.h | 13 +++++++++++++ > lib/librte_ether/rte_ethdev_version.map | 1 + > 2 files changed, 14 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 > diff --git a/lib/librte_ether/rte_ethdev_version.map > b/lib/librte_ether/rte_ethdev_version.map > index e9681ac..0b11b8a 100644 > --- a/lib/librte_ether/rte_ethdev_version.map > +++ b/lib/librte_ether/rte_ethdev_version.map > @@ -191,6 +191,7 @@ DPDK_17.08 { > DPDK_17.11 { > global: > > + rte_eth_dev_check_dma_mask; > rte_eth_dev_get_sec_ctx; > rte_eth_dev_pool_ops_supported; > rte_eth_dev_reset; > -- > 1.9.1