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 A39F0A00C3; Tue, 16 Aug 2022 07:34:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 887D4410D3; Tue, 16 Aug 2022 07:34:16 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 315DA4067C for ; Tue, 16 Aug 2022 07:34:15 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27FL1k6s014562 for ; Mon, 15 Aug 2022 22:34:14 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3hxbfksvnu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 15 Aug 2022 22:34:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EtSKxu5O11trHlwVlQOOz+Mgcmm/ADmsGdHYKrvCgNsShnC4KWvpbxJm9rcLgHIwVElXmPadvaj+wf6hkiShur1zpgycom4nsL/GHLZmJVtwJYKMd0whWgso/QczISXJ6TPEKGVfUNFtowNwpQGTGo2Z963QCLGuRkEAikJQCKLvq7/0LtNPY0xcMI6cKY/V9GA4WyesPulS6D0VjjzCrNqPz81w62DJeY4loMYa09pQ3Sn2kHJkBKGHYMaZWRokBskg2zJ1lbbGLKYt4HBHQ8tiIWff6aDe8QJVHoaPxSH+gfu1M75xqHBJsnMdcxnatxOfKRfHv3Q775OqnGwjAQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=m6qnyEBzJ+utI9upYwN4PAMemad6DLTSLxlboA5KupY=; b=GYg5M1iXJUMjThhHEA+Nz3JYQtjIOI2t892GNULvYOv7/EsbR31sDP2U1UKiCOcjRDObkcYuqyAa2BiGBkCZbMLFLTMV+Jl7evn10cLwl9k52uso7vJKuCCQ0dI5X2ZBNlHuit383Ux0xbO+7CZLeYE4F9MKrjSjxUHd8/oRzC3JpdaybErVtfJ1fwAZoJ5Y42gGP+Afbn+DVMtwv8GEU/ooNPjR8sRg4+G3Omnoh85MCSLNB1M3PBuNgj2AGO+zHiuS8SWkdskbavmFjAiF1FaWXrZ5f7S4JPamqBSgGiZb7ykz4cb4V4P5P9ArpaNrnh/vEAD3E7jGfKfXrZz/6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m6qnyEBzJ+utI9upYwN4PAMemad6DLTSLxlboA5KupY=; b=hm9SA1cDllRU1FD4w/ivA22sdDYFt6/KjpuWHX2eg1nwxJqCYHOQe+NLwiC1eR6zr2yP07JBh7/qI6mL8S8OOV+XLC739psBJVlm5pyDx4XbbRqLnO/M6CsMVxV57M6l8zP3bVL4MVn+RpmgdaOOflfVEUzhjQ26h5UBXiMScGU= Received: from BYAPR18MB2423.namprd18.prod.outlook.com (2603:10b6:a03:132::28) by CO1PR18MB4713.namprd18.prod.outlook.com (2603:10b6:303:e8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11; Tue, 16 Aug 2022 05:34:13 +0000 Received: from BYAPR18MB2423.namprd18.prod.outlook.com ([fe80::9d02:201d:e63d:ada1]) by BYAPR18MB2423.namprd18.prod.outlook.com ([fe80::9d02:201d:e63d:ada1%5]) with mapi id 15.20.5504.027; Tue, 16 Aug 2022 05:34:12 +0000 From: Veerasenareddy Burru To: Sathesh B Edara , Satananda Burla , Jerin Jacob Kollanukkaran , Sathesh B Edara , Radha Chintakuntla CC: "dev@dpdk.org" Subject: RE: [PATCH v2 3/3] net/octeon_ep: support link status Thread-Topic: [PATCH v2 3/3] net/octeon_ep: support link status Thread-Index: AQHYoZpMmL5TdfaMH0iqsped3w/aGq2xIGIA Date: Tue, 16 Aug 2022 05:34:12 +0000 Message-ID: References: <20220727092134.141530-1-sedara@marvell.com> <20220727092134.141530-4-sedara@marvell.com> In-Reply-To: <20220727092134.141530-4-sedara@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 977fe1ee-a9a7-4f59-dfcb-08da7f48f3b5 x-ms-traffictypediagnostic: CO1PR18MB4713:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3TZtD8XM6BSSbOpQUD4U5QokdEjG9TKxBvv6ljgWtnSZxvqJ3UcV9J3CfnILKj1LUSw0ZcV1deih6PE5yAUBuXrXwYKJNy7jsv/J7ce0Xm5mHiq65Hv1G0WxGhlnFd9l2BWaNfFfsHUGeEfHh3SYQxTGXowo7mFq4Tcok1Y1XPP+OVPDJBGiWZWdrm6AK7G+xmB/qPEMDk2GVo5024XZaa9OKVbcb/gG00IOQSPE1d++wO7aODnyX507wn30Ziemd7Nspq1as5u6+tlXNzWwUn+8205PPTKJp4ZNPDWW80+b3dh/bKbGykbsjfeUynfQgDrp+wZQu+EBkqMAHMPssnHF7D6xGO0Z+uINGlgnqgNWzWubterhIN8VwLwUK4MaWdTqB0nmBuXf6FFAHsO6pWtWSny0AkWrReDKfZ/uJLkAyvNvstPp8gZu8sM20V4UfRiPOdvNmmxduawif7iugTz2lMjtK6UCgdEwdrwuGZdwUBpHHqSAoAdRX9z9NvA5Zhj7zEZW9LQYbqorF0kjWxQNBt/jkGA9gImqTniBQCI/59mAcFRIm3f+9OEH8SnyH4STMnNYk7XhomUNcYqbRUDf7CFgOptEYwftTmkAmFOp/LA/VIzKV4ZPWL4rAgrWlMzpQD/SwQHccgFIoaPkYn7U9rOsFjMv9dD2D4hrxlDbICYNXD4cr7DfBahe5tBcDacLOGD+4Oa+ffN5pdAqcHa4xCSaNEtrv/+aUm3OOWtu0s//QMkPRwo27Dh8teP5c7pt0vq8lRrzzoYDp7+WGctCvjUjOIqvHFWQupmIMJ6quk+vg5QC0y7J5BWs0gRX x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR18MB2423.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(376002)(39860400002)(366004)(396003)(136003)(346002)(83380400001)(110136005)(71200400001)(478600001)(41300700001)(52536014)(8936002)(64756008)(55016003)(8676002)(4326008)(7696005)(66476007)(5660300002)(66946007)(316002)(66446008)(6636002)(76116006)(66556008)(2906002)(122000001)(33656002)(186003)(53546011)(38100700002)(26005)(38070700005)(86362001)(6506007)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VQri6E2vBpLyoxYG/gDiQtrbGK09OSlPkTM9qQe86x/GQlfkMZSskzDf1gSt?= =?us-ascii?Q?sSnLWzS18oecfOAmFRQ0q5tUVWVuz6dhkpG1/ONZMBgo5ovmiv2Pr1Qx6J3j?= =?us-ascii?Q?XaQ1+OSxSK3c0/ES6q8ud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Q?fIEjxTqOqzzRgn9WxamPfWEOeWZjNw5X57T2y16rZjWm+Dr6+VzdVfsRhYG1?= =?us-ascii?Q?+eC98+/x9jZGT9vsMl5vBVqwb85CAFILoX0tk27uQMR7M0Ck9ASdc/7DPQMF?= =?us-ascii?Q?dqysTTSGJr7eM76sWfYJyVhLZA3eVHNHy6x0jw7ajvcFpLWwQasESEIvhB4U?= =?us-ascii?Q?6RgExIaXjRlmK6vv3Jwu9ukoyKXz8D8c0KPSNzVYVmYvwetdw9r+/rE9hoWT?= =?us-ascii?Q?hYfYJrQ1yvZdfvK/yz++YJyXuuXsBPd/1L8Xi5PIIRCTAmcgj8HH3+/tlCQT?= =?us-ascii?Q?hYkMoswN74GRhTGLc83SktQAyBzZu8ePQtYg5VllsEh2uBLE719U6BXE778L?= =?us-ascii?Q?8cdiTnjWnXfXLjDkNfd+bVAFl0Uohe1kCqgj21SAFFtzgmJlaONysqGnNxzt?= =?us-ascii?Q?FYqMv3B19l881D7dYQb4nuMC4rx/Hc2ogRzXbOWz0umICFjx8z+kxUf/MjxO?= =?us-ascii?Q?hg5pU9trdqgwr8yj1+KbbqmMcnEhJgp5agy4CpxSSqSsdFv2+8w+Mnr7DdZ3?= =?us-ascii?Q?z0Ao26WZNTk5Z8ae2ow=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR18MB2423.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 977fe1ee-a9a7-4f59-dfcb-08da7f48f3b5 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2022 05:34:12.9033 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 7WqSAe15JoAhaDM6Jfa8PjGoEQXDnShkxI2DWygvD61awN3UMpIdSAbg8FYrfYbd98B25XnjPaOext5TkbuDbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4713 X-Proofpoint-GUID: v9n0KtvmYwM8NINl8519X_S0l9AgAEnz X-Proofpoint-ORIG-GUID: v9n0KtvmYwM8NINl8519X_S0l9AgAEnz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-16_03,2022-08-16_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Sathesh Edara > Sent: Wednesday, July 27, 2022 2:22 AM > To: Satananda Burla ; Jerin Jacob Kollanukkaran > ; Sathesh B Edara ; Radha > Chintakuntla ; Veerasenareddy Burru > > Cc: dev@dpdk.org > Subject: [PATCH v2 3/3] net/octeon_ep: support link status >=20 > Added functionality to update link speed, duplex mode and link state. >=20 > Signed-off-by: Sathesh Edara > --- > doc/guides/nics/features/octeon_ep.ini | 1 + > drivers/net/octeon_ep/otx_ep_ethdev.c | 17 +++++++++++++++++ > 2 files changed, 18 insertions(+) >=20 > diff --git a/doc/guides/nics/features/octeon_ep.ini > b/doc/guides/nics/features/octeon_ep.ini > index b304ff8877..305e219262 100644 > --- a/doc/guides/nics/features/octeon_ep.ini > +++ b/doc/guides/nics/features/octeon_ep.ini > @@ -9,4 +9,5 @@ SR-IOV =3D Y > Linux =3D Y > x86-64 =3D Y > Basic stats =3D Y > +Link status =3D Y > Usage doc =3D Y > diff --git a/drivers/net/octeon_ep/otx_ep_ethdev.c > b/drivers/net/octeon_ep/otx_ep_ethdev.c > index cb45bd7a8a..77def6daa1 100644 > --- a/drivers/net/octeon_ep/otx_ep_ethdev.c > +++ b/drivers/net/octeon_ep/otx_ep_ethdev.c > @@ -387,6 +387,22 @@ otx_ep_dev_stats_get(struct rte_eth_dev > *eth_dev, > return 0; > } >=20 > +static int > +otx_ep_dev_link_update(struct rte_eth_dev *eth_dev, int > +wait_to_complete) { > + RTE_SET_USED(wait_to_complete); > + > + if (!eth_dev->data->dev_started) > + return 0; > + struct rte_eth_link link; > + > + memset(&link, 0, sizeof(link)); > + link.link_status =3D RTE_ETH_LINK_UP; > + link.link_speed =3D RTE_ETH_SPEED_NUM_10G; > + link.link_duplex =3D RTE_ETH_LINK_FULL_DUPLEX; > + return rte_eth_linkstatus_set(eth_dev, &link); } > + > /* Define our ethernet definitions */ > static const struct eth_dev_ops otx_ep_eth_dev_ops =3D { > .dev_configure =3D otx_ep_dev_configure, > @@ -399,6 +415,7 @@ static const struct eth_dev_ops otx_ep_eth_dev_ops > =3D { > .dev_infos_get =3D otx_ep_dev_info_get, > .stats_get =3D otx_ep_dev_stats_get, > .stats_reset =3D otx_ep_dev_stats_reset, > + .link_update =3D otx_ep_dev_link_update, Ack > }; >=20 > static int > -- > 2.36.1