2016-02-28 20:44, Huawei Xie: > v7 changes: > rte_pktmbuf_alloc_bulk isn't exported as API, so shouldn't be listed in > version map > > v6 changes: > reflect the changes in release notes and library version map file > revise our duff's code style a bit to make it more readable > > v5 changes: > add comment about duff's device and our variant implementation > > v3 changes: > move while after case 0 > add context about duff's device and why we use while loop in the commit > message > > v2 changes: > unroll the loop a bit to help the performance > > rte_pktmbuf_alloc_bulk allocates a bulk of packet mbufs. > > There is related thread about this bulk API. > http://dpdk.org/dev/patchwork/patch/4718/ > Thanks to Konstantin's loop unrolling. > > Attached the wiki page about duff's device. It explains the performance > optimization through loop unwinding, and also the most dramatic use of > case label fall-through. > https://en.wikipedia.org/wiki/Duff%27s_device > > In this implementation, while() loop is used because we could not assume > count is strictly positive. Using while() loop saves one line of check. > > Signed-off-by: Gerald Rogers <gerald.rogers at intel.com> > Signed-off-by: Huawei Xie <huawei.xie at intel.com> > Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com> > Acked-by: Olivier Matz <olivier.matz at 6wind.com>
Applied, thanks