From: Andrew Rybchenko Subject: Re: [RFC 1/4] ethdev: claim device reset as async Date: Wed, 8 Aug 2018 18:22:50 +0300 Message-ID: References: <20180808070045.13334-1-qi.z.zhang@intel.com> <20180808081325.00df3024@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , , , , , , , <0000-cover-letter.patch@dpdk.org> To: Stephen Hemminger , Qi Zhang Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 29C9E25D9 for ; Wed, 8 Aug 2018 17:23:18 +0200 (CEST) In-Reply-To: <20180808081325.00df3024@xeon-e3> 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 08.08.2018 18:13, Stephen Hemminger wrote: > On Wed, 8 Aug 2018 15:00:42 +0800 > Qi Zhang wrote: > >> rte_eth_dev_reset should be implemented in an async way since it is >> possible be invoked in interrupt thread and sometimes to reset a >> device need to wait for some dependency, for example, a VF expects >> for PF ready, or a NIC function as part of a SOC wait for the whole >> system reset complete, all these time consuming task will block the >> the interrupt thread. >> The patch claims rte_eth_dev_reset is an async function and introduce >> a new event RTE_ETH_EVENT_RESET_COMPLETE. PMD should raise this event >> when finish reset in background. The applicaiton should always wait >> for this event before continue to configure and restart the device. > > If you have to change every driver to spawn a thread, then this doesn't > seem that useful. If you have to have a thread, then the base layer > code in EAL should do it. > > Lots of DPDK changes seem to require every driver to change (a nuisance), > and then every driver changes in the same boilerplate way (indicates > poor design choice). +1