From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id E5C101B192 for ; Mon, 14 Jan 2019 11:00:43 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 14 Jan 2019 12:00:39 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x0EA0bru016885; Mon, 14 Jan 2019 12:00:37 +0200 From: Yongseok Koh To: wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com Cc: dev@dpdk.org, qi.z.zhang@intel.com, stable@dpdk.org Date: Mon, 14 Jan 2019 02:00:21 -0800 Message-Id: <20190114100022.14867-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 10:00:44 -0000 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") Cc: qi.z.zhang@intel.com Cc: stable@dpdk.org Signed-off-by: Yongseok Koh --- app/test-pmd/macswap_sse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.11.0