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: Fri, 13 Feb 2009 17:04:49 +0000 Message-ID: <200902131704.49809.paul@codesourcery.com> References: <20090210212841.9760.96780.stgit@kvm.aw> <200902131617.54616.paul@codesourcery.com> <20090213164601.GK18471@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: qemu-devel@nongnu.org, Alex Williamson , kvm@vger.kernel.org To: Jamie Lokier Return-path: Received: from mail.codesourcery.com ([65.74.133.4]:46695 "EHLO mail.codesourcery.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750778AbZBMREw convert rfc822-to-8bit (ORCPT ); Fri, 13 Feb 2009 12:04:52 -0500 In-Reply-To: <20090213164601.GK18471@shareable.org> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: > > 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= =2E I'm talking about a callback for devices requesting an inbound filter. = Devices=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 inc= oming=20 filter" API from the "provide an outgoing filter" callback. It allows t= he=20 vlan code to arbitrate in the middle. A vlan is a bus network, not a se= t of=20 point-point connections. I haven't checked whether the proposed patch g= ets=20 this right. I suspect it probably doesn't. This is why the initial patch that had clients talking to each other di= rectly=20 was completely wrong. Paul