[dpdk-dev] What's the point of RTE_MBUF_PREFETCH_TO_FREE()?
Bruce Richardson
bruce.richardson at intel.com
Mon Nov 6 10:25:41 CET 2017
On Fri, Nov 03, 2017 at 01:28:18PM -0700, Mike Stolarchuk wrote:
> It seems to be used to prefetch the mbuf in preparation for a free of an
> mbuf.
>
> But RTE_MBUF_PREFETCH_TO_FREE() currently does a prefetch for the
> ffirst cache line in the mbuf, but doesn't a free do a put to the mbuf's
> mempool?
>
> And isn't the mempool reference in the mbuf's second cache line?
>
Yes, that looks like a bug. Doing "git blame" shows that that macro
comes from the original versions of DPDK pre-dpdk.org, and hasn't been
modified since, so it was missed when the mbuf was expanded from 1 line
to 2. I also note that the high-performance ixgbe/i40e vector drivers do
not use this macro, only the slow paths in those drivers do, so I wonder
if it can be removed. If not, it should be fixed.
/Bruce
More information about the dev
mailing list