From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] doc: update API deprecation for device reset Date: Mon, 28 Jan 2019 01:20:24 +0100 Message-ID: <1648146.NeMYav50z5@xps> References: <20180920045959.106252-1-qi.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, declan.doherty@intel.com, ferruh.yigit@intel.com, ktraynor@redhat.com, benjamin.h.shelton@intel.com, narender.vangati@intel.com To: Qi Zhang Return-path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 1C609316B for ; Mon, 28 Jan 2019 01:20:28 +0100 (CET) In-Reply-To: <20180920045959.106252-1-qi.z.zhang@intel.com> 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, I don't remember why this deprecation notice did not get any feedback in the 18.11 cycle. It looks to be outdated now. In case you still plan some changes, I give my opinion below. 20/09/2018 06:59, Qi Zhang: > Device reset may have the dependency, for example, a VF reset expects > PF ready, or a NIC function as a part of a SOC need to wait for other > parts of the system be ready, these are time-consuming tasks and will > block current thread. > > So we rename rte_eth_dev_reset to rte_eth_dev_reset_async as an async > API, that makes things easy for an application that what to reset the > device from the interrupt thread since typically a > RTE_ETH_EVENT_INTR_RESET handler is invoked in interrupt thread. > > RFC patch: > http://patchwork.dpdk.org/patch/44989/ > > Signed-off-by: Qi Zhang I remmember I did not like this function when it was introduced. I think the cases addressed by rte_eth_dev_reset() should be handled with hotplug mechanism. > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > +* ethdev: In v19.02 ``rte_eth_dev_reset`` is renamed to Is it still planned for 19.05? > + ``rte_eth_dev_reset_async``. As the name, it is an async API. Why removing the old function? We could avoid breaking applications by adding an async flavor of the function. > + Application should not assume device reset is finished after > + ``rte_eth_dev_reset_async`` return, it should always wait for a > + RTE_ETH_EVENT_RESET_COMPLETE event and check the reset result. This could be done in the synchronous flavor with sleeps in a loop.