From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v6 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API Date: Wed, 03 Feb 2016 18:23:57 +0100 Message-ID: <56B237AD.1040209@6wind.com> References: <1450049754-33635-1-git-send-email-huawei.xie@intel.com> <1453827815-56384-1-git-send-email-huawei.xie@intel.com> <1453827815-56384-2-git-send-email-huawei.xie@intel.com> <56A8CCA3.7060302@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dprovan@bivio.net To: Panu Matilainen , Huawei Xie , dev@dpdk.org Return-path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 90FF3DE3 for ; Wed, 3 Feb 2016 18:24:11 +0100 (CET) In-Reply-To: <56A8CCA3.7060302@redhat.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, On 01/27/2016 02:56 PM, Panu Matilainen wrote: > > Since rte_pktmbuf_alloc_bulk() is an inline function, it is not part of > the library ABI and should not be listed in the version map. > > I assume its inline for performance reasons, but then you lose the > benefits of dynamic linking such as ability to fix bugs and/or improve > itby just updating the library. Since the point of having a bulk API is > to improve performance by reducing the number of calls required, does it > really have to be inline? As in, have you actually measured the > difference between inline and non-inline and decided its worth all the > downsides? Agree with Panu. It would be interesting to compare the performance between inline and non inline to decide whether inlining it or not. Also, it would be nice to have a simple test function in app/test/test_mbuf.c. For instance, you could update test_one_pktmbuf() to take a mbuf pointer as a parameter and remove the mbuf allocation from the function. Then it could be called with a mbuf allocated with rte_pktmbuf_alloc() (like before) and with all the mbufs of rte_pktmbuf_alloc_bulk(). Regards, Olivier