[dpdk-dev] [PATCH v8 1/2] mbuf: support attaching external buffer to mbuf

Thomas Monjalon thomas at monjalon.net
Fri Apr 27 20:09:26 CEST 2018


27/04/2018 19:22, Yongseok Koh:
> 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 at mellanox.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
> Acked-by: Olivier Matz <olivier.matz at 6wind.com>
> Acked-by: Andrew Rybchenko <arybchenko at solarflare.com>

Series applied, thanks





More information about the dev mailing list