From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH] ivshmem: add all memzones of mempool to metada Date: Thu, 2 Jun 2016 09:04:06 +0200 Message-ID: <574FDA66.90909@6wind.com> References: <1464787086-29555-1-git-send-email-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Anatoly Burakov To: Ferruh Yigit , dev@dpdk.org Return-path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id B75C83777 for ; Thu, 2 Jun 2016 09:04:07 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id z87so57011276wmh.0 for ; Thu, 02 Jun 2016 00:04:07 -0700 (PDT) In-Reply-To: <1464787086-29555-1-git-send-email-ferruh.yigit@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > +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. Apart from that: Acked-by: Olivier Matz Thanks