[dpdk-dev] [PATCH 1/4] mbuf: detach mbuf with pinned external buffer
Stephen Hemminger
stephen at networkplumber.org
Fri Jan 10 19:23:59 CET 2020
On Fri, 10 Jan 2020 17:56:59 +0000
Viacheslav Ovsiienko <viacheslavo at mellanox.com> wrote:
> +
> +static inline uint64_t
> +rte_mbuf_has_pinned_extbuf(const struct rte_mbuf *m)
> +{
> + if (RTE_MBUF_HAS_EXTBUF(m)) {
> + /*
> + * The mbuf has the external attached buffer,
> + * we should check the type of the memory pool where
> + * the mbuf was allocated from.
> + */
> + struct rte_pktmbuf_pool_private *priv =
> + (struct rte_pktmbuf_pool_private *)
> + rte_mempool_get_priv(m->pool);
> +
> + return priv->flags & RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF;
> + }
> + return 0;
> +}
New functions need to be marked experimental.
The return value should be boolean not uint64_t
Why does this need to be inlined (and thereby create new ABI burden)?
Also having it inline makes making pktmbuf_pool_private really private in future.
More information about the dev
mailing list