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 7260442D46 for ; Sun, 25 Jun 2023 08:39:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E52240ED8; Sun, 25 Jun 2023 08:39:59 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2060.outbound.protection.outlook.com [40.107.96.60]) by mails.dpdk.org (Postfix) with ESMTP id 1795740A7F for ; Sun, 25 Jun 2023 08:39:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EdASoSYgmEuF1EVh+ERPsSthQ9Gm6hFyLbvnRJDbGcrQM8ZC7UXszhW3Dq2aRgZLNMDWx2dKScAxZuT1zY4M1LwinNY3oxi44SkAcvgZiauoxi0R1CCPhqapjOTi42gBRsR36zZ0cA1vRLfzGD8YOj+Gx9QEU+TW/0354g7wMtxhuvk3SENenotESvrv7bEvF/FSIX0VBnuNlkiQkqyotXMQSndHyiAi/p1QID6GvZVeQSnGCWdJ5Srdsc1X2n1iMgTzpms0W5EG5aIToNheOWCXn3fK79hbo80mb2jpy1JkLfDNFiSJ7Cpu/yeh1zpiGZqq2+J2rlYpZ6y3/EAQKA== 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=zi94v3dY/72jy8CFC/pbppu3CIdaSKUB3uFWRSGj0Cs=; b=jYTrSyXecBaJDqAXxxkA9p93D1C9j8IC+NIGE3AJNiSArkV8fVLyJYQMgNVB/7VUZzfxZHVdtM8eYpPInvMgt7hV70ljPZ2yUWL0yqJQVxqWBjbdmUzOEAUVuhwhZqsWb9I80rzTb85Zj96XowkajtXXzFcAm/Sv8uSXvXmwQUsO15kIdTyoVJuGEXSawES/QPy66Kwb0NnloxIxcr9Crh3bJPgf3LiUNoMF1VMMjs7pys656HPEGeFyjJDbFcqIzNl1fJsCyi7UpSkazoEK/po7XHKaAZI4xHKChIkraIkzLYfDbS1Duc/HO+tdRAfADJY7s+2cg0BxYcxjZUdLAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=huawei.com 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=zi94v3dY/72jy8CFC/pbppu3CIdaSKUB3uFWRSGj0Cs=; b=tMNONYHJv4RvgIzz5t/Xd3aqEnk5s58c4++5EBR13pH6l92L0jqINSpx8fT9ucaWnY2fH/aEd85N9C+phnp9RRJvdMb/jMGWVjOyx7dSsspMEO3xTOcV4wntQ2kQ17c848hpI4kKBTiJ6ZjxJPAgyrZAIHWa0uupJcZS2CttmNCYrcdWAIDHJ1tLiFYxNzsYmPM82Q+i/sCysSlp1Toxmty1QrBnfrKsG7bAMrzb0ShUAeqH13pklAClViuyyRsL0B0GJ1NdFtuN0Wxvm1i9T1MBs/VvMML1FArg3JQXBXJp5kI6gC3g9MkOQTEqzIflw+gWmKaJ2T2gMTy9ub67cA== Received: from BN9PR03CA0129.namprd03.prod.outlook.com (2603:10b6:408:fe::14) by SA0PR12MB4349.namprd12.prod.outlook.com (2603:10b6:806:98::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Sun, 25 Jun 2023 06:39:56 +0000 Received: from BN8NAM11FT040.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fe:cafe::53) by BN9PR03CA0129.outlook.office365.com (2603:10b6:408:fe::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.32 via Frontend Transport; Sun, 25 Jun 2023 06:39:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT040.mail.protection.outlook.com (10.13.177.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.47 via Frontend Transport; Sun, 25 Jun 2023 06:39:54 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sat, 24 Jun 2023 23:39:37 -0700 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.37; Sat, 24 Jun 2023 23:39:36 -0700 From: Xueming Li To: Chengwen Feng CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: fix Rx multiple firmware reset interrupts' has been queued to stable release 22.11.3 Date: Sun, 25 Jun 2023 14:34:20 +0800 Message-ID: <20230625063544.11183-43-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230625063544.11183-1-xuemingl@nvidia.com> References: <20230625063544.11183-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-TrafficTypeDiagnostic: BN8NAM11FT040:EE_|SA0PR12MB4349:EE_ X-MS-Office365-Filtering-Correlation-Id: 68767d0f-0a9f-439d-8cdc-08db7546fc37 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s87XYpmx6FXS9LlP8Z/ibUu7J8dsMWAA0kaE+NluMz0urBHWsXQ+QWNgRvuxoc/9S08+xeCWIXjBMfDb0axfGFtpbwPbOuee/dfzgVtQOChx1GYprCIioTStSZGQFm8rlzeO9WeE9dhUe7LRqDjcAJK4+fVYqPmpjLGOH1b6xbSeudpfFqIWqJ9SAcVkWUCuQVpI4+k4vivqbCaBfwtyyTj/E1CDTu4nMr1/VKP+iJqT2yUiZ0XVfN5yVlXIzShOX45JW3UK+Bc6z8jX+9vfeG9EQAO+cUyNneAHtuu9V1ajG8LPn1rIg2AZctDeJjuWuQRSKC8ZPFToJsI2lEeYDGA1FadkOakiGVBNAaUG4Un30psetjzO3up1ZK8nOY8DFnGTEJJwOCfB4gBwm+e9ucWjkCDUjjsyO/4QCUAThXPzp7OOhhnJD/zl6b163+LcjI9RcYymvHNaJNgUZncIR96FEzAZVH6SWY+LcTwuwfE8MrG2+CR/Bz1tY30D4LeSQqZuKg0a+FqGj0d7vepKF9Z0XN0DyoP6ObzvfG+xMkhC8fcG8YRpBpwCUzcLo1yWkywZhI1295e9tQZ7VS9N2SNNzwT7AWONG4kWZ3Hiu7USxPlSeQHiPofJm0yijbe1fqeQ17VxAyMzVMe5988mPJsga0NRlHJwgR+0s8CyzfbIH1n/FYP4A2IqvNQ16L0AWxU+bNMQ45QTrYgK/2s12Hyva8hJ53qiPG/Dj7FjvCiOPvvFrJZWCmb6uJIWWRC3HN0m8w52p1PiX4tMc1E86A== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(396003)(39860400002)(346002)(451199021)(40470700004)(36840700001)(46966006)(82310400005)(36860700001)(40460700003)(47076005)(966005)(478600001)(7696005)(2616005)(54906003)(426003)(6666004)(83380400001)(336012)(53546011)(1076003)(26005)(16526019)(6286002)(186003)(2906002)(5660300002)(36756003)(70206006)(356005)(4326008)(70586007)(82740400003)(7636003)(40480700001)(8936002)(8676002)(41300700001)(316002)(86362001)(6916009)(55016003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2023 06:39:54.0685 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 68767d0f-0a9f-439d-8cdc-08db7546fc37 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT040.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4349 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 22.11.3 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/27/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=d859368e8fe219552fd2ed72ae14d492f5d283f1 Thanks. Xueming Li --- >From d859368e8fe219552fd2ed72ae14d492f5d283f1 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Mon, 22 May 2023 21:17:39 +0800 Subject: [PATCH] net/hns3: fix Rx multiple firmware reset interrupts Cc: Xueming Li [ upstream commit e3c71325cec3353c4b9623310ece363a7c79604f ] In the firmware (also known as IMP) reset scenario, driver interrupt processing and firmware watchdog initialization are asynchronous. If the driver interrupt processing is faster than firmware watchdog initialization (that is, the driver clears the firmware reset interrupt source before the firmware watchdog is initialized), the driver will receive multiple firmware reset interrupts. In the Kunpeng 920 platform, the above situation does not exist. But it does on the newer platforms. So we add 5ms delay before drivers clears the IMP reset interrupt source. As for the impact of 5ms, the number of PFs managed by a firmware is limited. Therefore, even if a DPDK process takes over all the PFs which managed by the firmware, the delay is controllable. Fixes: ee930d38ffca ("net/hns3: fix timing of clearing interrupt source") Signed-off-by: Chengwen Feng Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_ethdev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index c31c6979c3..b791ec4a17 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -286,6 +286,19 @@ hns3_handle_mac_tnl(struct hns3_hw *hw) } } +static void +hns3_delay_before_clear_event_cause(struct hns3_hw *hw, uint32_t event_type, uint32_t regclr) +{ +#define IMPRESET_WAIT_MS_TIME 5 + + if (event_type == HNS3_VECTOR0_EVENT_RST && + regclr & BIT(HNS3_VECTOR0_IMPRESET_INT_B) && + hw->revision >= PCI_REVISION_ID_HIP09_A) { + rte_delay_ms(IMPRESET_WAIT_MS_TIME); + hns3_dbg(hw, "wait firmware watchdog initialization completed."); + } +} + static void hns3_interrupt_handler(void *param) { @@ -305,6 +318,7 @@ hns3_interrupt_handler(void *param) vector0_int = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG); ras_int = hns3_read_dev(hw, HNS3_RAS_PF_OTHER_INT_STS_REG); cmdq_int = hns3_read_dev(hw, HNS3_VECTOR0_CMDQ_SRC_REG); + hns3_delay_before_clear_event_cause(hw, event_cause, clearval); hns3_clear_event_cause(hw, event_cause, clearval); /* vector 0 interrupt is shared with reset and mailbox source events. */ if (event_cause == HNS3_VECTOR0_EVENT_ERR) { -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-25 14:31:59.651087100 +0800 +++ 0042-net-hns3-fix-Rx-multiple-firmware-reset-interrupts.patch 2023-06-25 14:31:58.355773900 +0800 @@ -1 +1 @@ -From e3c71325cec3353c4b9623310ece363a7c79604f Mon Sep 17 00:00:00 2001 +From d859368e8fe219552fd2ed72ae14d492f5d283f1 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e3c71325cec3353c4b9623310ece363a7c79604f ] @@ -23 +25,0 @@ -Cc: stable@dpdk.org @@ -32 +34 @@ -index 5ef66f96c6..664226a6ef 100644 +index c31c6979c3..b791ec4a17 100644