numam-dpdk/lib/librte_mbuf
Yongseok Koh a53aa2b9f3 mbuf: support attaching external buffer
This patch introduces a new way of attaching an external buffer to a mbuf.

Attaching an external buffer is quite similar to mbuf indirection in
replacing buffer addresses and length of a mbuf, but a few differences:
  - When an indirect mbuf is attached, refcnt of the direct mbuf would be
    2 as long as the direct mbuf itself isn't freed after the attachment.
    In such cases, the buffer area of a direct mbuf must be read-only. But
    external buffer has its own refcnt and it starts from 1. Unless
    multiple mbufs are attached to a mbuf having an external buffer, the
    external buffer is writable.
  - There's no need to allocate buffer from a mempool. Any buffer can be
    attached with appropriate free callback.
  - Smaller metadata is required to maintain shared data such as refcnt.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-04-27 20:11:25 +02:00
..
Makefile mbuf: remove control mbuf 2018-04-11 23:40:40 +02:00
meson.build build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
rte_mbuf_pool_ops.c mbuf: fix truncated strncpy 2018-04-04 17:34:20 +02:00
rte_mbuf_pool_ops.h add experimental tag to appropriate functions 2018-01-29 23:35:29 +01:00
rte_mbuf_ptype.c ethdev: introduce tunnel type MPLS-in-GRE and MPLS-in-UDP 2018-04-27 18:00:55 +01:00
rte_mbuf_ptype.h ethdev: introduce tunnel type MPLS-in-GRE and MPLS-in-UDP 2018-04-27 18:00:55 +01:00
rte_mbuf_version.map mbuf: remove control mbuf 2018-04-11 23:40:40 +02:00
rte_mbuf.c ethdev: introduce new tunnel VXLAN-GPE 2018-04-27 18:00:55 +01:00
rte_mbuf.h mbuf: support attaching external buffer 2018-04-27 20:11:25 +02:00