From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ynlli-0001CO-9I for qemu-devel@nongnu.org; Thu, 30 Apr 2015 06:32:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ynllf-0002ZU-2o for qemu-devel@nongnu.org; Thu, 30 Apr 2015 06:32:34 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:38370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ynlle-0002ZN-Sx for qemu-devel@nongnu.org; Thu, 30 Apr 2015 06:32:31 -0400 Received: by wiun10 with SMTP id n10so12430826wiu.1 for ; Thu, 30 Apr 2015 03:32:29 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <554204B9.2010408@redhat.com> Date: Thu, 30 Apr 2015 12:32:25 +0200 From: Paolo Bonzini MIME-Version: 1.0 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> In-Reply-To: <1430384353.20407.3@smtp.corp.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Jason Wang , Fam Zheng Cc: Kevin Wolf , qemu-devel@nongnu.org, Vincenzo Maffione , Stefan Hajnoczi , Giuseppe Lettieri , Luigi Rizzo 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