From: Yongseok Koh Date: Mon, 14 Jan 2019 10:00:21 +0000 (-0800) Subject: app/testpmd: fix pointer reference in macswap X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=cc28a6907b228d55f02bfbf0a40498db0a22ea62;p=dpdk.git app/testpmd: fix pointer reference in macswap The pointer is misused and could set wrong MAC address. As a result, some of packets can be dropped in receiver side due to MAC address mismatch. This can be shown as performance degradation. Bugzilla ID: 188 Fixes: 62b52877adbe ("app/testpmd: batch MAC swap for performance on x86") Signed-off-by: Yongseok Koh Acked-by: Bernard Iremonger --- diff --git a/app/test-pmd/macswap_sse.h b/app/test-pmd/macswap_sse.h index 7d268bfbb0..662fe79cf9 100644 --- a/app/test-pmd/macswap_sse.h +++ b/app/test-pmd/macswap_sse.h @@ -76,7 +76,7 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb, eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct ether_hdr *); /* Swap dest and src mac addresses. */ - addr0 = _mm_loadu_si128((__m128i *)eth_hdr); + addr0 = _mm_loadu_si128((__m128i *)eth_hdr[0]); addr0 = _mm_shuffle_epi8(addr0, shfl_msk); _mm_storeu_si128((__m128i *)eth_hdr[0], addr0);