numam-dpdk/lib/librte_mbuf
Olivier Matz 1d493a4949 mbuf: fix data room size calculation in pool init
Deduct the mbuf data room size from mempool->elt_size and priv_size,
instead of using an hardcoded value that is not related to the real
buffer size.

To use rte_pktmbuf_pool_init(), the user can either:
- give a NULL parameter to rte_pktmbuf_pool_init(): in this case, the
  private size is assumed to be 0, and the room size is
  mp->elt_size - sizeof(struct rte_mbuf).
- give the rte_pktmbuf_pool_private filled with appropriate
  data_room_size and priv_size values.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-04-27 22:39:20 +02:00
..
Makefile mk: add library version extension 2015-02-03 16:56:58 +01:00
rte_mbuf_version.map lib: provide initial versioning 2015-02-03 16:56:58 +01:00
rte_mbuf.c mbuf: fix data room size calculation in pool init 2015-04-27 22:39:20 +02:00
rte_mbuf.h mbuf: fix data room size calculation in pool init 2015-04-27 22:39:20 +02:00