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 3141E433D8 for ; Mon, 11 Dec 2023 11:14:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B79040ED2; Mon, 11 Dec 2023 11:14:44 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id BB55C40E0F for ; Mon, 11 Dec 2023 11:14:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b27W7lHIEsooFyg4AkKX6dQQkkAQhI4NtR8uNT49txpK5j1s91smuKQ06F5PiESyUeardoopepQ6byUoMIVTWEZS8oruKXPzLPCQc1bZC7ty9tT55KRUEIzd336weZrUjwB1v835A/Z4ZrqSMlPLROakpoKOXUpgTFKqYV+TzplTSsUjXKrF6sUiYmzeko8wAlWGGD818JgEuT78gNwoEhUCcZYyblGc/4FzqaKw7iIRxWEZCZJ+rFkRlAToLhzCUQC+HgOtBRQi0rpLd+qiND2rvkVrb9tJVllHhLcxfkomk0z2uYI8c5bk5B3vcFEz4W+PwJZJ6S8tsNOf6+BM0Q== 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=xHqJU1KmnygvQ7I8UUKnt6ha6I+vlNmNr1LtoQadlGY=; b=cn3l+Xn7hKqUomQ2WbiH75WLql3GciUxwOpQPYWAh1ieAvBF66JnDnwlu7sO0OB1L6S/uLU/mcgCbp5yf2uiKYFOTJM3ci+ivzeLL+/n/TWg1ZDdRPF00D7Bd2QkPWkrmlYnDc3+TkDeOljRGdmira2tNGzgQ96IRmERWk0yiM8fu6EyVeOEWVgRGunaP0TaaEi303MjRVWgAVYFtk7f/pTpOB9D7wx7KJPSHYvXHYh5U2O30A/Y14dQgVUTB6zPOuDj1NOfrcMrJ1pTCo7QCzB2sO2b5tn17OZ8BvOACPuMsBt3bzQfKlJp776G9G8JdBzoq6zBoCk/9NvkXEIiGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 (0) 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=xHqJU1KmnygvQ7I8UUKnt6ha6I+vlNmNr1LtoQadlGY=; b=cVRxKEetSn5FrPALe8cV0W7/kCuw4HhhBFMmdlif/VbjVFEyXxSGT2EIKE1bIhe18QWiQKZPsNAbvucsKVNbQ/dMakShGI4Kfo5F5Qnf2bK0pmRpBOatSMGtE/LSyNakz9QXBgUsYoXU+E7flemI96yGbfIKP2ZZnqlV4ZIxCaZMJJqIzwf0tQXQX8m8p1+i5lkFcB1v5nyChD4xHVPeic8dj0GZAYoxoCeWYcqqIj+xA/TgV/HQDOwvDbYzhC4AH//5CEWxJstZj0I5A6FEcltJW8kGfYKfaBdr6yqu05n1VPtPoUz5ThX+k++toYOAMUUaw+AZbTeTZMh4Bbi4wQ== Received: from CH0PR03CA0443.namprd03.prod.outlook.com (2603:10b6:610:10e::7) by CH3PR12MB8483.namprd12.prod.outlook.com (2603:10b6:610:15c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.32; Mon, 11 Dec 2023 10:14:40 +0000 Received: from DS3PEPF000099DD.namprd04.prod.outlook.com (2603:10b6:610:10e:cafe::5a) by CH0PR03CA0443.outlook.office365.com (2603:10b6:610:10e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.32 via Frontend Transport; Mon, 11 Dec 2023 10:14:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS3PEPF000099DD.mail.protection.outlook.com (10.167.17.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.18 via Frontend Transport; Mon, 11 Dec 2023 10:14:40 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 11 Dec 2023 02:14:26 -0800 Received: from nvidia.com (10.126.231.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.41; Mon, 11 Dec 2023 02:14:25 -0800 From: Xueming Li To: Dengdui Huang CC: dpdk stable Subject: patch 'net/hns3: fix double stats for IMP and global reset' has been queued to stable release 22.11.4 Date: Mon, 11 Dec 2023 18:10:46 +0800 Message-ID: <20231211101226.2122-22-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231211101226.2122-1-xuemingl@nvidia.com> References: <20231022142250.10324-1-xuemingl@nvidia.com> <20231211101226.2122-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DD:EE_|CH3PR12MB8483:EE_ X-MS-Office365-Filtering-Correlation-Id: aa9a018b-f846-4cb8-ebdc-08dbfa31fc9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ThXydju+w/36XUCImN+Ls+jyYjUzSk5Vo/JqtNO88mEVjg84Ex9IyjOIKG8Zly51uRouz7D9ry2POhlhQhJeAHEu/wwwiOkXWewYL19jQPwkffZ07SOj5nQbU4fQPAzIR0guG4f/zvRD31lyXI/8Fl8UIpF9j4q2smnGT0jGMZvuiKd2eyMa01XdpLTmiu2xLzmxPAlVP1RlSWy1GABs6YjSzJ2wSwVLLxmywT+8YX5wWvrFlSW1yBOyJwRx1SzCKePbBUdFmtCMzmbwNwCeevZI2rWsB57or/dTHhQ7mDkDR20dhMnK3JEPxas1hid37Dr9fntZoZ8zFOXhYN57OkTHI+lOBOX8FsIu2xKyUYQOqg3tU9my62GVQktV3dChLIdy0g3kXRJhsN1svuPfMbRWg53l+x3UZ1D7OsyQ3ZoRv2cTkpP6ppyMAztik8RuwHF/5Dg60Z8gHgeP6iD637vMde11WEIwoNgK2h+pMhOcmnqP0LcjW4Fc+rxqxuWw8Suv5K/A0G9lrCn9ypO5CPhK0bkSVSjUuXvMQtVyhmdUJSD6FmPlY7WWkPZUdocfo58FoX8e+k3jqBytGvV/juqTIqA0wRfQTRFbIc9Yn6H4Xyfbf/aIxFZjMge165cVbsJ8PXWjsF87b6Zu6bVp4eUPfo4W1WUAZsgEcGHqgXz0TOhDOaTmq6wscNoIrRgU3DlWjuxRH/UX3iC/BzZqLuik80BjUAeQ8dh1xPUMGlRGy1XCynpKQj4hR8Vxnf28kZgyMdH31USUJ9Pb2dBXCHrdhva15gvu9QlKr/+ZH1g= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(376002)(396003)(39860400002)(136003)(346002)(230922051799003)(451199024)(1800799012)(186009)(82310400011)(64100799003)(40470700004)(36840700001)(46966006)(83380400001)(2906002)(82740400003)(478600001)(356005)(41300700001)(4001150100001)(7636003)(55016003)(70206006)(70586007)(6916009)(426003)(966005)(40480700001)(316002)(6666004)(86362001)(7696005)(4326008)(8936002)(8676002)(53546011)(40460700003)(36756003)(1076003)(47076005)(6286002)(5660300002)(36860700001)(26005)(336012)(2616005)(16526019); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2023 10:14:40.0134 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa9a018b-f846-4cb8-ebdc-08dbfa31fc9c 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DD.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8483 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/13/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=c4bf1adb6365633eef361659257c32cb67ab40d2 Thanks. Xueming Li --- >From c4bf1adb6365633eef361659257c32cb67ab40d2 Mon Sep 17 00:00:00 2001 From: Dengdui Huang Date: Fri, 27 Oct 2023 14:09:42 +0800 Subject: [PATCH] net/hns3: fix double stats for IMP and global reset Cc: Xueming Li [ upstream commit c48e74370c5eafbe8db5c826a797344e4fdf8f49 ] There is a stats counter for IMP and global reset in PF driver. hns3 driver has two following task to detect reset event: (1) interrupt handled task(A): triggered by interrupt and detect which reset level. And the reset service will be executed after 10us. (2) polling task(B): scan reset source register to detect if driver has to do reset. And the reset service will be executed after deferred 3s. They'll both count the number of one reset plus 1. Task(A) adds it before doing the reset service. And in the reset service, task(B) adds it if hw->reset.schedule is 'SCHEDULE_REQUESTED'. Normally, this reset counter is just added by 1 once. Unfortunately, this counter is added by 2 in the following case: 1. Task(B) detect the reset event, like IMP. hw->reset.schedule is set to 'SCHEDULE_REQUESTED'. 2. Task(A) is just triggered before running the reset service of task(B). Note: the reset counter is added by 1 at this moment before running the reset service of task(A). Additionally, the reset service of task(B) is canceled in task(A) because of schedule status being 'SCHEDULE_REQUESTED'. 3. Then the reset service of task(A) is executed at last. Note: The reset counter is added by 1 again in this step because of schedule status still being 'SCHEDULE_REQUESTED'. So this patch fix it by setting the scheduling status to 'SCHEDULE_REQUESTED' in step 2. Fixes: 2790c6464725 ("net/hns3: support device reset") Signed-off-by: Dengdui Huang --- drivers/net/hns3/hns3_intr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index 44a1119415..baf5f58e9e 100644 --- a/drivers/net/hns3/hns3_intr.c +++ b/drivers/net/hns3/hns3_intr.c @@ -2434,8 +2434,8 @@ hns3_schedule_reset(struct hns3_adapter *hns) if (__atomic_load_n(&hw->reset.schedule, __ATOMIC_RELAXED) == SCHEDULE_DEFERRED) rte_eal_alarm_cancel(hw->reset.ops->reset_service, hns); - else - __atomic_store_n(&hw->reset.schedule, SCHEDULE_REQUESTED, + + __atomic_store_n(&hw->reset.schedule, SCHEDULE_REQUESTED, __ATOMIC_RELAXED); rte_eal_alarm_set(SWITCH_CONTEXT_US, hw->reset.ops->reset_service, hns); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-12-11 17:56:23.871448600 +0800 +++ 0021-net-hns3-fix-double-stats-for-IMP-and-global-reset.patch 2023-12-11 17:56:22.907652300 +0800 @@ -1 +1 @@ -From c48e74370c5eafbe8db5c826a797344e4fdf8f49 Mon Sep 17 00:00:00 2001 +From c4bf1adb6365633eef361659257c32cb67ab40d2 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit c48e74370c5eafbe8db5c826a797344e4fdf8f49 ] @@ -35 +37,0 @@ -Cc: stable@dpdk.org