mbuf: create pool with external memory buffers
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Mon, 20 Jan 2020 19:16:24 +0000 (19:16 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 20 Jan 2020 22:36:38 +0000 (23:36 +0100)
commit6c8e50c2e5491b9aded917d27eaba6fd9e3fbd6b
treef19a40897fca7c76d5eb65f496a3808080bedbcc
parent6ef1107ad4c6d4fcb6be627367ee0b97bb13e822
mbuf: create pool with external memory buffers

The dedicated routine rte_pktmbuf_pool_create_extbuf() is
provided to create mbuf pool with data buffers located in
the pinned external memory. The application provides the
external memory description and routine initializes each
mbuf with appropriate virtual and physical buffer address.
It is entirely application responsibility to register
external memory with rte_extmem_register() API, map this
memory, etc.

The new introduced flag RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF
is set in private pool structure, specifying the new special
pool type. The allocated mbufs from pool of this kind will
have the EXT_ATTACHED_MBUF flag set and initialiazed shared
info structure, allowing cloning with regular mbufs (without
attached external buffers of any kind).

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf.c
lib/librte_mbuf/rte_mbuf.h
lib/librte_mbuf/rte_mbuf_version.map