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 A2806A0C3F for ; Sat, 12 Jun 2021 01:20:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 982DB41103; Sat, 12 Jun 2021 01:20:53 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2049.outbound.protection.outlook.com [40.107.93.49]) by mails.dpdk.org (Postfix) with ESMTP id DFCE54003F for ; Sat, 12 Jun 2021 01:20:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YlgmZJ5+NaMlfdZZJQE4w5EiHHeIZQRjJ9i/4WcKj3F3erIOS1SovBD2M0pgvvAqj+GEqlXh0+SNwVV4qdAZyt0/zbkD8B1a4PjuP4d0q2yuifxBQ44LD+gn9f7+yLoOj6RR1cKMUdJV0AXxJsBjPLUCIEYyiVRs6ZhephbssuZweW7MfSVf8eJyBY8eYteesYineJLCCatA436JcTFQNme5FCgOE1hYa7pLG7mltW6xZdg0BP+PFje57EdlACoZNCJrSw0dsKqa4L+eylpvnr2q8RHvnjp1GtWL/qMOQgkdpVTA0+gq9dp2oB+zxDyRDM40AVFQI4V1jjPTjUOp+A== 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-SenderADCheck; bh=waNoQ7FawgnmdWxkSUmn1RthhT2f9mIo6JUlgj+D3JY=; b=SteMTK97Kcha2cxbcG7IVWUGYFnkvWP05iEUnDvw3em6SGe/laODT9TAs8GFKpJD3feueE9cAvBqYKaoDK8xOZ8qN+KHtS+DGyCMmUjfvgZzdYLJk1IGq+uGIJsLyP13SA/d267FKrIKm4lWR2SI34yXdKvmTBWG/GTeHpiOCbk5dZVVJwCST56uBvcbQDnKbulXuAqTfCqiwlRXBVEvItDH2a1/ytWno1S3l9t8ZyKmy2zeHnIlS4xlcVpLADfFUCMEoSNz1Ang7rl/0OiNAo7e/RrQKYki67ksvaTj2gZ+tSlOSRU7z03BabwQTeSmmcKIo87tVxjccWulOzRKFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=waNoQ7FawgnmdWxkSUmn1RthhT2f9mIo6JUlgj+D3JY=; b=WXmB8wL11W/McqXRytRsOs7dyEO+REMLmUDR0v2DTd73A9q7LRwL/V68mVeIWnHyTwTLsqoMj5+mRQwpaCvVZsfw69vkRKh/yZrAFSHGzn3D8GIsJhD9Zb0bIh1ze1F0xiD50AM0E2QkwHJYfMgRZMdxEsAHUDGJqvRH/9dLUfZ9xGJbK4fpzD5tMhK5/tG6o35FPll9xQIk9ez/BCaCNVXImDLQb0idUvZIjzS+qqf9ixR8bvv0D5eCCfVAPIwNB7Q4nMOtBj9IiOQU/sSYaM7GGQLcS80zk1w3sRIRnm11n3WfSdWYc2iNAO9wOV/2Yf9d7wSu2VB65oHpAKdWjA== Received: from DM6PR10CA0030.namprd10.prod.outlook.com (2603:10b6:5:60::43) by MW2PR12MB2428.namprd12.prod.outlook.com (2603:10b6:907:6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20; Fri, 11 Jun 2021 23:20:47 +0000 Received: from DM6NAM11FT005.eop-nam11.prod.protection.outlook.com (2603:10b6:5:60:cafe::da) by DM6PR10CA0030.outlook.office365.com (2603:10b6:5:60::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:20:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT005.mail.protection.outlook.com (10.13.172.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:20:47 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 11 Jun 2021 23:20:45 +0000 From: Xueming Li To: Huisong Li CC: Luca Boccassi , Min Hu , dpdk stable Date: Sat, 12 Jun 2021 07:04:23 +0800 Message-ID: <20210611230433.8208-169-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611230433.8208-1-xuemingl@nvidia.com> References: <20210510160258.30982-229-xuemingl@nvidia.com> <20210611230433.8208-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3f842de9-89d9-4282-b90e-08d92d2f8b4e X-MS-TrafficTypeDiagnostic: MW2PR12MB2428: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v590YtEFEah/09cSlzY4asbbXg3LOa6fqsRVLd0Gpsm+XCAM3ravPKaTqco7OsAyufT2X5z9uoadjV/ZzfkVLe+QZLMYah9s0ogIv9GHoPilo7xP6rbZeRSchQVs5Fy7g8B9n4gQa1Z9QU0gTiosuLoRIVEzUyesgAktUa/HgiqlYEbwOWbYPV28rOH8nTpVGeN4wp162lkepPOgeEGQw3k3SmrXwNQLZcRJxHRYresjIqxawfKg0W0+VfkPcx+RRet7/1aKEvLNF7YqI8eiiYdh6XWcRDZzhxs1VFIeiQTmwgnb+GCLJya2WEWoGNjqvJE1rzBjnPIE//fZeWEhJG9EF0dLpXuPhA9aTTyOuiGJ4oiQiOGmxYxtoYeKPDZgj/x/rkpD2FIWEWVkrUpJM6l156QHoP47rh0FHllM81q91y/uMpbr230+U3ddLu6hKlpsJX10BFWG9HaCeYmY36JjZ1kLeZLoHJhlbkAVykos1kK258B8aLlJqgCJFRVhfbVsPh6QcG4v9s/6zOsi+yNWX8WDhxp2lGckaudC0VOay/UEZQ36jorEa+6a2U0ASz00iuqIN3c+PUWfnIUpRCx6WkNFhXZ34YryRhFjv97C+0F3QeJZmlwW3EMj/O9TdxXAIEmc3010HSlUJP5OBECbcHlpQaXxwVz1YWWeNUPUtf5bV2M1SP0wnYZfH/+fv5OnVL1fT/EY6YKEtsmSorJI8JSlQbPkrdrvFdryWASXLRsuzTvHA0CusJR0JV4qj3/eOgTtUeNdHS0vRvrNoWIgkqGv1NOcg5tht94hD1lKl9F7hCL8aLtsdDS/Vq1I X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(346002)(39860400002)(376002)(136003)(396003)(36840700001)(46966006)(186003)(47076005)(4326008)(6666004)(478600001)(83380400001)(5660300002)(86362001)(316002)(26005)(55016002)(16526019)(426003)(356005)(6916009)(2906002)(8936002)(2616005)(36756003)(336012)(7696005)(82310400003)(70586007)(70206006)(966005)(6286002)(36860700001)(53546011)(1076003)(54906003)(8676002)(7636003)(82740400003)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2021 23:20:47.2431 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f842de9-89d9-4282-b90e-08d92d2f8b4e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT005.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2428 Subject: [dpdk-stable] patch 'net/hns3: remove meaningless packet buffer rollback' has been queued to stable release 20.11.2 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 20.11.2 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/14/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/aeaba9b829aa101839a4dd594abd2f05a24fbbbb Thanks. Xueming Li --- >From aeaba9b829aa101839a4dd594abd2f05a24fbbbb Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Sat, 15 May 2021 08:52:35 +0800 Subject: [PATCH] net/hns3: remove meaningless packet buffer rollback Cc: Luca Boccassi [ upstream commit 47ce649fd30c89d95c420a015f9eef7f215bb386 ] Packet buffer allocation and hardware pause configuration fail normally when a reset occurs. If the execution fails, rollback of the packet buffer still fails. So this rollback is meaningless. Fixes: 62e3ccc2b94c ("net/hns3: support flow control") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_dcb.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c index e5b6915d17..69db900c93 100644 --- a/drivers/net/hns3/hns3_dcb.c +++ b/drivers/net/hns3/hns3_dcb.c @@ -1501,7 +1501,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) enum hns3_fc_status fc_status = hw->current_fc_status; enum hns3_fc_mode requested_fc_mode = hw->requested_fc_mode; uint8_t hw_pfc_map = hw->dcb_info.hw_pfc_map; - int ret, status; + int ret; if (pf->tx_sch_mode != HNS3_FLAG_TC_BASE_SCH_MODE && pf->tx_sch_mode != HNS3_FLAG_VNET_BASE_SCH_MODE) @@ -1526,7 +1526,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) ret = hns3_buffer_alloc(hw); if (ret) - return ret; + goto buffer_alloc_fail; hw->current_fc_status = HNS3_FC_STATUS_PFC; hw->requested_fc_mode = HNS3_FC_FULL; @@ -1552,10 +1552,9 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) pfc_setup_fail: hw->requested_fc_mode = requested_fc_mode; hw->current_fc_status = fc_status; + +buffer_alloc_fail: hw->dcb_info.hw_pfc_map = hw_pfc_map; - status = hns3_buffer_alloc(hw); - if (status) - hns3_err(hw, "recover packet buffer fail! status = %d", status); return ret; } @@ -1758,7 +1757,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf) uint8_t pfc_en = hw->dcb_info.pfc_en; uint8_t priority = pfc_conf->priority; uint16_t pause_time = pf->pause_time; - int ret, status; + int ret; pf->pause_time = pfc_conf->fc.pause_time; hns3_get_fc_mode(hw, pfc_conf->fc.mode); @@ -1788,9 +1787,6 @@ pfc_setup_fail: pf->pause_time = pause_time; hw->dcb_info.pfc_en = pfc_en; hw->dcb_info.hw_pfc_map = hw_pfc_map; - status = hns3_buffer_alloc(hw); - if (status) - hns3_err(hw, "recover packet buffer fail: %d", status); return ret; } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-06-12 06:54:00.821768600 +0800 +++ 0169-net-hns3-remove-meaningless-packet-buffer-rollback.patch 2021-06-12 06:53:56.670000000 +0800 @@ -1 +1 @@ -From 47ce649fd30c89d95c420a015f9eef7f215bb386 Mon Sep 17 00:00:00 2001 +From aeaba9b829aa101839a4dd594abd2f05a24fbbbb Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 47ce649fd30c89d95c420a015f9eef7f215bb386 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index bea41156a4..8fcb284cf1 100644 +index e5b6915d17..69db900c93 100644 @@ -23 +25 @@ -@@ -1543,7 +1543,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) +@@ -1501,7 +1501,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) @@ -32 +34 @@ -@@ -1568,7 +1568,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) +@@ -1526,7 +1526,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) @@ -41 +43 @@ -@@ -1594,10 +1594,9 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) +@@ -1552,10 +1552,9 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) @@ -54 +56 @@ -@@ -1801,7 +1800,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf) +@@ -1758,7 +1757,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf) @@ -63 +65 @@ -@@ -1831,9 +1830,6 @@ pfc_setup_fail: +@@ -1788,9 +1787,6 @@ pfc_setup_fail: