From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LY1TD-0005qq-CJ for qemu-devel@nongnu.org; Fri, 13 Feb 2009 12:04:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LY1TB-0005q1-GI for qemu-devel@nongnu.org; Fri, 13 Feb 2009 12:04:54 -0500 Received: from [199.232.76.173] (port=40780 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LY1TB-0005px-Bn for qemu-devel@nongnu.org; Fri, 13 Feb 2009 12:04:53 -0500 Received: from mx20.gnu.org ([199.232.41.8]:34680) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LY1TA-0006dp-Uk for qemu-devel@nongnu.org; Fri, 13 Feb 2009 12:04:53 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LY1TA-0002Q8-2Q for qemu-devel@nongnu.org; Fri, 13 Feb 2009 12:04:52 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 3/4] qemu:virtio-net: Add support for qemu_vlan_rxfilter Date: Fri, 13 Feb 2009 17:04:49 +0000 References: <20090210212841.9760.96780.stgit@kvm.aw> <200902131617.54616.paul@codesourcery.com> <20090213164601.GK18471@shareable.org> In-Reply-To: <20090213164601.GK18471@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200902131704.49809.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu-devel@nongnu.org, Alex Williamson , kvm@vger.kernel.org > > A simple "Something changed, please try your filter again" callback > > automatically covers all these cases. > > It doesn't, if tap has no memory of how many clients require a filter. I'm talking about a callback for devices requesting an inbound filter. Devi= ces=20 implementing outgoing (device->vlan) filters just do as they're told. > If tap just answers "YES and installs the kernel filter" or "NO and > doesn't install the kernel filter" and doesn't remember how many > clients need a filter, then: >... > In other words, tap needs to distinguish three states: > > =A0 =A0 =A0"1 filter requested and installed in the kernel" > =A0 =A0 =A0">1 filter requested, none installed in the kernel" > =A0 =A0 =A0"0 filters requested, none installed in the kernel" Absolutely not. This is the reason we have separate the "request an incomin= g=20 filter" API from the "provide an outgoing filter" callback. It allows the=20 vlan code to arbitrate in the middle. A vlan is a bus network, not a set of= =20 point-point connections. I haven't checked whether the proposed patch gets= =20 this right. I suspect it probably doesn't. This is why the initial patch that had clients talking to each other direct= ly=20 was completely wrong. Paul