From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH] mempool: Introduce _populate_mz_range api Date: Fri, 20 Jan 2017 20:08:06 +0530 Message-ID: <20170120143805.GA5741@localhost.localdomain> References: <1484922017-26030-1-git-send-email-santosh.shukla@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , , To: Return-path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0073.outbound.protection.outlook.com [104.47.34.73]) by dpdk.org (Postfix) with ESMTP id D5C383777 for ; Fri, 20 Jan 2017 15:38:28 +0100 (CET) Content-Disposition: inline In-Reply-To: <1484922017-26030-1-git-send-email-santosh.shukla@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jan 20, 2017 at 07:50:17PM +0530, santosh.shukla@caviumnetworks.com wrote: > From: Santosh Shukla > > +/* > + * wrapper to populate mz's pa/va addr range and len info to external > + * mempool. HW mempool implementation to cache-in this inforamation > + * in their local data structure. > + * Note: api always get called before ops_alloc(). > + * */ > +void > +rte_mempool_ops_populate_mz_range(struct rte_mempool *mp, > + const struct rte_memzone *mz) > +{ > + struct rte_mempool_ops *ops; > + > + ops = rte_mempool_get_ops(mp->ops_index); > + return ops->populate_mz_range(mp, mz); Check for the NULL before calling the function pointer.