From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkBTK-0002db-Mp for qemu-devel@nongnu.org; Wed, 05 Jun 2013 07:01:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkBTB-0001g9-Op for qemu-devel@nongnu.org; Wed, 05 Jun 2013 07:01:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkBTB-0001g2-H9 for qemu-devel@nongnu.org; Wed, 05 Jun 2013 07:01:33 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r55B1W1u031945 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 5 Jun 2013 07:01:32 -0400 Date: Wed, 5 Jun 2013 14:02:06 +0300 From: "Michael S. Tsirkin" Message-ID: <20130605110206.GI31830@redhat.com> References: <1370428933-15178-1-git-send-email-akong@redhat.com> <20130605104922.GF17576@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130605104922.GF17576@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5] net: add support of mac-programming over macvtap in QEMU side List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Amos Kong , qemu-devel@nongnu.org, stefanha@redhat.com, lcapitulino@redhat.com On Wed, Jun 05, 2013 at 11:49:22AM +0100, Daniel P. Berrange wrote: > On Wed, Jun 05, 2013 at 06:42:13PM +0800, Amos Kong wrote: > > Currently macvtap based macvlan device is working in promiscuous > > mode, we want to implement mac-programming over macvtap through > > Libvirt for better performance. > > > > Design: > > QEMU notifies Libvirt when rx-filter config is changed in guest, > > then Libvirt query the rx-filter information by a monitor command, > > and sync the change to macvtap device. Related rx-filter config > > of the nic contains main mac, rx-mode items and vlan table. > > > > This patch adds a QMP event to notify management of rx-filter change, > > and adds a monitor command for management to query rx-filter > > information. > > > > For reducing length of output, we just return the entries of vlan > > filter table that have active vlan. > > > > Event_throttle API can avoid the events to flood QMP client, but it > > could cause an unexpected delay. So a flag for each nic is used to > > avoid events flooding, if management doesn't query rx-filter after > > it receives one event, new events won't be emitted to QMP monitor. > > > > There maybe exist an uncontrollable delay if we let Libvirt do the > > real change, guests normally expect rx-filter updates immediately. > > But it's another separate issue, we can investigate it when the > > work in Libvirt side is done. > > What work is libvirt expected to do in response to these events ? > It this just about updating the ebtables rules to allow packets > with the newly configured MAC addr to be sent/received on the > tap backend ? > > Daniel For tap yes, but it depends on the backend. For the macvtap backend, it needs to update the macvtap device mac(s) and rx mode. It also needs to be policy driven - some admins might want to prevent the ability to change MAC for (some) guests. > -- > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| > |: http://libvirt.org -o- http://virt-manager.org :| > |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| > |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|