From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDAUJ-0006zk-Dd for qemu-devel@nongnu.org; Mon, 19 Jan 2015 06:27:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDAUG-0004je-7O for qemu-devel@nongnu.org; Mon, 19 Jan 2015 06:27:19 -0500 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:52522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDAUG-0004jJ-10 for qemu-devel@nongnu.org; Mon, 19 Jan 2015 06:27:16 -0500 Received: by mail-wi0-f177.google.com with SMTP id r20so7956409wiv.4 for ; Mon, 19 Jan 2015 03:27:15 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54BCEA0F.8070707@redhat.com> Date: Mon, 19 Jan 2015 12:27:11 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1419353600-30519-2-git-send-email-pbonzini@redhat.com> <20150102140658.GL10823@stefanha-thinkpad.redhat.com> <54A6C53E.3050905@redhat.com> In-Reply-To: <54A6C53E.3050905@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] net: synchronize net_host_device_remove with host_net_remove_completion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, stefanha@redhat.com On 02/01/2015 17:20, Paolo Bonzini wrote: >> > >> > The assert can be dropped completely since the code already has an >> > equivalent assert: >> > >> > queues = qemu_find_net_clients_except(nc->name, ncs, >> > NET_CLIENT_OPTIONS_KIND_NIC, >> > MAX_QUEUE_NUM); >> > assert(queues != 0); <-- fail if type == NET_CLIENT_OPTIONS_KIND_NIC > I left it on purpose for documentation, but I'll send v2 next week that > removes it. Actually it's not the same. If you have "-netdev user,id=e1000 -device e1000,netdev=e1000" you will be able to call qemu_del_net_client on the NIC, and it will _not_ fail if the assertion is removed. Paolo