[PATCH v2 1/4] mbuf: record mbuf operations history
Thomas Monjalon
thomas at monjalon.net
Tue Sep 16 23:33:38 CEST 2025
16/09/2025 23:17, Stephen Hemminger:
> On Tue, 16 Sep 2025 18:12:04 +0300
> Shani Peretz <shperetz at nvidia.com> wrote:
>
> > @@ -607,6 +608,9 @@ static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct rte_mempool *mp)
> > if (rte_mempool_get(mp, &ret.ptr) < 0)
> > return NULL;
> > __rte_mbuf_raw_sanity_check(ret.m);
> > +#if RTE_MBUF_HISTORY_DEBUG
> > + rte_mbuf_history_mark(ret.m, RTE_MBUF_ALLOC);
> > +#endif
> > return ret.m;
> > }
>
> If you made rte_mbuf_history_mark a dummy function if RTE_MBUF_HISTORY_DEBUG
> was not defined, then you could remove most of the #ifdef clutter and
> would get type checking on normal builds.
Yes good idea!
We need to check whether an empty inline function will be completely
optimized out by the compilers (clang and GCC).
More information about the dev
mailing list