[PATCH v5 1/7] mbuf: add API to get and set mbuf physical address
Stephen Hemminger
stephen at networkplumber.org
Fri Oct 7 23:20:44 CEST 2022
On Sat, 8 Oct 2022 02:32:05 +0530
Shijith Thotton <sthotton at marvell.com> wrote:
>
> +/**
> + * Get the IOVA address of the mbuf data buffer.
> + *
> + * @param m
> + * The pointer to the mbuf.
> + * @return
> + * The IOVA address of the mbuf.
> + */
> +static inline rte_iova_t
> +rte_mbuf_iova_get(const struct rte_mbuf *m)
> +{
> + return m->buf_iova;
> +}
> +
> +/**
> + * Set the IOVA address of the mbuf data buffer
> + *
> + * @param m
> + * The pointer to the mbuf.
> + * @param iova
> + * Value to set as IOVA address of the mbuf.
> + */
> +static inline void
> +rte_mbuf_iova_set(struct rte_mbuf *m, rte_iova_t iova)
> +{
> + m->buf_iova = iova;
> +}
If this was macro, it could be used on either side of expression.
More information about the dev
mailing list