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 3FEA542D46 for ; Sun, 25 Jun 2023 08:40:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B5FC42D29; Sun, 25 Jun 2023 08:40:50 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2046.outbound.protection.outlook.com [40.107.223.46]) by mails.dpdk.org (Postfix) with ESMTP id C0BD440A7F for ; Sun, 25 Jun 2023 08:40:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l77W7i+mQ7goQz6nFkzTF/BA5++hgaGyFwJcvhpoWMWJjWfr6RNdpPqPTTgo2TruTLFzKxAGc5/ntru4smox6cByl905mRss58gYFlbLNsYkrRFwp0T5iOkHbEyI0BchQBzs69YyEfU0wb+u1QQW4p1nx5VuUTGBlQ6/ozbH+O+V+09vrSRH0yEWHIEeA6c/uesu8zAfmrFZlC+QQ9wW0ytD+lDJHGV7JFHHSU5aR/7uEn9PGf1u+kwIq0GdpLCyTC1/fTXj2cl2FvEodfOuHNRiVQWxAryTWUe+1Z2o77WfEaDcKZi9RRWFqbNh/pjVnfMpb9t0rlCKv9w6QiFZ3g== 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=r2v3FOdlIwBXZtzIo2zHKARQqplzZ470YZoOrWH/MiM=; b=VTxJkT1G6lqqPRceGbMKUfcs3UMTAMVIc1ctVKEKd+0M/Jyjl1csCqttDn04ammJRqGD4BgErdr0C3it1HCru5afiKewz5gVXPqsEs7wX9R4hkbQ+rIqlWj0vnvQY/YTNWp/dhyJfCyWiWsjIVkpOUdRpA4Ee72a312BmeqLm7PSzagC/nlv1Sh5WS6LnmNh82l4FAfrSPNA84Z2e4PBqowwgTv8SKzjSxqmUbHT+7jF3tc4JF6WwfYbHnSDfaqTLSDgLZb1ahBkBcbG6mWK2szwAj6M/s82a+DtE/ChKK3ay935FED1ml1Mf60AvBoMxUeK5q8ufXAxkRyUid23Yg== 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=r2v3FOdlIwBXZtzIo2zHKARQqplzZ470YZoOrWH/MiM=; b=TgD5VBgKth47hcTaz4gELzc0N7Ph0GdKYxVl/DnJ8RqQ4sXWi8BLi6gzbvc3IEB8GPMo47EyXeHlY7Frmg3CS571Nz6XvaLHrEksXOxq6z577Yi86Mg2wy03EvwX7EG7X0xFoiKCkLnAYUZ9tuiasewj2tR9QJOTp5LGNxzT28Wieflc7tHcOl+pVq1v57zTf7UdxLtph3vwaHqJQpHNmacG717MeiKcqFeNv7BuzQy2LZ+be9qJhvs/kDJdE2+drOYqzopr+QU5e3owMAr+3y0eXLqipuyC1NYIjtQoYr9ZHmmETnTcZ2keHPSyPn6HE2vnvKXHyLvradjEK/5N3A== Received: from MW4PR04CA0258.namprd04.prod.outlook.com (2603:10b6:303:88::23) by BN9PR12MB5241.namprd12.prod.outlook.com (2603:10b6:408:11e::15) 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:40:46 +0000 Received: from CO1NAM11FT008.eop-nam11.prod.protection.outlook.com (2603:10b6:303:88:cafe::e1) by MW4PR04CA0258.outlook.office365.com (2603:10b6:303:88::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.33 via Frontend Transport; Sun, 25 Jun 2023 06:40:45 +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 CO1NAM11FT008.mail.protection.outlook.com (10.13.175.191) 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:40:44 +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:40:24 -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:40:23 -0700 From: Xueming Li To: Huisong Li CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: uninitialize PTP' has been queued to stable release 22.11.3 Date: Sun, 25 Jun 2023 14:34:28 +0800 Message-ID: <20230625063544.11183-51-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: CO1NAM11FT008:EE_|BN9PR12MB5241:EE_ X-MS-Office365-Filtering-Correlation-Id: 8068b7f9-37a2-4a5f-2ed5-08db75471a76 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hghHyKb3JYRNWyq3+WVK/DLKGN3uRmBQKYHQw5LLE0WsdandVNRCYKo0xdUxkDLxUF+sExryEDf7Tx1h7tcnp4cQEOUtduW1OkoMADs2qDAfT7AeK371FdrkWAIQV7qAMcUCEWcELps3tchCgTl1KY9Z7YADs16fC7rT0kKc2X66+saEhADz7xe4ZL8BY245idCD1zyjoPyi9ym6JXv3uIswtcI4JO89qUoV6iDEQLL9ksqu6FXKhISqC3KdcOyVOHAIKFAF0LEWiZnjsgjG96GuTUTCKeWf2j+ZcOEEkMrRQYbxjgd/ZqYxMG1GEFT1+6pljlkA4aYPu8lBuWb3Sc2mxRS4DE/OOlECQsmIbadwAvocrcnKKsCMhv0iAErbJ/HivhYkiCACmG3DCxFWy/QdtOYBITroFz5EoZ9U5DR8HujMlpjjSuLZTC+j1JLBumqUDzdlaBgezz36vXpOGb7Jcl3id/fF5rbEfjBoBTUAX0ZienBTNKwlVej6XpsBz37Jpct7Ma6eicPlbQ+IcXlRBp530LTX2DwJpySzSH6NvpoIhoSCzUsyKYykiambkfev4QsKLRXcw4eyp0WeDzb9GlgjjDSHP6GZjXaXULNIdIV8EG4D7ZkCC/4LIjixMdz0ZWmi2305w12VxPo+KgzOxeywkHCPgWkQ9QyltL8UcMUwsxEe5/0Vzik8LQvHGDZA9fzvsclTvjSZzre5deszztV75XP6QjrMVOFCi2mVXQQ5L+pAvXULHO9hrL0/Ui/OVhxLGYaUwSko7IQi7A== 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)(136003)(346002)(396003)(39860400002)(376002)(451199021)(40470700004)(36840700001)(46966006)(36860700001)(82310400005)(47076005)(966005)(478600001)(7696005)(2616005)(54906003)(426003)(83380400001)(336012)(26005)(53546011)(1076003)(186003)(16526019)(6286002)(2906002)(5660300002)(40460700003)(36756003)(70206006)(356005)(4326008)(7636003)(70586007)(82740400003)(55016003)(40480700001)(316002)(86362001)(8936002)(8676002)(41300700001)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2023 06:40:44.9200 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8068b7f9-37a2-4a5f-2ed5-08db75471a76 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: CO1NAM11FT008.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5241 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=a8ad01066179a347a3949abc48e0cf61c9bd1010 Thanks. Xueming Li --- >From a8ad01066179a347a3949abc48e0cf61c9bd1010 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 2 Jun 2023 19:41:57 +0800 Subject: [PATCH] net/hns3: uninitialize PTP Cc: Xueming Li [ upstream commit bfd20b33e752a2597e85283e9fbb134170cce3a0 ] This patch adds the uninitialization process of PTP in case of having an impact on PF driver in kernel. Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_ethdev.c | 2 ++ drivers/net/hns3/hns3_ethdev.h | 1 + drivers/net/hns3/hns3_ptp.c | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 5d5ccefcc9..2fb02ab00d 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4649,6 +4649,7 @@ err_enable_intr: hns3_fdir_filter_uninit(hns); err_fdir: hns3_uninit_umv_space(hw); + hns3_ptp_uninit(hw); err_init_hw: hns3_stats_uninit(hw); err_get_config: @@ -4684,6 +4685,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev) hns3_flow_uninit(eth_dev); hns3_fdir_filter_uninit(hns); hns3_uninit_umv_space(hw); + hns3_ptp_uninit(hw); hns3_stats_uninit(hw); hns3_config_mac_tnl_int(hw, false); hns3_pf_disable_irq0(hw); diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index 9acc5a3d7e..fb4c5ba2ef 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -1041,6 +1041,7 @@ int hns3_restore_ptp(struct hns3_adapter *hns); int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev, struct rte_eth_conf *conf); int hns3_ptp_init(struct hns3_hw *hw); +void hns3_ptp_uninit(struct hns3_hw *hw); int hns3_timesync_enable(struct rte_eth_dev *dev); int hns3_timesync_disable(struct rte_eth_dev *dev); int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev, diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c index 1e27e4aeca..0e17a17034 100644 --- a/drivers/net/hns3/hns3_ptp.c +++ b/drivers/net/hns3/hns3_ptp.c @@ -306,3 +306,21 @@ hns3_restore_ptp(struct hns3_adapter *hns) return ret; } + +void +hns3_ptp_uninit(struct hns3_hw *hw) +{ + struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw); + int ret; + + if (!hns3_dev_get_support(hw, PTP)) + return; + + ret = hns3_ptp_int_en(hw, false); + if (ret != 0) + hns3_err(hw, "disable PTP interrupt failed, ret = %d.", ret); + + ret = hns3_timesync_configure(hns, false); + if (ret != 0) + hns3_err(hw, "disable timesync failed, ret = %d.", ret); +} -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-25 14:31:59.859615000 +0800 +++ 0050-net-hns3-uninitialize-PTP.patch 2023-06-25 14:31:58.375773900 +0800 @@ -1 +1 @@ -From bfd20b33e752a2597e85283e9fbb134170cce3a0 Mon Sep 17 00:00:00 2001 +From a8ad01066179a347a3949abc48e0cf61c9bd1010 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit bfd20b33e752a2597e85283e9fbb134170cce3a0 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 9ed54ae384..70463fe177 100644 +index 5d5ccefcc9..2fb02ab00d 100644 @@ -24 +26 @@ -@@ -4637,6 +4637,7 @@ err_enable_intr: +@@ -4649,6 +4649,7 @@ err_enable_intr: @@ -32 +34 @@ -@@ -4672,6 +4673,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev) +@@ -4684,6 +4685,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev) @@ -41 +43 @@ -index c04edf622f..9456204422 100644 +index 9acc5a3d7e..fb4c5ba2ef 100644 @@ -44 +46 @@ -@@ -1045,6 +1045,7 @@ int hns3_restore_ptp(struct hns3_adapter *hns); +@@ -1041,6 +1041,7 @@ int hns3_restore_ptp(struct hns3_adapter *hns);