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 A51CAA04BB; Tue, 6 Oct 2020 19:25:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0BA9A1E35; Tue, 6 Oct 2020 19:25:46 +0200 (CEST) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by dpdk.org (Postfix) with ESMTP id 6A21C1C01 for ; Tue, 6 Oct 2020 19:25:43 +0200 (CEST) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 06 Oct 2020 10:25:29 -0700 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 6 Oct 2020 17:25:37 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 6 Oct 2020 17:25:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ifFdy8Pvp7LUnjKIEfmKzVBKlE/Wg/vcMDdV9yxQj2YmqeCFFQ/BBRhzMsueWV8ewRbtRepD7KH19/Ux9RL94JVRAzTKgvSTa8gQq5u1Dlg5XbgXQ2p4TetvNEQbLdZgStY30YQqIsrbZ60MfpE+TRump+NrecxoVQl33XSe2hXIzxm56SJuvvwrBz05zRNTIVpHPZgQk3rEzXThMGPhGMteZKH67S8lUk5nMWiQkBgOUm6KhT76A25PKHfJUZXuR78WNPN9j3ozBFHXkKY9k70U6uSmNwoL/8iJBgpTTjFuYZvj5H3QVArWS/Oe3WI2SL7FUa6UgzMsH8/kVuXk9g== 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=aTObIgk1HlJi1NVz8NI20E9Q/5plzFHFmxTXbvzaWyU=; b=Q1T8aPYxaDKpLGzM8TwJtuMqUbR+yaVz5aoi9GP0dJSNaGIv/nPDMeOHAfQcbi6oSqKEdqhICQxIhrCgH8WgiqjWuIvcKMoRyTsoCCe4LKP/H15mUu71NUWl208Rzr5+4l/9nYos5FvIV8BpNBl6eeqWLAahUEfDvGL8dzBgSRWuI1wn0vtK0dIXcV6Y2Tz+qR04AWU2d4X7Anf9uObMO4FpSQyLHT1WttrRfZhpgyCpDUrzEkwHAVr00097QP6uuzHtwUee3o4thHClTZ0naME+ZqHLD4yN6h6cNCWPQdmSyqxufidLAWI9Omy47IMdghUFxAjX3ak4ipDG71LPcA== 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 DM5PR12MB1161.namprd12.prod.outlook.com (2603:10b6:3:73::16) by DM6PR12MB3177.namprd12.prod.outlook.com (2603:10b6:5:187::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Tue, 6 Oct 2020 17:25:36 +0000 Received: from DM5PR12MB1161.namprd12.prod.outlook.com ([fe80::b0b9:2a96:7ad7:9a93]) by DM5PR12MB1161.namprd12.prod.outlook.com ([fe80::b0b9:2a96:7ad7:9a93%8]) with mapi id 15.20.3433.045; Tue, 6 Oct 2020 17:25:36 +0000 From: Ophir Munk To: Kalesh A P , "dev@dpdk.org" CC: Ophir Munk , NBU-Contact-Thomas Monjalon Thread-Topic: [dpdk-dev] [RFC PATCH v4 3/3] app/testpmd: handle device recovery event Thread-Index: AQHWlyQGN05SfUS/PUWfiKItd4eun6mK1sXw Date: Tue, 6 Oct 2020 17:25:36 +0000 Message-ID: References: <20200122101654.20824-1-kalesh-anakkur.purayil@broadcom.com> <20200930123314.27669-1-kalesh-anakkur.purayil@broadcom.com> <20200930123314.27669-4-kalesh-anakkur.purayil@broadcom.com> In-Reply-To: <20200930123314.27669-4-kalesh-anakkur.purayil@broadcom.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [84.229.96.120] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 23a66853-45ef-4b28-9d8f-08d86a1cd6ac x-ms-traffictypediagnostic: DM6PR12MB3177: 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:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: e9pBZCmSyiGZ8QIdnAGBa1i4+TEKPSp32NFHjFYMoJiVZ7rhgLzkWRYBYNWNapOPmQU+1DRqYBz3T0giGgObU4Bh9ZdXtrIhpqnBLNWGNsgVG+tgI+pNH1tW5UyO9RlEiP45oNtTeewcLqughEA+BGWS8vjKXeBMv7luAR5bHd9jSjr3ljDBg4GRCFCenxHWikuZ+Xig8Cfd+zlmrta1qigzcoNN4BYHkMivXpWTk/fKIvV9UlWNCzqllA0XRl1Qbe/tKSohepZFUIQKWDl1bWEnDMN/b6GNQz0gljfM99BDGgmEEBC26ywFEX0Nvq/aRNWwzTaracFCeXAPwpYlcA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB1161.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(366004)(346002)(376002)(396003)(8936002)(54906003)(110136005)(316002)(86362001)(478600001)(83380400001)(4326008)(2906002)(9686003)(7696005)(33656002)(52536014)(5660300002)(6506007)(53546011)(71200400001)(66446008)(66556008)(66946007)(66476007)(64756008)(76116006)(55016002)(186003)(26005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: w8ng2LpqhrvcYtru2VNktuPLZsTgdmXdmpvdVxgAVXmmX9Ox6c08jNM2oWhSP8qexN1jUmJrpKr7VF8gCSNOVkfxFEM3cuxSPfAOU2+kNKkRHjVwa2+wMxQsiBoggvAIfT1UElPAwge0WhjmGEMPChe9Iw4YW+xs0AdvPyYNYfNYcgsik5sC5qxgKlLSCPOxzuBlVW2ZwComVmsSLVDXFfsOtAce09YTpy1CcdBZpEWN0V+uNFtSwfuUabdaAMzwQq5Ma69jbrfbtK0zn0Zjt2LCrQcRPLnE5s1+SYSqmthRBtGuNbJ2IrOHWPcSEMZ0KoAINSHuGS8SM7x/TlV6yk8uLt5Ug52pyWFNk3WaRQwn8RFWfI6MyHnn4o4VRplCzvkiHkpUuRytULOcZztoGz33H4b//leyMLeWuFJDC85cxFy+K19wd91qlge1/O5PZ60608IiJILRAfv74Gjqim44LAS+/bK9yjnjVkSObi4dRNc/LcMxz+K3wZ2mS3EO9NCmtWNIR+lSI6Q07ovQZI0/CqJ9DFeGN+dOvvQ/hyXyYBpcq1iAhfO6UELPManZ/1RMVS+SfwU/dDFmy9nAxn/1tetE0cy/kq/Rk9B7hTBGsVmLrAmNwcqQ4ZgCj8CX/hSPwaKGuVqiypZB4CiatQ== 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: DM5PR12MB1161.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23a66853-45ef-4b28-9d8f-08d86a1cd6ac X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2020 17:25:36.5270 (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: an3UP1mIhuriXXj+LYllW6aps7YdXi4k5PQWujaFHY8IWig1isNZ/K73X3Xb3wBW/cI1Otw2tP8VSlsr2OG4Ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3177 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1602005129; bh=aTObIgk1HlJi1NVz8NI20E9Q/5plzFHFmxTXbvzaWyU=; 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=eh12J8tG6UCQOGPQOFaii579SmeD+eeg4OYHBXnMp2pwJM6cSB1c172JbY0sgX2z0 oh7/U9MNXSE20R6RPcFVkw7p4KghN4JCgyHVHbN5GY+LEKj2FXE2RIStq4k1s0Sf+a h0C4XumB0Jcxx+PGum7Eo7oj3h9J3OHfCj03xu/FJyI/+gxUD2Zb2Jh5zkTY7CQL8p LnZEyQ4qH8s89UpIP5TkwZzdkItguuEGewc347bgI8Hp3AGgcmaiq2lXit+InQpdeM lPYCecb1m54AfW43W5sz38Huc99cryEkDU7MVnCHBG91qBXzYHaMgEiTyeGTL0UuCi UGVpDUdy92+GA== Subject: Re: [dpdk-dev] [RFC PATCH v4 3/3] app/testpmd: handle device recovery event 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 Kalesh, Please find a few comments. The name you gave to the event (EVENT_RESET) is very close to an already ex= isting one: "EVENT_INTR_RESET". But they are different. EVENT_INTR_RESET originates from a port reset. It requires application reac= tion. It is widely used. It is documented in *.rst files. EVENT_RESET originates from FW error (or maybe any error). It requires no a= pplication reaction (PMD manages by itself). It is not documented. I therefore suggest renaming it (maybe EVENT_ERR_RECOVERING) and please doc= ument it in *.rst files. More comments below: > -----Original Message----- > From: dev On Behalf Of Kalesh A P > Sent: Wednesday, September 30, 2020 3:33 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [RFC PATCH v4 3/3] app/testpmd: handle device recover= y > event >=20 > From: Kalesh AP >=20 > Added code to handle device reset and recovery event in testpmd. > This is an indication from the PMD that device has reset and recovered er= ror > condition. >=20 > Signed-off-by: Kalesh AP > Reviewed-by: Ajit Kumar Khaparde > --- > app/test-pmd/testpmd.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > fe6450c..1c8fb46 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -380,6 +380,8 @@ static const char * const eth_event_desc[] =3D { > [RTE_ETH_EVENT_NEW] =3D "device probed", > [RTE_ETH_EVENT_DESTROY] =3D "device released", > [RTE_ETH_EVENT_FLOW_AGED] =3D "flow aged", > + [RTE_ETH_EVENT_RESET] =3D "device reset", "device reset" is similar to the existing "reset" string. Can you suggest a= different one? Maybe "error under recovery" ? > + [RTE_ETH_EVENT_RECOVERED] =3D "device recovery", Wouldn't you prefer "device recovered" ? > [RTE_ETH_EVENT_MAX] =3D NULL, > }; >=20 > @@ -394,7 +396,9 @@ uint32_t event_print_mask =3D (UINT32_C(1) << > RTE_ETH_EVENT_UNKNOWN) | > (UINT32_C(1) << RTE_ETH_EVENT_IPSEC) | > (UINT32_C(1) << RTE_ETH_EVENT_MACSEC) | > (UINT32_C(1) << RTE_ETH_EVENT_INTR_RMV) | > - (UINT32_C(1) << RTE_ETH_EVENT_FLOW_AGED); > + (UINT32_C(1) << RTE_ETH_EVENT_FLOW_AGED) | > + (UINT32_C(1) << RTE_ETH_EVENT_RESET) | > + (UINT32_C(1) << RTE_ETH_EVENT_RECOVERED); > /* > * Decide if all memory are locked for performance. > */ > -- > 2.10.1