On 11/28/2011 11:32 AM, Stefan Berger wrote: > A preparatory patch for DHCP snooping where we want to be able to > differentiate between a VM's interface using the tuple of > <VM UUID, Interface MAC address>. We assume that MAC addresses could > possibly be re-used between different networks (VLANs) thus do not only > want to rely on the MAC address to identify an interface. > > At the current 'final destination' in virNWFilterInstantiate I am leaving > the vmuuid parameter as ATTRIBUTE_UNUSED until the DHCP snooping patches arrive. > (we may not post the DHCP snooping patches for 0.9.8, though) You may want to tweak the commit message, now that 0.9.8 is out :) > > Mostly this is a pretty trivial patch. On the lowest layers, in lxc_driver > and uml_conf, I am passing the virDomainDefPtr around until I am passing > only the VM's uuid into the NWFilter calls. This patch applied cleanly after your return status cleanup, and does indeed look straight-forward. > --- > src/conf/domain_nwfilter.c | 3 ++- > src/conf/domain_nwfilter.h | 2 ++ > src/lxc/lxc_driver.c | 5 ++++- > src/nwfilter/nwfilter_driver.c | 6 ++++-- > src/nwfilter/nwfilter_gentech_driver.c | 27 +++++++++++++++++++-------- > src/nwfilter/nwfilter_gentech_driver.h | 5 ++++- > src/nwfilter/nwfilter_learnipaddr.c | 3 ++- > src/qemu/qemu_command.c | 2 +- > src/qemu/qemu_process.c | 2 +- > src/uml/uml_conf.c | 11 +++++++---- > 10 files changed, 46 insertions(+), 20 deletions(-) > > Index: libvirt-acl/src/nwfilter/nwfilter_learnipaddr.c > =================================================================== > --- libvirt-acl.orig/src/nwfilter/nwfilter_learnipaddr.c > +++ libvirt-acl/src/nwfilter/nwfilter_learnipaddr.c > @@ -704,7 +704,8 @@ learnIPAddressThread(void *arg) > "cache for interface %s"), inetaddr, req->ifname); > } > > - ret = virNWFilterInstantiateFilterLate(req->ifname, > + ret = virNWFilterInstantiateFilterLate(NULL, > + req->ifname, Is this going to bite us later? Obviously, with the ATTRIBUTE_UNUSED in this patch, it won't, but I'm wondering if you need to pass the uuid through a few more calls (but that can be a separate patch). ACK. -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list