* [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap
@ 2019-01-14 10:00 Yongseok Koh
2019-01-14 10:00 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix missing prefetch in macswap mode Yongseok Koh
2019-01-14 13:39 ` [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap Iremonger, Bernard
0 siblings, 2 replies; 5+ messages in thread
From: Yongseok Koh @ 2019-01-14 10:00 UTC (permalink / raw)
To: wenzhuo.lu, jingjing.wu, bernard.iremonger; +Cc: dev, qi.z.zhang, stable
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 <yskoh@mellanox.com>
---
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/2] app/testpmd: fix missing prefetch in macswap mode
2019-01-14 10:00 [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap Yongseok Koh
@ 2019-01-14 10:00 ` Yongseok Koh
2019-01-14 13:40 ` Iremonger, Bernard
2019-01-14 13:39 ` [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap Iremonger, Bernard
1 sibling, 1 reply; 5+ messages in thread
From: Yongseok Koh @ 2019-01-14 10:00 UTC (permalink / raw)
To: wenzhuo.lu, jingjing.wu, bernard.iremonger; +Cc: dev, qi.z.zhang, stable
Prefetching packet was missing when do_macswap() was optimized.
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 <yskoh@mellanox.com>
---
app/test-pmd/macswap_sse.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/app/test-pmd/macswap_sse.h b/app/test-pmd/macswap_sse.h
index 662fe79cf9..2b6e7324da 100644
--- a/app/test-pmd/macswap_sse.h
+++ b/app/test-pmd/macswap_sse.h
@@ -35,6 +35,13 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
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]);
--
2.11.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] app/testpmd: fix missing prefetch in macswap mode
2019-01-14 10:00 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix missing prefetch in macswap mode Yongseok Koh
@ 2019-01-14 13:40 ` Iremonger, Bernard
0 siblings, 0 replies; 5+ messages in thread
From: Iremonger, Bernard @ 2019-01-14 13:40 UTC (permalink / raw)
To: Yongseok Koh, Lu, Wenzhuo, Wu, Jingjing; +Cc: dev, Zhang, Qi Z, stable
> -----Original Message-----
> From: Yongseok Koh [mailto:yskoh@mellanox.com]
> Sent: Monday, January 14, 2019 10:00 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH 2/2] app/testpmd: fix missing prefetch in macswap mode
>
> Prefetching packet was missing when do_macswap() was optimized.
>
> 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 <yskoh@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap
2019-01-14 10:00 [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap Yongseok Koh
2019-01-14 10:00 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix missing prefetch in macswap mode Yongseok Koh
@ 2019-01-14 13:39 ` Iremonger, Bernard
2019-01-14 14:35 ` Ferruh Yigit
1 sibling, 1 reply; 5+ messages in thread
From: Iremonger, Bernard @ 2019-01-14 13:39 UTC (permalink / raw)
To: Yongseok Koh, Lu, Wenzhuo, Wu, Jingjing; +Cc: dev, Zhang, Qi Z, stable
> -----Original Message-----
> From: Yongseok Koh [mailto:yskoh@mellanox.com]
> Sent: Monday, January 14, 2019 10:00 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH 1/2] app/testpmd: fix wrong 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")
> Cc: qi.z.zhang@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap
2019-01-14 13:39 ` [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap Iremonger, Bernard
@ 2019-01-14 14:35 ` Ferruh Yigit
0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2019-01-14 14:35 UTC (permalink / raw)
To: Iremonger, Bernard, Yongseok Koh, Lu, Wenzhuo, Wu, Jingjing
Cc: dev, Zhang, Qi Z, stable
On 1/14/2019 1:39 PM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: Yongseok Koh [mailto:yskoh@mellanox.com]
>> Sent: Monday, January 14, 2019 10:00 AM
>> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
>> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>
>> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org
>> Subject: [PATCH 1/2] app/testpmd: fix wrong 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")
>> Cc: qi.z.zhang@intel.com
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-14 14:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 10:00 [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap Yongseok Koh
2019-01-14 10:00 ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix missing prefetch in macswap mode Yongseok Koh
2019-01-14 13:40 ` Iremonger, Bernard
2019-01-14 13:39 ` [dpdk-dev] [PATCH 1/2] app/testpmd: fix wrong pointer reference in macswap Iremonger, Bernard
2019-01-14 14:35 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).