From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZFcW-0003eL-Vt for qemu-devel@nongnu.org; Tue, 08 Sep 2015 05:55:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZFcV-00048x-5o for qemu-devel@nongnu.org; Tue, 08 Sep 2015 05:55:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZFcV-00048Z-0s for qemu-devel@nongnu.org; Tue, 08 Sep 2015 05:55:19 -0400 References: <1441362357.24871.155.camel@linuxfoundation.org> <1441365880.24871.164.camel@linuxfoundation.org> <1441370585.24871.166.camel@linuxfoundation.org> <1441387258.24871.197.camel@linuxfoundation.org> <1441549313.24871.218.camel@linuxfoundation.org> <1441581997.24871.227.camel@linuxfoundation.org> <1441612048.24871.248.camel@linuxfoundation.org> From: Jason Wang Message-ID: <55EEB082.5040306@redhat.com> Date: Tue, 8 Sep 2015 17:55:14 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Segfault using qemu-system-arm in smc91c111 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Richard Purdie Cc: Stefan Hajnoczi , Peter Crosthwaite , Fam Zheng , qemu-devel On 09/07/2015 05:21 PM, Peter Maydell wrote: > CCing the net maintainers on this thread seems like it would > be a good idea... > > On 7 September 2015 at 08:47, Richard Purdie > wrote: >> On Sun, 2015-09-06 at 17:48 -0700, Peter Crosthwaite wrote: >>> This doesn't sound right. There are other network controllers that >>> rely of can_receive catching all cases properly. Is this a regression? >>> Looking at logs, I see some refactoring of QEMU net framework around >>> June timeframe, if you rewind to QEMU 2.3 (or earlier) does the bug go >>> away? >> I did find an interesting comment in this commit: >> >> http://git.qemu.org/?p=qemu.git;a=commitdiff;h=625de449fc5597f2e1aff9cb586e249e198f03c9 >> >> """ >> Since commit 6e99c63 "net/socket: Drop net_socket_can_send" and friends, >> net queues need to be explicitly flushed after qemu_can_send_packet() >> returns false, because the netdev side will disable the polling of fd. >> """ >> >> smc91x111 is calling flush functions when it knows can_receive >> would/should return false. I believe that is the bug here. >> >> I suspect the driver needs: >> >> * can_receive to actually return the right value >> * the locations of the flush calls to be when there is receive space Yes, please do this. >> This could explain what changed to break this and why moving the flush >> calls works in my patch. > thanks > -- PMM