mbuf: reduce pktmbuf init cycles
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Tue, 27 Jun 2017 11:57:51 +0000 (17:27 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Sat, 1 Jul 2017 10:14:58 +0000 (12:14 +0200)
commitcb327a78021c5f3574a14dac4844d7b1b640d4f1
treecc4f5b1b588e18037d490b72a06d5bb36569c5fd
parentcabe6ebb4d05f51934338b482a8890e3101d88a8
mbuf: reduce pktmbuf init cycles

There is no need for initializing the complete
packet buffer with zero as the packet data area will be
overwritten by the NIC Rx HW anyway.

The testpmd configures the packet mempool
with around 180k buffers with
2176B size. In existing scheme, the init routine
needs to memset around ~370MB vs the proposed scheme
requires only around ~22MB on 128B cache aligned system.

Useful in running DPDK in HW simulators/emulators,
where millions of cycles have an impact on boot time.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf.c