From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A896FA0A02 for ; Mon, 17 May 2021 18:13:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A304240041; Mon, 17 May 2021 18:13:18 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 1504240041 for ; Mon, 17 May 2021 18:13:18 +0200 (CEST) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lifrp-0007vM-OX; Mon, 17 May 2021 16:13:17 +0000 From: Christian Ehrhardt To: Feifei Wang Cc: Ruifeng Wang , Kathleen Capella , dpdk stable Date: Mon, 17 May 2021 18:08:16 +0200 Message-Id: <20210517161039.3132619-67-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> References: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: fix parsing packet type for NEON' has been queued to stable release 19.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/19/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/c1d0fd909494e440986cb804087e9346d6788538 Thanks. Christian Ehrhardt --- >From c1d0fd909494e440986cb804087e9346d6788538 Mon Sep 17 00:00:00 2001 From: Feifei Wang Date: Wed, 10 Mar 2021 10:40:29 +0800 Subject: [PATCH] net/i40e: fix parsing packet type for NEON [ upstream commit 31d7c6f7d424c533b0a4dd9b4408b814ac7852f1 ] In i40e NEON vector Rx path, the packet descs processing is incorrect. This caused wrong packet type been filled in mbuf. To fix this, when shifting the pktlen field to be 16-bit aligned, it only needs to process the high 16bit of the packet descs instead of the high 32bit. Test Results: Architecture: arm64 NIC: XL710 Driver: i40e Package: Ether()/IP()/ Without this patch: desc_to_ptype_v: ptype = 7 (error) With this patch: desc_to_ptype_v: ptype = 23 (correct) Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM") Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang Tested-by: Kathleen Capella --- drivers/net/i40e/i40e_rxtx_vec_neon.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c index 5cac418cf0..695c5e362e 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c @@ -309,10 +309,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts, /* pkt 3,4 shift the pktlen field to be 16-bit aligned*/ uint32x4_t len3 = vshlq_u32(vreinterpretq_u32_u64(descs[3]), len_shl); - descs[3] = vreinterpretq_u64_u32(len3); + descs[3] = vreinterpretq_u64_u16(vsetq_lane_u16 + (vgetq_lane_u16(vreinterpretq_u16_u32(len3), 7), + vreinterpretq_u16_u64(descs[3]), + 7)); uint32x4_t len2 = vshlq_u32(vreinterpretq_u32_u64(descs[2]), len_shl); - descs[2] = vreinterpretq_u64_u32(len2); + descs[2] = vreinterpretq_u64_u16(vsetq_lane_u16 + (vgetq_lane_u16(vreinterpretq_u16_u32(len2), 7), + vreinterpretq_u16_u64(descs[2]), + 7)); /* D.1 pkt 3,4 convert format from desc to pktmbuf */ pkt_mb4 = vqtbl1q_u8(vreinterpretq_u8_u64(descs[3]), shuf_msk); @@ -340,10 +346,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts, /* pkt 1,2 shift the pktlen field to be 16-bit aligned*/ uint32x4_t len1 = vshlq_u32(vreinterpretq_u32_u64(descs[1]), len_shl); - descs[1] = vreinterpretq_u64_u32(len1); + descs[1] = vreinterpretq_u64_u16(vsetq_lane_u16 + (vgetq_lane_u16(vreinterpretq_u16_u32(len1), 7), + vreinterpretq_u16_u64(descs[1]), + 7)); uint32x4_t len0 = vshlq_u32(vreinterpretq_u32_u64(descs[0]), len_shl); - descs[0] = vreinterpretq_u64_u32(len0); + descs[0] = vreinterpretq_u64_u16(vsetq_lane_u16 + (vgetq_lane_u16(vreinterpretq_u16_u32(len0), 7), + vreinterpretq_u16_u64(descs[0]), + 7)); /* D.1 pkt 1,2 convert format from desc to pktmbuf */ pkt_mb2 = vqtbl1q_u8(vreinterpretq_u8_u64(descs[1]), shuf_msk); -- 2.31.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-17 17:40:32.166861334 +0200 +++ 0067-net-i40e-fix-parsing-packet-type-for-NEON.patch 2021-05-17 17:40:29.231809948 +0200 @@ -1 +1 @@ -From 31d7c6f7d424c533b0a4dd9b4408b814ac7852f1 Mon Sep 17 00:00:00 2001 +From c1d0fd909494e440986cb804087e9346d6788538 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 31d7c6f7d424c533b0a4dd9b4408b814ac7852f1 ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org @@ -36 +37 @@ -index da16dfc386..1f5539bda8 100644 +index 5cac418cf0..695c5e362e 100644 @@ -39 +40 @@ -@@ -310,10 +310,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq, +@@ -309,10 +309,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts, @@ -58 +59 @@ -@@ -341,10 +347,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq, +@@ -340,10 +346,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,