From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id EA7FA2BE6 for ; Tue, 12 Apr 2016 00:49:48 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 11 Apr 2016 15:49:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,470,1455004800"; d="scan'208";a="782790036" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.191]) by orsmga003.jf.intel.com with ESMTP; 11 Apr 2016 15:49:47 -0700 Date: Tue, 12 Apr 2016 06:52:21 +0800 From: Yuanhan Liu To: David Hunt Cc: dev@dpdk.org Message-ID: <20160411225221.GJ3080@yliu-dev.sh.intel.com> References: <1455634095-4183-1-git-send-email-david.hunt@intel.com> <1457517037-71693-1-git-send-email-david.hunt@intel.com> <1457517037-71693-2-git-send-email-david.hunt@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457517037-71693-2-git-send-email-david.hunt@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 1/4] mempool: add external mempool manager support 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: Mon, 11 Apr 2016 22:49:49 -0000 Hi David, On Wed, Mar 09, 2016 at 09:50:34AM +0000, David Hunt wrote: > -static struct rte_tailq_elem rte_mempool_tailq = { > +struct rte_tailq_elem rte_mempool_tailq = { Why removing static? I didn't see it's referenced somewhere else. > + if (flags && MEMPOOL_F_INT_HANDLER) { I would assume it's "flags & MEMPOOL_F_INT_HANDLER". BTW, you might want to do a thorough check, as I found few more typos like this. --yliu > + if (flags && MEMPOOL_F_INT_HANDLER) { > + > + if (rte_eal_has_hugepages()) { > + startaddr = (void *)mz->addr; > + } else { > + /* align memory pool start address on a page boundary */ > + unsigned long addr = (unsigned long)mz->addr; > + > + if (addr & (page_size - 1)) { > + addr += page_size; > + addr &= ~(page_size - 1); > + } > + startaddr = (void *)addr; > } > - startaddr = (void*)addr; > + } else { > + startaddr = (void *)mz->addr; > }