mbuf: clarify usage of packet pool initializers
authorOlivier Matz <olivier.matz@6wind.com>
Tue, 27 Apr 2021 13:56:46 +0000 (15:56 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 4 May 2021 20:41:32 +0000 (22:41 +0200)
commitbd6113858f7a49165cd4e7dc787836330097bf8f
treebe75ec31bf3f00b9faf5ca7722bb8d34a5104f12
parente1064f80b61157250250353718ff196d2f050041
mbuf: clarify usage of packet pool initializers

Clarify that the mempool private initializer and object initializer used
for packet pools require that the mempool private size is large enough.

Also add an assert (only enabled when -DRTE_ENABLE_ASSERT is passed) to
check this constraint.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Aaron Conole <aconole@redhat.com>
lib/mbuf/rte_mbuf.c
lib/mbuf/rte_mbuf.h