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 DCFC5A0543 for ; Tue, 21 Jun 2022 10:06:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7EA440151; Tue, 21 Jun 2022 10:06:53 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2063.outbound.protection.outlook.com [40.107.236.63]) by mails.dpdk.org (Postfix) with ESMTP id A7AC640151 for ; Tue, 21 Jun 2022 10:06:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xaju0s4rpkrDnRJRi4R4kxFX5rxLKH9aLNhPtsM/OBBKCCsKrby9mp4FKnW/jxVz07BPJe8GyjNPhDTCpg/7aR3whIwfU2muxtQTXjAvzBqoXt2RWdhe/tf5OOfTMfgMoXOwiFZJI4g6/hsmp8/WZEl10121tn1XJ2Ui2XRBJplSKDQtsQ/JxS9K4JHbbnk1RhJ4ByfPEhj//B2rtI2V93bt06PSVSHnl0b77fpJj1UnBKzHZx0gKHWd3JnsnfKsiTVxfLsa6B8D4OKO0dx6h7YYFMNevM6HkxuAgeqPYMYDKWkC5gZA8IXMflkC4Ytx0cq40IyNC1oXnVaX39ApTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vdbfKA8t3vvjIQk51oj2YMd1AJc/VmUkpS+J7JAHwRg=; b=KDJY8Fm8lh/AvHviYPqyyni9RrJTZhHcl1RHF1AXAm37pu8AY0peQTQGLJ65+eQpatljkQMUly0FmqVYsu54x2apstXGSIaZWX1bdYx9jEVV7bMpmUaFK+r+FyoBUIRyczKD/SmBLzOlyCMEb5f25uuqFxx5fWULd6z3n5i0rBmVj1uClXMVrh6E3XjLBafLgTFccyZ6OUqd4xT+BSgJD29rRcfxfRGPz8oUkEE8yIPfBqVUPrCd2Osf22ZZBd/tHsyMyIduT5SSwEGpSORQnMTuxEDr+yOVTCJEbhONgxG/5smqNy5CukdCu78bW05LZ2aFqSGCzdHgHHK9W1hg2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vdbfKA8t3vvjIQk51oj2YMd1AJc/VmUkpS+J7JAHwRg=; b=F9C6YkvkfqhpM4fq24q9wjMVo0c8znp4xgUWYlHW1zapCyPCKauI8g79j80i0PcpVrKEMegsYvTR8ayeKU5wlAX+lraxfh0eaGe5ZTOUV3v4GNYQxHyzKH7glwqmYxed5NSlhcVPnTWD+Cd1Z3rsJzmyY6NwNz8Y+0pLHpNtSu4wqLNyBrfNdNEBpLS7GnvTIhx/6A9o+E9EEtHzhCBogQJJUUwky5tN0fSWws/fV0xs3DHA/8sRE03e2FggbujQdiQe8rlXFyVi/f9AOcANdkjRFAJtF5aT1nq4W7sJCEu5ti8y687aFgk6MelzYUh/XoMKba7c9/Fy7nnwIqXvIA== Received: from MWHPR04CA0068.namprd04.prod.outlook.com (2603:10b6:300:6c::30) by BYAPR12MB2712.namprd12.prod.outlook.com (2603:10b6:a03:65::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Tue, 21 Jun 2022 08:06:49 +0000 Received: from CO1NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:300:6c:cafe::78) by MWHPR04CA0068.outlook.office365.com (2603:10b6:300:6c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15 via Frontend Transport; Tue, 21 Jun 2022 08:06:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT009.mail.protection.outlook.com (10.13.175.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:06:49 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:06:48 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:06:46 -0700 From: Xueming Li To: Ruifeng Wang CC: Ajit Khaparde , dpdk stable Subject: patch 'net/bnxt: fix reordering in NEON Rx' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:48 +0300 Message-ID: <20220621080301.2315720-43-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e617813-f519-443c-0c18-08da535cfe37 X-MS-TrafficTypeDiagnostic: BYAPR12MB2712:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JGImz5ko/G+WRWiMlImFVIRTyy9T4cYii7aHaYp2KT1pgEU8eS/+bko2GO2SOtFj4fxmx1NfDE2S/gmUQ+q3vaucx4gXa9Rv8Eq5NEdpLtNfmf9wbo5NYIx1s4VkhFZetndnoubLKZHItL5vSW0ZFCxS2rD3Mq8/xQpCfbNMg8fl2nW+uAgTjcrVoDDImoaZbBnENj+sMnyKHTlexNMFAw6vuIJu83VA38wGzJv4T19VJnbVmVFogqCjlkr5SyqxGXIwqkhvaEhRFtYXvSB6wlWTP/CNkJLTGJH0SHF4SLe0r2vbj7Rwk9Vf0cnZnNq9uv/75ntRiq5+wHKa3msF4vNtwh3ZAM48LZdIgL2rBzis01DIyslp2lvsvoHGoBviSZI4ErHeS+a14HjLRtFPquLtpjVG28ZwdRwYdMTB47boZphI3zYG2O+5X/UPv9PYjGdozIa+9A7yV6KcA+IgHDIKWUvFty2qsfRguKcS08bWuDYnllkSkGLNwLwypquqnA7m7AjAbFGUesBtG0QVPKm3oRBAUuCzHwfHta8WJX3W3XnliGnNj8bJrFOxcHeSAGJD3EtdniShGLEfqM16ZYpodQ3V9eyQBNTY2VxQ4rx6yKE6gzuB+fm/32yyzqMb9ilQqUhevsrxFnismuh5keOXcQjOHhglmrNQgr+ThVXaWRivLlVFxNCvOnzbi3pFcFydN2xL0USz/se0QMbtYI0PicQqck3g7lX9Celu9bDmESKqKwimNvCXFBE+IFLQ9T5tgkLeDLlsD8q2jiWDRGhzq2GENeaaETNmsjMe119XHsvstOZEtsX4dQk5+nC7ZcOcZ9ITPSqaR4Zp+gEy7jxpY/Rf67qH6/BJXcl61vI= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(376002)(346002)(39860400002)(396003)(46966006)(36840700001)(40470700004)(53546011)(54906003)(6916009)(86362001)(2906002)(8676002)(4326008)(26005)(6286002)(7696005)(966005)(82740400003)(70586007)(70206006)(356005)(478600001)(5660300002)(47076005)(8936002)(186003)(316002)(2616005)(1076003)(41300700001)(426003)(16526019)(36860700001)(36756003)(40480700001)(83380400001)(40460700003)(336012)(55016003)(81166007)(82310400005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:06:49.2213 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e617813-f519-443c-0c18-08da535cfe37 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2712 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 Hi, FYI, your patch has been queued to stable release 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/22. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/1dc7ed3e26af939e3138183affef017962d613e4 Thanks. Xueming Li --- >From 1dc7ed3e26af939e3138183affef017962d613e4 Mon Sep 17 00:00:00 2001 From: Ruifeng Wang Date: Wed, 13 Apr 2022 18:31:56 +0800 Subject: [PATCH] net/bnxt: fix reordering in NEON Rx Cc: Xueming Li [ upstream commit e7f2effc9220dc5d71b0bb550bcc903badc7bac4 ] Rx descriptor contains a valid bit which indicates readiness of the rest of descriptor words. Hence, the word contains valid bit must be read prior to other words. In NEON vector path, two contiguous 8B descriptor are loaded to a single NEON register. Given vector load ensures no 16B atomicity, read of the word that includes valid bit could be reordered after read of other words. In this case, data could be invalid. Reloaded lower 64b after read barrier. This ensures what fetched is correct. Also fixed comments that not pertains to Arm platform architecture. Fixes: deae85145c64 ("net/bnxt: handle multiple packets per loop in vector Rx") Signed-off-by: Ruifeng Wang Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c index 3cb94926fe..858e91bb9d 100644 --- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c +++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c @@ -225,25 +225,38 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) } /* - * Load the four current descriptors into SSE registers in - * reverse order to ensure consistent state. + * Load the four current descriptors into NEON registers. + * IO barriers are used to ensure consistent state. */ rxcmp1[3] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 7]); rte_io_rmb(); + /* Reload lower 64b of descriptors to make it ordered after info3_v. */ + rxcmp1[3] = vreinterpretq_u32_u64(vld1q_lane_u64 + ((void *)&cpr->cp_desc_ring[cons + 7], + vreinterpretq_u64_u32(rxcmp1[3]), 0)); rxcmp[3] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 6]); rxcmp1[2] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 5]); rte_io_rmb(); + rxcmp1[2] = vreinterpretq_u32_u64(vld1q_lane_u64 + ((void *)&cpr->cp_desc_ring[cons + 5], + vreinterpretq_u64_u32(rxcmp1[2]), 0)); rxcmp[2] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 4]); t1 = vreinterpretq_u64_u32(vzip2q_u32(rxcmp1[2], rxcmp1[3])); rxcmp1[1] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 3]); rte_io_rmb(); + rxcmp1[1] = vreinterpretq_u32_u64(vld1q_lane_u64 + ((void *)&cpr->cp_desc_ring[cons + 3], + vreinterpretq_u64_u32(rxcmp1[1]), 0)); rxcmp[1] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 2]); rxcmp1[0] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 1]); rte_io_rmb(); + rxcmp1[0] = vreinterpretq_u32_u64(vld1q_lane_u64 + ((void *)&cpr->cp_desc_ring[cons + 1], + vreinterpretq_u64_u32(rxcmp1[0]), 0)); rxcmp[0] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 0]); t0 = vreinterpretq_u64_u32(vzip2q_u32(rxcmp1[0], rxcmp1[1])); -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.232399478 +0800 +++ 0042-net-bnxt-fix-reordering-in-NEON-Rx.patch 2022-06-21 15:37:49.037784585 +0800 @@ -1 +1 @@ -From e7f2effc9220dc5d71b0bb550bcc903badc7bac4 Mon Sep 17 00:00:00 2001 +From 1dc7ed3e26af939e3138183affef017962d613e4 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e7f2effc9220dc5d71b0bb550bcc903badc7bac4 ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -30 +32 @@ -index 779e23ac4f..32f8e59b3a 100644 +index 3cb94926fe..858e91bb9d 100644 @@ -33 +35 @@ -@@ -231,25 +231,38 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +@@ -225,25 +225,38 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)