From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AE48FA00E6 for ; Mon, 5 Aug 2019 17:16:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 85CD21BDF0; Mon, 5 Aug 2019 17:16:51 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130088.outbound.protection.outlook.com [40.107.13.88]) by dpdk.org (Postfix) with ESMTP id 029A51B197; Mon, 5 Aug 2019 17:16:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GzvFUv4dd5YxPdh20eIo3neKPmOoWnGmws5ca+CcLTq+ZpC7p+RoaEk46qoFSk6N42i2C64wF1tjj/CzF+S/v1aRii9Uy9QiVzF2LuTKgrFwgbkjr8SvegLHyldSuEEjgpUhqJcI/uW18FEDAUerjcxDKjJRMIGj15hMIOrWMYdc1Bq2xuX6MDUP5Zhsx6BFQ4jULufCTEpb391uFvgSNbtjIJ8gzU1K/suoUzRZ+LPHgl80WB00pdOuGw1fHdcKtSSMkUMJsoZ4N8JW6RjqJQ8ofDWUhGDJU3LB9o6DGyWA/TzfKane7mdQXbLBd11enMTIucX2jWEj2p1rwPqVSg== 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=6Ty/Vyfp7+YagH9g9qYf95BywSZlwUX4hqFnFdBUrUo=; b=FA8FdWH8SpK0mQwdamT7fkgmd13gP6C00leDxYQ7xVXDUOGDERp3E5SEg/8OVRDg0C3/bN38B1XZ2TRdNrbwE1Vv7dduzJy9Ix3toXkK7dHWE7biXzmf+MYbqCMcQuhcRIz/73yNVju2uvvJSd1TG1PLhsMRSOg4vV3LuJiQXhuvsXXlaR7f+WdkY5bcWUMW0FTPtfKhknH0tMWbPvcBkcpITZvB1CHxtwbRL/Wz412EqbA3RQGvYgABEka5jYLLyR1iprOjdB/2whoqVmDveb+y8/+N7Q7T/EToy385OGqIaw2U89G6q1mMqeLEQHR+BU53IVpQda4dwVlTmK6jLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=mellanox.com;dmarc=pass action=none header.from=mellanox.com;dkim=pass header.d=mellanox.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6Ty/Vyfp7+YagH9g9qYf95BywSZlwUX4hqFnFdBUrUo=; b=LV+XwaND2c92KsAHCZH9FG39zX6sfZa7iPGkYQAwFKuct6mzGPe+prx/FLdPObUnpqRMPxd+VB2M64EEGLGgwq1X+pxTeRIOvQllvqsxbaabUtHqcN9dg+TN/KuKmx2ezWXIfizuhJr2Icwf4RjYwg/qGw35aBWvLGo3w6/SRMs= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB3994.eurprd05.prod.outlook.com (52.134.67.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.13; Mon, 5 Aug 2019 15:16:48 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::b4f2:f531:d3ff:b7e3]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::b4f2:f531:d3ff:b7e3%5]) with mapi id 15.20.2136.018; Mon, 5 Aug 2019 15:16:48 +0000 From: Raslan Darawsheh To: Jack Min , Shahaf Shuler , Yongseok Koh , Slava Ovsiienko CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix link speed info when link is down Thread-Index: AQHVS2Qadtyh1iICQ0KuLGTeACGxqabsqsHA Date: Mon, 5 Aug 2019 15:16:47 +0000 Message-ID: References: <4b0167f58ced8ae76262b0accbf14a4653b29283.1564991888.git.jackmin@mellanox.com> In-Reply-To: <4b0167f58ced8ae76262b0accbf14a4653b29283.1564991888.git.jackmin@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 36549bfe-ac2b-4422-92fe-08d719b7ef55 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:DB3PR0502MB3994; x-ms-traffictypediagnostic: DB3PR0502MB3994: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-forefront-prvs: 01208B1E18 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(366004)(376002)(39860400002)(346002)(189003)(199004)(13464003)(81166006)(52536014)(5660300002)(33656002)(66446008)(64756008)(66476007)(76116006)(71200400001)(68736007)(71190400001)(66946007)(66556008)(7696005)(26005)(186003)(81156014)(8676002)(66066001)(99286004)(8936002)(7736002)(305945005)(55016002)(2906002)(6116002)(3846002)(478600001)(6636002)(25786009)(450100002)(4326008)(102836004)(53546011)(53936002)(6506007)(76176011)(316002)(9686003)(110136005)(54906003)(14444005)(74316002)(14454004)(446003)(6246003)(11346002)(86362001)(6436002)(229853002)(486006)(256004)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3994; H:DB3PR0502MB3964.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 7pcfzvURSAocPxhpmT4dHCDAdLKxLwUK9ldVI0bSzBRoAfEBOPuUHAS/OadxxGo28Y9Fx1gD2uxTbRusBC8S9CrZ54wGa/alZu3d3tQ2/j15SC6RC1uukkmJ8QUlt3rIlerVkUGvN9Una27m0G5GguNlDpTjPnZXPJBtVxCLtSpfjUDGzKC4T/IE8NrD5dCjQDf95uYKUhPdmyfsgwAdkM3OiAlLENhqN0IOjR9zTWdPxzLZq1LeYons2UOzEKQJEeJgnBE3T8dGFqUwyKpBtTQY/vKLsC7Urv7FT/Lqq9HFk1vtaBDHdWU6h76APyDYj7xl6VCuqMZm83fLf9tXNOoLoRDlV4/+L4TrpVcuMyc1JCfx7sIIY1a+TWEZiGvMucWsiiVFMjtUjkUo3xbKPTA9zBpT9s4YMmpvmT60/u0= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36549bfe-ac2b-4422-92fe-08d719b7ef55 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2019 15:16:47.9667 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rasland@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3994 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix link speed info when link is down X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, > -----Original Message----- > From: dev On Behalf Of Xiaoyu Min > Sent: Monday, August 5, 2019 11:02 AM > To: Shahaf Shuler ; Yongseok Koh > ; Slava Ovsiienko > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/mlx5: fix link speed info when link is do= wn >=20 > When the link is down, the link speed returned by ethtool is > UINT32_MAX and the link status is 0. >=20 > In this case, the DPDK ethdev link speed should be set to > ETH_SPEED_NUM_NONE. > Otherwise since link speed is non-zero but link status is zero, this > is an inconsistent situation and -EAGAIN is returned, which is not right. >=20 > Fixes: 188408719888 ("net/mlx5: fix support for newer link speeds") > Cc: stable@dpdk.org >=20 > Signed-off-by: Xiaoyu Min > --- > drivers/net/mlx5/mlx5_ethdev.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_ethdev.c > b/drivers/net/mlx5/mlx5_ethdev.c > index 9629cfb333..33a32fc2fa 100644 > --- a/drivers/net/mlx5/mlx5_ethdev.c > +++ b/drivers/net/mlx5/mlx5_ethdev.c > @@ -908,7 +908,8 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev > *dev, > dev->data->port_id, strerror(rte_errno)); > return ret; > } > - dev_link.link_speed =3D ecmd->speed; > + dev_link.link_speed =3D (ecmd->speed =3D=3D UINT32_MAX) ? > ETH_SPEED_NUM_NONE : > + ecmd->speed; > sc =3D ecmd->link_mode_masks[0] | > ((uint64_t)ecmd->link_mode_masks[1] << 32); > priv->link_speed_capa =3D 0; > -- > 2.21.0 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh