From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7474CC433FE for ; Mon, 3 Oct 2022 17:35:56 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 814EA427F3; Mon, 3 Oct 2022 19:35:55 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2058.outbound.protection.outlook.com [40.107.220.58]) by mails.dpdk.org (Postfix) with ESMTP id DD195427EC for ; Mon, 3 Oct 2022 19:35:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XkC3Uajxr0qG2UP5V8RqM2ALD8VO8ohagDPQkTjXu+f9f9WDr3yyg9joqkgdlTCmzdv0OGkoE+asRhx42J/se4CXHQ+rWfC8jSDb+/ZWHJtYAxqAYHfvvYqne8pL270sBXemht3vB524E5HAWdjp/U66vovMS6eMXWOo0gxgUWEfofsdNeeuSdlotfGAE1YOAUD1NY8tmwTDIeUqa1KdkKfqVhipNw73ZfzCiOZB3QXKdRVwlYW31U3uxMXheXxXWsnn3natK1BlzqDRoyJNqgYs/+IxAA7y3MrLU+iV1fPul6MbDArZk5CVSMCRObyAiVhFx+V3fXfzKKkX2eKlOQ== 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=NbY4NedkPuiOYc2S0c0IqfyRoW8ys5nDRLRigLp4Hwg=; b=lnnclrNAz5yI9dGqiIsnqPH3fYrY0SJATCc7Nr47T4OFfu9y0QH6c0LMuMki+eNbao2VI32vcHbI0GdpRtVBNnyEBmkYEF6DtYDJ0KU9ulMZ4+0Ebq6gmsCjjhbmHKovfgZ8P2ralK92ls5dPdJSkioNBbyfclKkEpQAlBtBGH/QRuyPRARDk3/B9BogVufK1ue6jSFReepPcFnMBT7HreIpUEzlaB4bEtf3C9hK61fbO17GwIuk8Cb7LcHvvDjzpFX94OLE1yLZQoKx2g+4naKfxyY5dDUMwzp8VoFiVUcnbmHOcXDdRtxxpYkp8HwubIhstN/i0vQmTNslIVbLzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 149.199.80.198) smtp.rcpttodomain=huawei.com smtp.mailfrom=amd.com; dmarc=temperror action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NbY4NedkPuiOYc2S0c0IqfyRoW8ys5nDRLRigLp4Hwg=; b=Y29a2iNqp+Tr3kIzXaUpf7iuffgzY23yrz7lhgvCvINTK02X0QFk4zGtxHDMR05by2tC3IBADoR4AOLbXO9q+akGGNyFXnF76g4mbDjJqB0ArnqC7XJ8ppijXpYwgaGLeh0Bev4IAtT+7QzrzYs7wm0iT73zR+q5rD8oR2cwX08= Received: from BN1PR10CA0023.namprd10.prod.outlook.com (2603:10b6:408:e0::28) by PH0PR02MB8534.namprd02.prod.outlook.com (2603:10b6:510:10d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Mon, 3 Oct 2022 17:35:49 +0000 Received: from BN1NAM02FT029.eop-nam02.prod.protection.outlook.com (2603:10b6:408:e0:cafe::bc) by BN1PR10CA0023.outlook.office365.com (2603:10b6:408:e0::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24 via Frontend Transport; Mon, 3 Oct 2022 17:35:49 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 149.199.80.198) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=temperror action=none header.from=amd.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning amd.com discourages use of 149.199.80.198 as permitted sender) Received: from xir-pvapexch02.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT029.mail.protection.outlook.com (10.13.2.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5676.17 via Frontend Transport; Mon, 3 Oct 2022 17:35:47 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 3 Oct 2022 18:35:47 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Mon, 3 Oct 2022 18:35:46 +0100 Envelope-to: ferruh.yigit@xilinx.com, fengchengwen@huawei.com, thomas@monjalon.net, dev@dpdk.org, kalesh-anakkur.purayil@broadcom.com, somnath.kotur@broadcom.com, ajit.khaparde@broadcom.com, mdr@ashroe.eu, Andrew.Rybchenko@oktetlabs.ru Received: from [10.71.194.74] (port=39118) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1ofPM2-00087X-Sl; Mon, 03 Oct 2022 18:35:46 +0100 Message-ID: <6db38a95-2412-8847-c9b3-379a3d83c037@amd.com> Date: Mon, 3 Oct 2022 18:35:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v9 2/5] ethdev: support proactive error handling mode Content-Language: en-US To: Chengwen Feng , , CC: , , , , , References: <20220128124831.427-1-kalesh-anakkur.purayil@broadcom.com> <20220922074151.39450-1-fengchengwen@huawei.com> <20220922074151.39450-3-fengchengwen@huawei.com> From: Ferruh Yigit In-Reply-To: <20220922074151.39450-3-fengchengwen@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1NAM02FT029:EE_|PH0PR02MB8534:EE_ X-MS-Office365-Filtering-Correlation-Id: 774c1ddc-71fd-4a69-b6b0-08daa565b56a X-MS-Exchange-SenderADCheck: 2 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BCiAflnDzzMMm9qyMHLhz4M/Yk+YYIogtdn2+doS0Y6deagj93yVkIVwT/vOOtAzefWjMsxYilr6BDRjm8u3M48ZNa81/uwtvNBPI8trftCeDwh/T/ptcbbq424pqGe9H9K0ZPBT9AohrfgPSWVoy15rW11aZFy1lBMgrgOIsl1jg/ylio+KP19kgvj7mS1Bc2GEIrWiSO1YZLw5ti9Z1/qI8Vhmx2F12abs+GTdEW2FgnDgTHbpZkOEKAYierAUG+tPNjS6oeSpUoQMU9Tae1G1XRz8Id0hHj0A7TKRSx5fhGMhS4bVjNZSqLlz1QM+MeS4BGY805vH75QdKeFmXmO4iASxsqwQORnkWGyXRJqpuOn4DJe2e5c4+NLLqRf2/quDrwDA/wW+b0xKyUsvEboW8SyGjbyEpuymwMXUmt/9BeQkuOCedwBYuht966w55IEBfmViJ8Nsni2H4KGV7axG/X/bC+NR4+KD0IKstG8Y3ScSeWNWONAWZ7+QAUSMLotM7Rrhh2gsMO18pt8MfPpAXpuEGZktOa3a5Yurg8pylDxvRygDNwVrGPkKC2bj0yH+fVN5Rrq26gbaa4WShX1G3/iEx/wFCoyW6r0T7kR8u+3Nwa3yL9ZWb+07z0y87/BDjdqodnx00Hg4l4+AVFf95c3s3ptPB7C7bCYkWs9468aSCSdi62jyvuTPU1UxJNfeiI71IkGxBBzy6IhqEOUASue6SrzN/OWbrgXUKNMTzL8w04/jileLDvagfAPy+CRE9ff8su/fNpeInjAZ/8axfVAVxzhgk/hNY8AB5/uuuaNS5NpsUMHk8cG+UPj9Fl9UgyQwnaNRWAAIu2220w== X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch02.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(376002)(136003)(396003)(346002)(451199015)(40470700004)(46966006)(5660300002)(8936002)(9786002)(2906002)(44832011)(41300700001)(498600001)(82310400005)(8676002)(70586007)(70206006)(4326008)(47076005)(336012)(40480700001)(40460700003)(316002)(82740400003)(7636003)(83380400001)(63370400001)(356005)(35950700001)(31686004)(86362001)(54906003)(53546011)(2616005)(110136005)(26005)(31696002)(36756003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2022 17:35:47.8577 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 774c1ddc-71fd-4a69-b6b0-08daa565b56a X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT029.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR02MB8534 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 On 9/22/2022 8:41 AM, Chengwen Feng wrote: > From: Kalesh AP > > Some PMDs (e.g. hns3) could detect hardware or firmware errors, and try > to recover from the errors. In this process, the PMD sets the data path > pointers to dummy functions (which will prevent the crash), and also > make sure the control path operations failed with retcode -EBUSY. > > The above error handling mode is known as > RTE_ETH_ERROR_HANDLE_MODE_PROACTIVE (proactive error handling mode). > > In some service scenarios, application needs to be aware of the event > to determine whether to migrate services. So three events were > introduced: > > 1) RTE_ETH_EVENT_ERR_RECOVERING: used to notify the application that it > detected an error and the recovery is being started. Upon receiving the > event, the application should not invoke any control path APIs until > receiving RTE_ETH_EVENT_RECOVERY_SUCCESS or > RTE_ETH_EVENT_RECOVERY_FAILED event. > > 2) RTE_ETH_EVENT_RECOVERY_SUCCESS: used to notify the application that > it recovers successful from the error, the PMD already re-configures > the port to the state prior to the error. > > 3) RTE_ETH_EVENT_RECOVERY_FAILED: used to notify the application that it > recovers failed from the error, the port should not usable anymore. The > application should close the port. > I think two separate events as 'RECOVERY_SUCCESS' & 'RECOVERY_FAILED' is better than previous 'RECOVERED' event. 'RECOVERY_FAILED' is clear, but for 'RECOVERY_SUCCESS' case, can we try to define more what application should do? Like should application assume nothing changed in the device configuration, flow rules etc or on other extreme should it assume that all configuration lost? > Signed-off-by: Kalesh AP > Signed-off-by: Somnath Kotur > Signed-off-by: Chengwen Feng > Reviewed-by: Ajit Khaparde <...>