From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id D50F51B3AE; Sat, 7 Jul 2018 19:31:02 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id B746414005C; Sat, 7 Jul 2018 17:31:01 +0000 (UTC) Received: from [192.168.1.16] (85.187.13.33) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Sat, 7 Jul 2018 18:30:56 +0100 To: Alejandro Lucero , CC: , , , References: <1530708838-2682-1-git-send-email-alejandro.lucero@netronome.com> <1530708838-2682-3-git-send-email-alejandro.lucero@netronome.com> From: Andrew Rybchenko Message-ID: <33a265e4-d5db-5af7-54ed-41ba54ad5e5d@solarflare.com> Date: Sat, 7 Jul 2018 20:30:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1530708838-2682-3-git-send-email-alejandro.lucero@netronome.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.187.13.33] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23952.003 X-TM-AS-Result: No--12.974400-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1530984662-DpE74SqDZ8e5 Subject: Re: [dpdk-dev] [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: Sat, 07 Jul 2018 17:31:03 -0000 On 04.07.2018 15: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 > --- > 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); I'm afraid I don't understand why do we need the wrapper. May PMD use EAL function directly? > +} > + > +/** > * > * 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;