From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsP9q-0000Vm-4p for qemu-devel@nongnu.org; Wed, 13 May 2015 01:24:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsP9m-0000P1-WF for qemu-devel@nongnu.org; Wed, 13 May 2015 01:24:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsP9m-0000Or-OH for qemu-devel@nongnu.org; Wed, 13 May 2015 01:24:34 -0400 Date: Wed, 13 May 2015 13:23:52 +0800 From: Jason Wang Message-Id: <1431494632.7520.0@smtp.corp.redhat.com> In-Reply-To: <554204B9.2010408@redhat.com> References: <1430303875-31647-1-git-send-email-famz@redhat.com> <1430303875-31647-7-git-send-email-famz@redhat.com> <1430384353.20407.3@smtp.corp.redhat.com> <554204B9.2010408@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Subject: Re: [Qemu-devel] [RFC PATCH 6/8] tap: Drop tap_can_send List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Vincenzo Maffione , Stefan Hajnoczi , Giuseppe Lettieri , Luigi Rizzo On Thu, Apr 30, 2015 at 6:32 PM, Paolo Bonzini wrote: > > > On 30/04/2015 10:59, Jason Wang wrote: >>> >>> >>> + /* If !can_send, we will want to disable the read poll, >>> but >>> we still >>> + * need the send completion callback to enable it again, >>> which is a >>> + * sign of peer becoming ready. So call the send function >>> + * regardlessly of can_send. >>> + */ >> >> It was probably not safe to depend on sent_cb to re-enable the >> polling. >> Since the packet could be purged in some conditions (e.g >> net_vm_change_state_handler()). So tap_send_completed won't be >> called in >> this case. > > Doesn't qemu_net_queue_purge also call the sent_cb? > > Paolo I was wrong. It calls.