From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LVZ0K-0005Ys-R1 for qemu-devel@nongnu.org; Fri, 06 Feb 2009 17:16:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVZ0I-0005Y7-Al for qemu-devel@nongnu.org; Fri, 06 Feb 2009 17:16:56 -0500 Received: from [199.232.76.173] (port=48006 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVZ0I-0005Y3-7D for qemu-devel@nongnu.org; Fri, 06 Feb 2009 17:16:54 -0500 Received: from mx20.gnu.org ([199.232.41.8]:32448) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LVZ0H-0006BH-O9 for qemu-devel@nongnu.org; Fri, 06 Feb 2009 17:16:53 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LVZ0F-0003KD-9E for qemu-devel@nongnu.org; Fri, 06 Feb 2009 17:16:51 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH][RFC] qemu:virtio-net: Use TUNSETTXFILTER for MAC filtering Date: Fri, 6 Feb 2009 22:16:47 +0000 References: <20090206044853.3116.46699.stgit@kvm.aw> <200902061512.42261.paul@codesourcery.com> <1233943142.7026.1335.camel@lappy> In-Reply-To: <1233943142.7026.1335.camel@lappy> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902062216.47990.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: Alex Williamson Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org > > There should be two interface points between the the vlan and the device: > > 1) The device can indicate that it only cares about incoming (vlan to > > device) packets sent to a subset of MAC addresses. > > 2) The vlan can request that a device discards outgoing (device to vlan) > > packets that don't match a subset of MAC addresses. > > > > Typically a emulated NIC will implement (1) and a host interface will > > implement (2). > > > > The generic vlan code should be responsible for using the information > > provided by (1) to set (2) appropriately. Remember that network devices > > can be hotplugged. > > Do you think it's worthwhile for the vlan to save and consolidate > filtering from multiple (1) sources to program (2)? My interface is > effectively short circuiting and letting the (1) agent set (2). As you > mention below, this is an optimization, so I think it's reasonable that > if we exceed a 1x1 configuration of (1)s and (2)s, we need to reset back > to a shared media model and do filtering in the (1) agent, which is how > I think we should handle hotplug. My point is that the devices themselves shouldn't know or care about this. Obviously a trivial implementation of combining multiple sources is to disable the filter if there is more than one other device. Paul