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