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 12:40:20 +0000 Message-ID: <200902131240.21150.paul@codesourcery.com> References: <20090210212841.9760.96780.stgit@kvm.aw> <200902121705.54473.paul@codesourcery.com> <1234462898.25178.277.camel@bling> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Alex Williamson , kvm@vger.kernel.org To: qemu-devel@nongnu.org Return-path: Received: from mail.codesourcery.com ([65.74.133.4]:33633 "EHLO mail.codesourcery.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751531AbZBMMkY convert rfc822-to-8bit (ORCPT ); Fri, 13 Feb 2009 07:40:24 -0500 In-Reply-To: <1234462898.25178.277.camel@bling> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: > - A device requests a filter and is told if the request is successful > =A0 - On success the device may skip it's own filtering > - If another vlan client is added, the following _must_ occur: > =A0 - The "filterer" must clear (remove) the filter > =A0 - The "filteree" must revert to using their own filtering > - If a vlan client is removed, the following _may_ occur: > =A0 - vlan clients are notified that they may retry their filter >.. > The added()/removed() interface feels like the right solution to this= =2E I think your analysis is fundamentally flawed. Firstly I'm not sure the= above=20 holds when going between 1 and 2 clients on a vlan. Even ignoring that= , you=20 are making implicit assumptions about when a filter will succeed. If th= ese=20 assumptions are broken (which seems likely if we ever implement filteri= ng=20 with more than 2 devices on a vlan) they you'll get subtle breakage in = every=20 single user of the API. > We could use a changed() function, but it would need to know the > direction of the change, which leads back to the same mechanics. If > there's a better way, please suggest it. Thanks, I still don't see why the device needs to know what's changed. The resp= onse=20 should always be the same: Request a filter, and see if it works. Paul