From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CAEEA0471 for ; Tue, 16 Jul 2019 10:46:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4DDC53195; Tue, 16 Jul 2019 10:46:59 +0200 (CEST) Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 9DB062BF5 for ; Tue, 16 Jul 2019 10:46:58 +0200 (CEST) Received: from lfbn-lil-1-176-160.w90-45.abo.wanadoo.fr ([90.45.26.160] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hnJ9v-0001vM-9L; Tue, 16 Jul 2019 10:50:04 +0200 Received: by droids-corp.org (sSMTP sendmail emulation); Tue, 16 Jul 2019 10:46:49 +0200 Date: Tue, 16 Jul 2019 10:46:49 +0200 From: Olivier Matz To: "Burakov, Anatoly" Cc: Jerin Jacob Kollanukkaran , Ferruh Yigit , Vamsi Krishna Attunuru , "dev@dpdk.org" , "arybchenko@solarflare.com" Message-ID: <20190716084649.snqtibua7i4zvsum@platinum> References: <0ef0c75d-bff6-ac20-61e1-a4a2472fc7f7@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v6 0/4] add IOVA = VA support in KNI 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, On Mon, Jul 15, 2019 at 10:38:53AM +0100, Burakov, Anatoly wrote: > On 15-Jul-19 5:54 AM, Jerin Jacob Kollanukkaran wrote: > > > > > > > > (also, i don't really like the name NO_PAGE_BOUND since in > > > > > > > > memzone API there's a "bounded memzone" allocation API, and this > > > > > > > > flag's name reads like objects would not be bounded by page size, > > > > > > > > not that they won't cross page > > > > > > > > boundary) > > > > > > > > > > > > > > No strong opinion for the name. What name you suggest? > > > > > > > > > > > > How about something like MEMPOOL_F_NO_PAGE_SPLIT? > > > > > > > > > > Looks good to me. > > > > > > > > > > In summary, Change wrt existing patch" > > > > > - Change NO_PAGE_BOUND to MEMPOOL_F_NO_PAGE_SPLIT > > > > > - Set this flag in rte_pktmbuf_pool_create () when > > > > rte_eal_has_hugepages() || > > > > > rte_malloc_heap_socket_is_external(socket_id)) > > > > > > > > If we are to have a special KNI allocation API, would we even need that? > > > > > > Not need this change in rte_pktmbuf_pool_create () if we introduce a new > > > rte_kni_pktmbuf_pool_create () API. > > > > Ferruh, Olivier, Anatoly, > > > > Any objection to create new rte_kni_pktmbuf_pool_create () API > > to embedded MEMPOOL_F_NO_PAGE_SPLIT flag requirement for KNI + IOVA as VA > > > > > > As long as we all are aware of what that means and agree with that > consequence (namely, separate codepaths for KNI and other PMD's) then i have > no specific objections. Sorry for the late feedback. I think we can change the default behavior of mempool populate(), to prevent objects from being accross 2 pages, except if the size of the object is bigger than the size of the page. This is already what is done in rte_mempool_op_calc_mem_size_default() when we want to estimate the amount of memory needed to allocate N objects. This would avoid the introduction of a specific API to allocate packets for kni, and a specific mempool flag. About the problem of 9K mbuf mentionned by Anatoly, could we imagine a check in kni code, that just returns an error "does not work with size(mbuf) > size(page)" ? Thanks, Olivier