From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH] eal: register rte_panic user callback Date: Wed, 7 Mar 2018 11:29:47 +0000 Message-ID: <81ecbc4a-0200-3b42-8da1-fe87e8c14c04@intel.com> References: <1520360928-9375-1-git-send-email-arnon@qwilt.com> <304114136.g7uiPYdxRp@xps> <4197355.YAsZy1EAlL@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: bruce.richardson@intel.com, dev@dpdk.org To: Thomas Monjalon , Arnon Warshavsky Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 529814C74 for ; Wed, 7 Mar 2018 12:29:51 +0100 (CET) In-Reply-To: <4197355.YAsZy1EAlL@xps> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 07-Mar-18 9:59 AM, Thomas Monjalon wrote: > 07/03/2018 10:05, Burakov, Anatoly: >> On 07-Mar-18 8:32 AM, Thomas Monjalon wrote: >>> Hi, >>> >>> 06/03/2018 19:28, Arnon Warshavsky: >>>> The use case addressed here is dpdk environment init >>>> aborting the process due to panic, >>>> preventing the calling process from running its own tear-down actions. >>> >>> Thank you for working on this long standing issue. >>> >>>> A preferred, though ABI breaking solution would be >>>> to have the environment init always return a value >>>> rather than abort upon distress. >>> >>> Yes, it is the preferred solution. >>> We should not use exit (panic & co) inside a library. >>> It is important enough to break the API. >> >> +1, panic exists mostly for historical reasons AFAIK. it's a pity i >> didn't think of it at the time of submitting the memory hotplug RFC, >> because i now hit the same issue with the v1 - we might panic while >> holding a lock, and didn't realize that it was an API break to change >> this behavior. >> >> Can this really go into current release without deprecation notices? > > If such an exception is done, it must be approved by the technical board. > We need to check few criterias: > - which functions need to be changed > - how the application is impacted > - what is the urgency > > If a panic is removed and the application is not already checking some > error code, the execution will continue without considering the error. > > Some rte_panic could be probably removed without any impact on applications. > Some rte_panic could wait for 18.08 with a notice in 18.05. > If some rte_panic cannot wait, it must be discussed specifically. > Can we add a compile warning for adding new rte_panic's into code? It's a nice tool while debugging, but it probably shouldn't be in any new production code. -- Thanks, Anatoly