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 0BE8DA04BC; Thu, 8 Oct 2020 12:49:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E01171BF2F; Thu, 8 Oct 2020 12:49:23 +0200 (CEST) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by dpdk.org (Postfix) with ESMTP id 4DC231BEA1 for ; Thu, 8 Oct 2020 12:49:22 +0200 (CEST) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 08 Oct 2020 03:48:24 -0700 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 8 Oct 2020 10:49:17 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 8 Oct 2020 10:49:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gpBKBG2UPqb6tRv2U/D2k5Db1a3G+rJDXJw/1pqTj2xbyuhdE99fzb2EMaAx3szkycWTeWrzbL9hBLEdHpmyLjVOg3xhAWB+R/+WY4HfmsYRVEIiQqLe3FgwgT5TBXBHZcrvs9fCmA/RJtUUrNUNCoTdzAUGQcuVp/ef9jUN/yqDyfAo5TyJkG3DxtO6Vw2/1pugCgxNuIh8vZAG1L+RkbQj2Zw3CjxQdOP7fQoZtUdoMLb0aL20sKPqrl5IuLirTrK+wtCH/qsolvy7fVAtokiEH95FJBbhgZw6nAVVW53Fq7akbCz+WBdBrLLIBS8gqVIU5ya7Y8Fus+6v1W1Zew== 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=XGde1+E1IYjsowTPv99fvbI8zRVSMnE9D5wI93KJmE0=; b=U+g4e8NIV9v+kq4XfV0SmbpAg9HIB6lh2CZYp5cnjavlmdZzh8lS908thThz5kQJG09t6wVm6j6QXFxBDEt1e6qfUicJbW9015XhZmJCFGdFQVMccyDPHU2zkRTelA/53n2y6JJJSEH89TPIzFJ8lVC5BqVPXzPDU9hERGJAixi9lEUURy6tgJqV/LvAeA9ZbCiTe8AM33dMlj4LV1Lb69T1FsEdF+xTiXnWULQ50eZDaD8VG0JKfrE79TqjmT7z498CKk+Jx3gSQm5iMa2oAzkP2KDSPhylZK0tf7vVPVIARqMVUtnszODRZ8+bPg0j8raJI1IkIUU+Mr/1lhNoSQ== 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 DM5PR12MB2406.namprd12.prod.outlook.com (2603:10b6:4:b7::23) by DM6PR12MB3146.namprd12.prod.outlook.com (2603:10b6:5:11b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23; Thu, 8 Oct 2020 10:49:16 +0000 Received: from DM5PR12MB2406.namprd12.prod.outlook.com ([fe80::c806:9c0b:4af5:a686]) by DM5PR12MB2406.namprd12.prod.outlook.com ([fe80::c806:9c0b:4af5:a686%6]) with mapi id 15.20.3455.024; Thu, 8 Oct 2020 10:49:16 +0000 From: Asaf Penso To: Kalesh A P , "dev@dpdk.org" CC: Matan Azrad Thread-Topic: [dpdk-dev] [PATCH v5 1/3] ethdev: support device reset and recovery events Thread-Index: AQHWnMgo5nd/VRp9skOoQuHvC8yLF6mNh5eQ Date: Thu, 8 Oct 2020 10:49:16 +0000 Message-ID: References: <20200122101654.20824-1-kalesh-anakkur.purayil@broadcom.com> <20201007164915.14375-1-kalesh-anakkur.purayil@broadcom.com> <20201007164915.14375-2-kalesh-anakkur.purayil@broadcom.com> In-Reply-To: <20201007164915.14375-2-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: [217.111.27.204] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4700165a-8313-4406-622d-08d86b77cd8e x-ms-traffictypediagnostic: DM6PR12MB3146: 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: YhInud364+bxlxAtzMNDIvq2J7HkNuZM+O43zPRAz3sokQptUvA9zC4X1bOpFQSJN2IBvLmAdQJuccNaPYj2mkWAPEdqnBZv3wW9WbaxvYraVx0feL3sCV+e2LthrsqknxHAv5DEDN8nQcHdgM5osQjuXhM+cYGUhGlXJxzuBlU91CGPFSpCNgPqRqDtZT3gOM/IHvTUCuniAWBeaP1PXmA9+7fCX22SIXVi9lzr0M1FaJ79Wh9d12ECkVoKyWxVeVQhYCUn3KBiwmgQddc8O/TvUD1St5EVhUVRdcCtu2NwdkcMKa89KCMDnxkglLVpLgun30MaofdRIkXhbme9WQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB2406.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(39860400002)(346002)(376002)(8936002)(64756008)(66556008)(66476007)(478600001)(55236004)(6506007)(66446008)(52536014)(71200400001)(33656002)(7696005)(55016002)(107886003)(9686003)(26005)(2906002)(76116006)(66946007)(186003)(4326008)(83380400001)(86362001)(5660300002)(316002)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: RPRzSxc4D8F3pIhC18/f5NXXi6ONis18lO548NY2UL0G/APwN2t4cKnCtjwcQh68B+V/xlSDAqIE7v0XR2mfV1Im2GFMSxviMX3P/7AmQdVlW2AFfF3YXXnjsUvK1ORuzQpBDbPJ5nb6du5aDXHVuGBy3b3MlexkrciU/WshUKMojcoSabQgTOGSAUmx8cLX16iqlU1Qtdx1O/zJEgxNB8Nk9AQXTbXQVyjovwMsmV1I/89JWyMQw4pC0KHb1jzYQz1njcxbpPQ8bD3vEVCDDJWuDVASPQ114PWiS5yy1nfGIheTyLAE7o/LlYGPZ17huocVqdXWU/zFtSDxrgE3bpZkI4iRUIKuOMF6YCWZ6A+bqSZgp8Unnk3GmA+XsB9Iw/vBbUff59WyCwNZHnTZrCuUsUvKd6IlhJTJqyTVFE0qw+VtLyfvoJruSxdaaH2AU3pv+HdAhFUEnVkoBGZMEFFWx0rqOgNk0/VVluK2VyQhGwnJ2xyl8DuefQwQHxpaigiBDr51eV8yjqOjqdn41FDnW8Eup3a8WgFGhHfGM3g3Olv259qKGRY2mzXbHCQUYx4H/HM/VRzQIfC2Fz4Muoa39rvRPktSgrDl2X5CZ++fmO9TzXvK3zoVpU379KhRSu5A35Qjo6vACXrnXiwPXw== 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: DM5PR12MB2406.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4700165a-8313-4406-622d-08d86b77cd8e X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2020 10:49:16.5946 (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: 3prNQKdxxQSekLAGWlhh5rcLxkkX9Cyttry7cDduS9J8hxwFEJkQrD7FUhXr7utrBYzBRenmu+V9LnFp6E346w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3146 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1602154104; bh=XGde1+E1IYjsowTPv99fvbI8zRVSMnE9D5wI93KJmE0=; 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-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=Lgq0pfpXqR6flNW+n1b8grzGV3+aZGGzmzxfLXLV4275k3RCvk+kBBGrwOEtQawcH zWUrshUX8tYGjMrV1DZE2+Z/Lbe1Ig+V+nggld/OuWVF+lxVA7p5aok3vZQVhZYEq/ yGN6+AiJULOb7EuoftniuwBSGhpoVo79IE2/I8jM8vqpE1iSlxd3puvfiKly0Aqe43 Bs8InnBAboMVlzeGp+eMZk3XFYvNzOcMJvDK9zl3bojtfaA/5UbS50Wme9V71kLKyA iWyvh8aOHvCcajDTDtQHviBDXAvG9ez46UtdJ/zpsu2Bpf2xrxGzTrYDdegDlTgC02 0UpUSHr/ylk1w== Subject: Re: [dpdk-dev] [PATCH v5 1/3] ethdev: support device reset and recovery events 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" >-----Original Message----- >From: dev On Behalf Of Kalesh A P >Sent: Wednesday, October 7, 2020 7:49 PM >To: dev@dpdk.org >Subject: [dpdk-dev] [PATCH v5 1/3] ethdev: support device reset and >recovery events > >From: Kalesh AP > >Adding support for device reset and recovery events in the rte_eth_event >framework. FW error and FW reset conditions would be managed internally >by PMD without needing application intervention. >In such cases, PMD would need reset/recovery events to notify application >that PMD is undergoing a reset. > >Signed-off-by: Somnath Kotur >Signed-off-by: Kalesh AP >Reviewed-by: Ajit Khaparde >--- > doc/guides/prog_guide/poll_mode_drv.rst | 18 ++++++++++++++++++ > lib/librte_ethdev/rte_ethdev.h | 17 +++++++++++++++++ > 2 files changed, 35 insertions(+) > >diff --git a/doc/guides/prog_guide/poll_mode_drv.rst >b/doc/guides/prog_guide/poll_mode_drv.rst >index 86e0a14..c03f0ef 100644 >--- a/doc/guides/prog_guide/poll_mode_drv.rst >+++ b/doc/guides/prog_guide/poll_mode_drv.rst >@@ -615,3 +615,21 @@ by application. > The PMD itself should not call rte_eth_dev_reset(). The PMD can trigger = the >application to handle reset event. It is duty of application to handle al= l >synchronization before it calls rte_eth_dev_reset(). >+ >+Error recovery support >+~~~~~~~~~~~~~~~~~~~~~~ >+ >+When the PMD detects a FW reset or error condition, it will try to >+recover from the error without needing the application intervention. In >+such cases, PMD would need events to notify the application that it is >+undergoing an error recovery. >+ >+The PMD will trigger RTE_ETH_EVENT_ERR_RECOVERING event to notify the >+application that PMD detected a FW reset or FW error condition. PMD >+will try to recover from the error by itself. Data path will be halted >+and control path operations would fail during the recovery period. >+ >+The PMD will trigger RTE_ETH_EVENT_RECOVERED event to notify the >+application that the it has recovered from the error condition. Control >+path and data path are up now. Since the device undergone a reset, flow >+rules offloaded prior to the reset will be lost and the application has t= o >recreate the rules again. >diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev= .h >index 9759f13..9b4b015 100644 >--- a/lib/librte_ethdev/rte_ethdev.h >+++ b/lib/librte_ethdev/rte_ethdev.h >@@ -3207,6 +3207,23 @@ enum rte_eth_event_type { > RTE_ETH_EVENT_DESTROY, /**< port is released */ > RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */ > RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected >*/ >+ RTE_ETH_EVENT_ERR_RECOVERING, >+ /**< port recovering from an error >+ * >+ * PMD detected a FW reset or error condition. >+ * PMD will try to recover from the error. >+ * Data path will be halted and Control path operations >+ * would fail at this time. >+ */ >+ RTE_ETH_EVENT_RECOVERED, >+ /**< port recovered from an error >+ * >+ * PMD has recovered from the error condition. >+ * Control path and Data path are up now. >+ * Since the device undergone a reset, flow rules >+ * offloaded prior to the reset will be lost and >+ * the application has to recreate the rules again. >+ */ > RTE_ETH_EVENT_MAX /**< max value of this enum */ > }; > >-- >2.10.1 LGTM Reviewed-by: Asaf Penso