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 377C9A0487 for ; Tue, 2 Jul 2019 17:30:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 27E601B9B4; Tue, 2 Jul 2019 17:30:47 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50058.outbound.protection.outlook.com [40.107.5.58]) by dpdk.org (Postfix) with ESMTP id 236421B99C; Tue, 2 Jul 2019 17:30:45 +0200 (CEST) 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=5MUY2S7gTnxaCKnhfSEUmKcj/PdfBuz8kuJSJd745cM=; b=rRgMkvMA1dWQe5ufFMBhQRTJi5/XL6ZSATDzbmsL/I05nqLBo8ynavQXOh6d2TlCZPmaLuJGlhqgrD9gv0/ZThUZrUnU38dVCJrtVfqzLaeDZmJAmWhw6isNoZTAtjcein1aDnUDPlTIldqWAKoLscshoWiWC6HRR3OksFTPsjY= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB4026.eurprd05.prod.outlook.com (52.134.72.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Tue, 2 Jul 2019 15:30:44 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::98d:75d0:486b:10ae]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::98d:75d0:486b:10ae%7]) with mapi id 15.20.2032.019; Tue, 2 Jul 2019 15:30:43 +0000 From: Raslan Darawsheh To: Asaf Penso , Yongseok Koh , Shahaf Shuler CC: "dev@dpdk.org" , "srinivas.narayan@att.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix condition for calling mlx5_link_update_unlocked_gset Thread-Index: AQHVJoTKD4vijfJ8HkqyXwTfk3bdVaa3iQvQ Date: Tue, 2 Jul 2019 15:30:43 +0000 Message-ID: References: <1560937965-448702-1-git-send-email-asafp@mellanox.com> In-Reply-To: <1560937965-448702-1-git-send-email-asafp@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: 21e7e891-2f16-4d0d-37a6-08d6ff023f80 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:DB3PR0502MB4026; x-ms-traffictypediagnostic: DB3PR0502MB4026: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 008663486A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(376002)(136003)(396003)(346002)(39860400002)(189003)(199004)(13464003)(81156014)(81166006)(74316002)(73956011)(6506007)(229853002)(6436002)(2906002)(53546011)(99286004)(64756008)(66946007)(66066001)(52536014)(6636002)(102836004)(3846002)(7736002)(6116002)(66476007)(478600001)(66556008)(76116006)(86362001)(66446008)(8936002)(71200400001)(14454004)(486006)(76176011)(5660300002)(446003)(55016002)(316002)(6246003)(71190400001)(110136005)(33656002)(9686003)(476003)(7696005)(54906003)(68736007)(305945005)(186003)(4326008)(256004)(14444005)(25786009)(26005)(11346002)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4026; 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: M+IhdQO+MUmVXx0C9m1LK9ug6xY9Oq2GqHRagdelhdaILFShu3sM15N1MNf4HLYXKtqQEdQtns1dNwWHkeFhS2L1WobnvXtUwB4GYihA9QZ57VqkemPYz8acQg88M1zhlku1c5geGuj7SP4gG9UUIUw7wjunB/XE+ZiwSdogTEyfU4zmm2is4p9bp1sFSIcjblQnRDRuLiQGJ/xOxTueejeHGiwV2A2nRrCQdCANJA5lTT0YM4y4MQnxxnz3d0+rFpV4ZiIkXe4DIMw3lKMQ7mQ626gcQoSyWEdQzucUWCUR7nx7ot48MlE43a+fIuq2Ac1GouGoTEv8xgFr61m4w+YAcOL3j0dAELK0JuWFikBwGaG/qR5SbSTub0q4WjlUO/L8YX9K38DNsiueZKfC1nt+L/qQaAn40H3jdx3Ewz8= 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: 21e7e891-2f16-4d0d-37a6-08d6ff023f80 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2019 15:30:43.7899 (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: DB3PR0502MB4026 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix condition for calling mlx5_link_update_unlocked_gset 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 Asaf Penso > Sent: Wednesday, June 19, 2019 12:53 PM > To: Yongseok Koh ; Shahaf Shuler > > Cc: dev@dpdk.org; srinivas.narayan@att.com; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/mlx5: fix condition for calling > mlx5_link_update_unlocked_gset >=20 > mlx5_link_update uses the newer ethtool command > ETHTOOL_GLINKSETTINGS to determine interface capabilities but falls back > to the older (deprecated) ETHTOOL_GSET command if the new method fails > for any reason. > The older method only supports reporting of capabilities up to 40G. >=20 > However, mlx5_link_update_unlocked_gs can return a failure for a number > of reasons (including the link being down). > Using the older method in cases of transient failure of the method can re= sult > in reporting of reduced capabilities to the application. >=20 > The older method (mlx5_link_update_unlocked_gset) should only be > invoked if the newer method returns EOPNOTSUPP. >=20 > Fixes: 7d2e32f7 ("net/mlx5: fix ethtool link setting call order") > Cc: stable@dpdk.org >=20 > Signed-off-by: Asaf Penso > Reported-by: Srinivas Narayan > --- > drivers/net/mlx5/mlx5_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_ethdev.c > b/drivers/net/mlx5/mlx5_ethdev.c index ac0500a..61e12cc 100644 > --- a/drivers/net/mlx5/mlx5_ethdev.c > +++ b/drivers/net/mlx5/mlx5_ethdev.c > @@ -947,7 +947,7 @@ int mlx5_fw_version_get(struct rte_eth_dev *dev, > char *fw_ver, size_t fw_size) >=20 > do { > ret =3D mlx5_link_update_unlocked_gs(dev, &dev_link); > - if (ret) > + if (ret =3D=3D -ENOTSUP) > ret =3D mlx5_link_update_unlocked_gset(dev, > &dev_link); > if (ret =3D=3D 0) > break; > -- > 1.8.3.1 Patch applied to next-net-mlx Kindest regards, Raslan Darawsheh