On 2/4/2016 1:24 AM, Olivier MATZ wrote: > 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.
Will update after i gathered more data. inline could show obvious performance difference in some cases. > > 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 >