From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1A0642C51 for ; Fri, 3 Jun 2016 13:05:19 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 03 Jun 2016 04:05:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,411,1459839600"; d="scan'208";a="968149234" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.221.9]) ([10.237.221.9]) by orsmga001.jf.intel.com with ESMTP; 03 Jun 2016 04:05:18 -0700 To: Olivier MATZ , dev@dpdk.org References: <1464787086-29555-1-git-send-email-ferruh.yigit@intel.com> <574FDA66.90909@6wind.com> Cc: Anatoly Burakov From: Ferruh Yigit Message-ID: <5751646D.2080009@intel.com> Date: Fri, 3 Jun 2016 12:05:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <574FDA66.90909@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] ivshmem: add all memzones of mempool to metada 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: Fri, 03 Jun 2016 11:05:20 -0000 On 6/2/2016 8:04 AM, Olivier MATZ wrote: > Hi Ferruh, > > Thank you for fixing this issue. > > On 06/01/2016 03:18 PM, Ferruh Yigit wrote: >> [PATCH] ivshmem: add all memzones of mempool to metada > > Minor comment: it seems the title is truncated > Right, I will fix in next version of patch. >> +static int >> +add_mempool_to_metadata(const struct rte_mempool *mp, >> + struct ivshmem_config *config) >> +{ >> + struct rte_mempool_memhdr *memhdr; >> + int ret; >> + >> + ret = add_mempool_memzone_to_metadata(mp, config); >> if (ret < 0) >> return -1; >> >> + STAILQ_FOREACH(memhdr, &mp->mem_list, next) { >> + ret = add_mempool_memzone_to_metadata(memhdr->addr, config); >> + if (ret < 0) >> + return -1; >> + } >> + >> + /* mempool consists of memzone and ring */ >> return add_ring_to_metadata(mp->ring, config); >> } >> > > In case you missed it: there is a function > rte_mempool_mem_iter() that can be used to browse the > memory chunks of a mempool. It's probably less convenient > to use compared to directly browsing the list, but it > may be more resistant to api changes. I wasn't aware rte_mempool_mem_iter(), I will update the patch to use this. > > Apart from that: > Acked-by: Olivier Matz > > Thanks > Thanks, ferruh