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 3D090A0A0E for ; Mon, 10 May 2021 18:13:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 338CD40140; Mon, 10 May 2021 18:13:32 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2081.outbound.protection.outlook.com [40.107.243.81]) by mails.dpdk.org (Postfix) with ESMTP id 7AE8D40140 for ; Mon, 10 May 2021 18:13:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AASU7Pmv/zUeq9lknQQ8MEX1IWvkHJLNqS47+DYMwXQilBihyVNT/EAWMDYhi5NYTwIz/faS8DRKPxUiPa20w+4ELelTJzOCWxtySabeKvqSfDl7zGiPqVBmxgzcQEeLLL+PlGpIomAtrBQ2LdIDSB/NX7ku0ZZAL/7tX7B+qKqLqrJt9WCbWU1vKYtoMauYznlFnGICSZ2+k8KZLt2kkiYWtb9pfLblnOvAiRSiitN4qhbRgdVRi5Pg3dQKUxQ2TIli4ckY9qJHfYIlqLgW12FYZKUb2YvoruTnrLNZbE1pxp54vpS0E0gP3oGhFHH0aMRyAykAboUjyRCEOLPxSQ== 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=2EUkNICLm0QBoRKArzGGpe59J7QOMUQJzC36ujM+epY=; b=h9seZaL4KSHw9zaW71eumbRSLNRR/XIqKejuZvd7z6NJgCUnQyj6pRtKHpS9ndZYQfIt+w1wJI4fsgncQ3DKjX0OMBzBFacZbAAW/LifvNamkEp0ZDRBvTDeipjsLItB2dOL/4Nv5loFX13VyOc/DIOerXxkFT15nYQBqHnrBB2PZusA4syP+6zt0TF29I0tmU+qKkB3LSY1d6kAe0RGckMu91QZcdjHWVCmWdlPwmKZiSOo8EUakTc4QGIn3Qow0DAMx/PynsjLHT04EdWmltlb8d28/bBeIk++p46JjojFwixl5tdYbySx2z62BnLsx+Ucarm9BMNegsnMFcLFRQ== 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=2EUkNICLm0QBoRKArzGGpe59J7QOMUQJzC36ujM+epY=; b=iLfXm9dChimvK5BM6tFyv+7L56sHBxa1lnyWk3iXNbUYFavpJHf9xDgbgi+BHjf5S8uq+hMy/aaVsP7vv/yshGaIJaf2XXovz+cnzrRiNGSA5J+VdGB0WXvVTltfZD9YI0lGtP8NvNFq39pknDSKQ8bX3NEVhTqEtKPdiIh6WrBTevwYdJ5JKD+ZdiBiQ6uVuhjpIHSvzrAAQIe+DrM4Cnu/gjFkcBe6UTTM9mluLtXBVcPRpPCG9YsENAFsu2VCCDKABAZJal42ziJoJbHGWq3f6q4zT1Gl+/CfK7he9MKVCnEmruLb55rU74pWUh88W+gwUUTZsMpgAXsroLkqoQ== Received: from MW2PR16CA0027.namprd16.prod.outlook.com (2603:10b6:907::40) by BL1PR12MB5270.namprd12.prod.outlook.com (2603:10b6:208:31e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24; Mon, 10 May 2021 16:13:28 +0000 Received: from CO1NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::ed) by MW2PR16CA0027.outlook.office365.com (2603:10b6:907::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Mon, 10 May 2021 16:13:28 +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 CO1NAM11FT022.mail.protection.outlook.com (10.13.175.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:13:27 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:13:24 +0000 From: Xueming Li To: Huisong Li CC: Luca Boccassi , Min Hu , dpdk stable Date: Tue, 11 May 2021 00:00:53 +0800 Message-ID: <20210510160258.30982-104-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 32af1500-347f-42d9-c170-08d913ce8b6f X-MS-TrafficTypeDiagnostic: BL1PR12MB5270: 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: j6V3QuN0k4y7amKz+ZuTF/073U31MWuhwoDGE/NWAyt/ZECOCJm76Fh+Ma7/S+jDY78CFfhU6O7agEjp4SVmlp9k9ilNc94UGYA1Szl3aFyWe6qKx4Cn1PFrag9wbvUhFex8uTeM7EZ9mMKfJtvWxxpz6E+jCNKBlthUSLnvKEaYOKcOWIMdSa/ktzGOqpUBHYKxY93ZoNuZbnvS0YsOpUNADg4ScaZGP/HpHUxDxaD+YYGhd0zvvPQuldtWaFaqC2Nx9oAa86EMWtYQ1FOOoiql9VlXhs/6Xs7tOL9LZvcRmU2NNfs6FxAUqwTv5flaERDa1xuquz5ZaV2I4MsnbLRIzBOa25Q3dKbnEgxyxROEPGqswUR4UjUnWuOq5XUhKh+ey1E1/cUIN9yxm4SE0GtnnmlnFKDb3X3TtGa4qXYM1HLdw16xvbdbQExRbnRlZjgx864n6xpGFfNfpIPP9JyDkmX5nDF2F17dNO7JdbPaqDPvJxu/4vPdQbKO90tR03fvNJGPrehDlag0iOXJc4NdFWsVV6+W7twCAfyb/QKsugsWQ+S4v03cFFLlLQ07AIzpsB0kZZPG42+BBlxmT3JNtPqWyRjLJBQg2nT/QlhZOs4r8ZiSD1y5xIXdYmFTcJqqCpRS64HhcJ7GFsb+u5osevOGsUKeDJOw7Sdq2W4ajRbxD3QsNtkUkT7PKJfzy3SdX2/PzkR+yX2zFgHziaG5Aakght65CEmGW06Klo8= 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)(46966006)(36840700001)(2616005)(2906002)(186003)(16526019)(36860700001)(54906003)(70586007)(6916009)(70206006)(47076005)(7696005)(36756003)(6666004)(55016002)(7636003)(356005)(336012)(82310400003)(8676002)(498600001)(5660300002)(36906005)(8936002)(83380400001)(26005)(1076003)(86362001)(426003)(4326008)(53546011)(6286002)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:13:27.2104 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 32af1500-347f-42d9-c170-08d913ce8b6f 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: CO1NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5270 Subject: [dpdk-stable] patch 'net/hns3: fix reporting undefined speed' 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 05/12/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/e29b92b99820f2873b218da9c6403221f907e830 Thanks. Xueming Li --- >From e29b92b99820f2873b218da9c6403221f907e830 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Tue, 23 Mar 2021 21:45:51 +0800 Subject: [PATCH] net/hns3: fix reporting undefined speed Cc: Luca Boccassi [ upstream commit b6579e3db794be36637a66e009199a1e7451e995 ] There may be a case in future that the speed obtained from firmware is undefined (such as, 400G or other rate), and link status of device is up. At this case, PMD driver will reports 100Mbps to the user in the "hns3_dev_link_update" API, which is unreasonable. Besides, if the speed from firmware is zero, driver should report zero instead of 100Mbps. Fixes: 59fad0f32135 ("net/hns3: support link update operation") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_ethdev.c | 5 ++++- drivers/net/hns3/hns3_ethdev_vf.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 8f4ce58c0b..d8158cc56e 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2658,7 +2658,10 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, new_link.link_speed = mac->link_speed; break; default: - new_link.link_speed = ETH_SPEED_NUM_100M; + if (mac->link_status) + new_link.link_speed = ETH_SPEED_NUM_UNKNOWN; + else + new_link.link_speed = ETH_SPEED_NUM_NONE; break; } diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 9c84740d7b..366a1afa7d 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2072,7 +2072,10 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev, new_link.link_speed = mac->link_speed; break; default: - new_link.link_speed = ETH_SPEED_NUM_100M; + if (mac->link_status) + new_link.link_speed = ETH_SPEED_NUM_UNKNOWN; + else + new_link.link_speed = ETH_SPEED_NUM_NONE; break; } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:29.317427100 +0800 +++ 0105-net-hns3-fix-reporting-undefined-speed.patch 2021-05-10 23:59:26.490000000 +0800 @@ -1 +1 @@ -From b6579e3db794be36637a66e009199a1e7451e995 Mon Sep 17 00:00:00 2001 +From e29b92b99820f2873b218da9c6403221f907e830 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit b6579e3db794be36637a66e009199a1e7451e995 ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index d392f6d109..73b96c18d1 100644 +index 8f4ce58c0b..d8158cc56e 100644 @@ -27 +29 @@ -@@ -2725,7 +2725,10 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, +@@ -2658,7 +2658,10 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, @@ -40 +42 @@ -index 30788f5c32..6c3ddcc50e 100644 +index 9c84740d7b..366a1afa7d 100644 @@ -43 +45 @@ -@@ -2123,7 +2123,10 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev, +@@ -2072,7 +2072,10 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,