From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 3/4] qemu:virtio-net: Add support for qemu_vlan_rxfilter Date: Sun, 15 Feb 2009 16:25:39 +0000 Message-ID: <200902151625.39857.paul@codesourcery.com> References: <20090210212841.9760.96780.stgit@kvm.aw> <200902131704.49809.paul@codesourcery.com> <20090213203819.GC20328@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Jamie Lokier , Alex Williamson , kvm@vger.kernel.org To: qemu-devel@nongnu.org Return-path: Received: from mail.codesourcery.com ([65.74.133.4]:40873 "EHLO mail.codesourcery.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbZBOQZq (ORCPT ); Sun, 15 Feb 2009 11:25:46 -0500 In-Reply-To: <20090213203819.GC20328@shareable.org> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: > The callback you suggest for devices requesting an inbound filter will > infinite-loop when there's two such devices on the same vlan bus, > because each time the callback is called, that device will re-issue > its filter request which triggers the callback on the other similar > device. Back and forth. > > To avoid the infinite loop, the vlan code in the middle (if that's > where you want it, and I agree) has to distinguish between no inbound > filters requested by attached devices, and multiple incompatible > inbound filters requested by attached devices. Of course. As I've said repeatedly, the only sane way to implement this is if you isolate individual devices from this kind of implementation detail. If you're API doesn't do that then it's wrong. Paul