Prefetching packet was missing when do_macswap() was optimized.
Fixes:
62b52877adbe ("app/testpmd: batch MAC swap for performance on x86")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
r = nb;
while (r >= 4) {
+ if (r >= 8) {
+ rte_prefetch0(rte_pktmbuf_mtod(pkts[i + 4], void *));
+ rte_prefetch0(rte_pktmbuf_mtod(pkts[i + 5], void *));
+ rte_prefetch0(rte_pktmbuf_mtod(pkts[i + 6], void *));
+ rte_prefetch0(rte_pktmbuf_mtod(pkts[i + 7], void *));
+ }
+
mb[0] = pkts[i++];
eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct ether_hdr *);
addr0 = _mm_loadu_si128((__m128i *)eth_hdr[0]);