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 C2CFCA0544; Mon, 10 Oct 2022 10:47:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6E7840146; Mon, 10 Oct 2022 10:47:27 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id CC50C40041 for ; Mon, 10 Oct 2022 10:47:26 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 4D98B5E; Mon, 10 Oct 2022 11:47:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 4D98B5E DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1665391646; bh=PN+5I0MK+imW7ZLkNvV7wH1CUc7i4NPjvOhtaBmG4ZE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=n9S0vd1zCWYMXj0gngMQB9v+nm11nxRRqbOPN2sv2I0PaLUK2TGw+EdyQ49NNlPXJ gJciKN7c8eXXG8R/kSqXkEZLWxtMErOho3JbYjtJLznhpLV8xPovcPbTal2KIl5vwf Pn8DSYoS6ndNaRMtItks7gN81otrIz54R+MegrYk= Message-ID: <15fd413f-5759-2509-3d4c-35c3a2e5b2b8@oktetlabs.ru> Date: Mon, 10 Oct 2022 11:47:26 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v11 2/5] ethdev: support proactive error handling mode Content-Language: en-US To: Chengwen Feng , thomas@monjalon.net, ferruh.yigit@xilinx.com, ferruh.yigit@amd.com Cc: dev@dpdk.org, kalesh-anakkur.purayil@broadcom.com, somnath.kotur@broadcom.com, ajit.khaparde@broadcom.com, mdr@ashroe.eu References: <20220128124831.427-1-kalesh-anakkur.purayil@broadcom.com> <20221009091009.38978-1-fengchengwen@huawei.com> <20221009091009.38978-3-fengchengwen@huawei.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20221009091009.38978-3-fengchengwen@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 10/9/22 12:10, 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. Could you explain why passive mode is not good. Why is proactive better? What are the benefits? IMHO, it would be simpler to have just one error recovery mode. > > 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, and the effect is the same as that of the restart operation. > > 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. > > Signed-off-by: Kalesh AP > Signed-off-by: Somnath Kotur > Signed-off-by: Chengwen Feng > Reviewed-by: Ajit Khaparde The code itself LGTM. I just want to understand why we need it. It should be proved in the description.