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 80FFBA09E0; Sat, 14 Nov 2020 22:36:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2C9EFC88E; Sat, 14 Nov 2020 22:36:00 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by dpdk.org (Postfix) with ESMTP id 8AC2FC882 for ; Sat, 14 Nov 2020 22:35:58 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sat, 14 Nov 2020 13:36:05 -0800 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 14 Nov 2020 21:35:56 +0000 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.49) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sat, 14 Nov 2020 21:35:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N0SHyoNj/hlQr94eK+rpL1mjDA7aGrOfUsAZdOVgqOh+/jj9XCAW6Lu5dkVdJ43kC7y3E5qQ+iM/LOYJney1oCgd5OpOqvIIkj8HjyS+AvvXhH2ToTPbCBdFtNilCFRTOiM6FCChzVYndWQ5EV9hsIB6mk5yLGQ0qu6OVWfBP2XGg94FG+VsEC/xnP/nlzjqL/xXuRR/KT0X5hiNRiWJ39YCj95fNRAG+SMxfEISFI/uqa0AHSjDPiRXCzA6a4Uag4NwDU0s7ZpSPSwO/M6ZnpTmLt6b9lq8vXmiXCjRlt5THg7tL/nxcEnP/euAHYVKe/X5ye6YPPGtXKgbNsictA== 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=OhvLtA+9LbYDkUDm0/I9gZL8jqAFcx6hGRJw6/niokk=; b=EhtrMCJHfx/bXddXrZUijOx5mmGoAwOCd5AI/3IBD6usrPKkzAogOXP2qiKXgz9T3CrYHT7aMxC/3hkBhr+mfoQjiG2+4w4HgIFayWjwe5Vnx1TTe6JuJVyYUFT8XN54vDX5zoJWNDK0D1txUvVZxSTYCIXWyw6qQEdMR0KiYRLzEosnr9Jraxqp/fdm5dWSn2RbOQVWULGgjejNyLgMseTfdmnXnnmt+rTpvZf7mX++LQA7wT0zYANTQVC0a1PAYLbVzhcQVCJoOe3l96LWxH2HCPNvP93c9d5VdIOH8nS5HRvqkV26WOjf8uZYR2bojTrrd0CAOhtIcTcglrLSlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from CY4PR1201MB2548.namprd12.prod.outlook.com (2603:10b6:903:d8::18) by CY4PR1201MB0183.namprd12.prod.outlook.com (2603:10b6:910:20::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Sat, 14 Nov 2020 21:35:53 +0000 Received: from CY4PR1201MB2548.namprd12.prod.outlook.com ([fe80::bc62:8762:4cb9:52dd]) by CY4PR1201MB2548.namprd12.prod.outlook.com ([fe80::bc62:8762:4cb9:52dd%12]) with mapi id 15.20.3541.026; Sat, 14 Nov 2020 21:35:53 +0000 From: Tal Shnaiderman To: Narcisa Ana Maria Vasile , Ophir Munk CC: "dev@dpdk.org" , Raslan Darawsheh , Matan Azrad , NBU-Contact-Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v1 48/72] net/mlx5/windows: support link update Thread-Index: AQHWrL3nWC1KfqU9P02tQLV0O1jMf6nCI3QAgAYfHrA= Date: Sat, 14 Nov 2020 21:35:53 +0000 Message-ID: References: <20201027232335.31427-1-ophirmu@nvidia.com> <20201027232335.31427-49-ophirmu@nvidia.com> <20201111000614.GD9449@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20201111000614.GD9449@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [77.137.114.72] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 700e3d31-fb60-4ce9-65a6-08d888e54379 x-ms-traffictypediagnostic: CY4PR1201MB0183: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oWsnHwo6euoWkueq1j38Xy2JCD+GIEyxcakdNasjMboucbG6cCVZXdIlOskIT+5sZYYbmNqM3YSa8VmXXaiKkO4UbrAwRD6eOPuI3ND8AqI0bG+6F32NysMpG1hVsfDyxLe748YvPsWcJXg4h6a+hNiU3hqqtWHYRn9S7j/+QRZyWYDd1S+bLaB72Hb9DHPGuO8blWM0Vf5hPT2KD9tKJ3ZgO53KJSzPxrA0t5DMLjZQDQ1IuKiW0t8VcqYQHNPssaM9vPlGg0Kvm16UvvRR7THGcwsbwQSdigfSA9Jzj4fKAceWHITjP/naJT8xnyiwH7SX4DTYEQAWIbltZ8P4jw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR1201MB2548.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(39850400004)(346002)(136003)(396003)(366004)(54906003)(71200400001)(6636002)(6506007)(316002)(110136005)(83380400001)(55016002)(8676002)(8936002)(5660300002)(64756008)(7696005)(33656002)(15650500001)(66946007)(4326008)(66476007)(66556008)(76116006)(52536014)(2906002)(66446008)(478600001)(9686003)(26005)(86362001)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: P9nUjl5zJ9x88OboNjwICQH3/PW9wWBFKXr/gMqS+meiWRNFXi2T7svAEsOb27h0UgC3tbnuq4HN00L1bmfq2/GkbhWKJ+UlaWN4tT0xpWMF+Ual9c7uu0z7dxz0A1iOCC48wkE3wX7DDXKtJnV+y4BJTHqEeIOY/Dvr2VQzJbjo+AaSKBh17uvhznIPD+GJR/7M0JYEueXfjbNaQEkBhP4DKz3hftqO0AL3BOGJA1a0C6ji3Hx/dWcJ+jG6Dw/+6DoLwShiGOH6FwQsb6b6LOBirJ4EtumgzsqGfT5QQ/HcQA/2Ptph+M3pN5ZiohRnwg+KWgVN4UTRqVpG74X3IkaRWC+wLf2XDrbFKPJxDyZxwWUhCBn496ub+DdnnDHViIgwXxTt6eKwEunYa1Cb964RvJEVW1EJCeNOenXb2JOMlG27sOVB1az/EEzyz7UbZP2WI4BYQv5dUtalvChTO5mrZi7ocwgWBRxTj/O/CwZ2A1sMc1ijc5e8GY3xOojU5KzLIzvBEZNMjwlQGwgyciCFSdMfNIqNhHQUX6msX05EwuSBeea2CEZiP78aKIOcDqZhI6qL2e52njwmjllt/ZlPD+63AzPQb7FAiJHC+gMKxQYwQHjv7yv74MBwnU5s1NoFJ3Azf9s3DEJME2DWtHlQubqY6IlPloFin4bMcPlM9J468ntr/VLz6hHbL2uKfpprpaFG/Uwupq7nha+7rqodeZX9E3pDwurIyjQw8ATyKYmSqQLlDSc2Sa64jBu0rAmu4VFwx5+m9Ffm5hAstRhcKAk9UUxhfOu6GBs5IjUQkxVlO3UnLKdCwx8Z/sAsjO1Nca3ZMTF2PoCFUV/lE/G8jab2RmsilZ2BHiS8kJ0r/pR86ILxe63NvoQ0BqOOgiEuvxbm2gIiceWNBoz4OQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR1201MB2548.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 700e3d31-fb60-4ce9-65a6-08d888e54379 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2020 21:35:53.2323 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tGl5kFOExo/xsUwdiiH66TE75mghsY00hIpuefhG0exyg6cvMJQckxL4KURrdVWBTCavIbj+C9y6wd20p801Zg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0183 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605389765; bh=OhvLtA+9LbYDkUDm0/I9gZL8jqAFcx6hGRJw6/niokk=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=k7an3BnZDtXb15XaqLB4gVP6EtiJAUO3OXm+vokuqaA5UruKSINcgI48zW/NMevUH S8L+FMJHOkRG/uDgbzmKU/RTW1r6Ashi11iQFrDx3AMRq3qJYwdRsgrHWqDKKKxH4W Ghq64zhHsUQL3RLgOnH9sOcceHg/qAaTLpyW4srAJwzkmeh0ij04nGWcm3Dwni9CKF RGwDE+oHL3e8jPsMs3meZ2O5dY4YMSui8CT+k6aFvKh5H8nsLnKKZoe3ZHjjp2HBvq 0Bswn/xxGCn9IZ2ffjtBduDoD7DQuChXVrdveN9AZ/L3pq/hM9FqinrBhsf/H2nuSS onNnVgkcubTTQ== Subject: Re: [dpdk-dev] [PATCH v1 48/72] net/mlx5/windows: support link update 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" > Subject: Re: [dpdk-dev] [PATCH v1 48/72] net/mlx5/windows: support link > update >=20 > On Tue, Oct 27, 2020 at 11:23:11PM +0000, Ophir Munk wrote: > > From: Tal Shnaiderman > > > > Add support for mlx5_link_update() to get link speed and link state. > > Other parameters are currently hard-coded. > > > > Signed-off-by: Tal Shnaiderman > > --- > > drivers/net/mlx5/windows/mlx5_ethdev_os.c | 39 > > +++++++++++++++++++++++++++++++ > > 1 file changed, 39 insertions(+) > > > > diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c > > b/drivers/net/mlx5/windows/mlx5_ethdev_os.c > > index 4925fd8..0c45101 100644 > > --- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c > > +++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c > > @@ -171,6 +171,45 @@ mlx5_os_read_dev_counters(struct rte_eth_dev > > *dev, uint64_t *stats) } > > > > /** > > + * @return > > + * 0 if link status was not updated, positive if it was, a negative = errno > > + * value otherwise and rte_errno is set. > > + */ > > +int > > +mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete) { > > + RTE_SET_USED(wait_to_complete); > > + struct mlx5_priv *priv; > > + mlx5_context_st *context_obj; > > + struct rte_eth_link dev_link; > > + int ret; > > + > > + ret =3D 0; > > + if (!dev) { > > + rte_errno =3D EINVAL; > > + return rte_errno; >=20 > Should this be "return -rte_errno", as per the function description above= ? Right, will fix in v2. >=20 > > + } > > + priv =3D dev->data->dev_private; > > + context_obj =3D (mlx5_context_st *)priv->sh->ctx; > > 2.8.4