From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 69AA0B00083; Wed, 8 Aug 2018 15:23:16 +0000 (UTC) Received: from [192.168.1.16] (85.187.13.33) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 8 Aug 2018 16:23:07 +0100 To: Stephen Hemminger , Qi Zhang CC: , , , , , , , , , <0000-cover-letter.patch@dpdk.org> References: <20180808070045.13334-1-qi.z.zhang@intel.com> <20180808081325.00df3024@xeon-e3> From: Andrew Rybchenko Message-ID: Date: Wed, 8 Aug 2018 18:22:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180808081325.00df3024@xeon-e3> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.187.13.33] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24018.003 X-TM-AS-Result: No-16.152900-8.000000-10 X-TMASE-MatchedRID: 9zTThWtzImsOwH4pD14DsPHkpkyUphL9aN2KuTwsCwIWnuSeJfGi81Un QAOplXiGU3WakcXXVjAdI+1cmjljC1/yzOBJu22CuIwLnB3Aqp1eu73mFK6GNHRylc22tUP9we0 cSbGr35gcCWvXAoHML91d7aF3CVBvr1U+m35BVv6VSBCoZUyqbHN3sLsG0mhu8oH9NDSvHkKjxY yRBa/qJQPTK4qtAgwIAYt5KiTiutkLbigRnpKlKSPzRlrdFGDw8Tl+uNQkVhG1EVA5UOObYT8Is FGjkON8eaSVFFsva3U+P6dyzNguJw== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--16.152900-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24018.003 X-MDID: 1533741797-WGr2Un0M2iBA Subject: Re: [dpdk-dev] [RFC 1/4] ethdev: claim device reset as async X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2018 15:23:18 -0000 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