[libvirt] [libvirt PATCHv6 1/1] add DHCP snooping

Stefan Berger stefanb at us.ibm.com
Fri Mar 23 00:06:17 UTC 2012


David Stevens/Beaverton/IBM wrote on 03/22/2012 07:26:06 PM:

> From: David Stevens/Beaverton/IBM
> To: Eric Blake <eblake at redhat.com>
> Cc: libvir-list at redhat.com, Stefan Berger/Watson/IBM at IBMUS
> Date: 03/22/2012 07:26 PM
> Subject: Re: [libvirt] [libvirt PATCHv6 1/1] add DHCP snooping
> 
> Eric Blake <eblake at redhat.com> wrote on 03/22/2012 03:54:31 PM:
> 
> > 
> > pthread_cancel() tends to imply that you are properly managing signal
> > blocking across threads; we haven't used it anywhere else in libvirt,
> > and I'm extremely wary of pulling it in now, as there's probably a lot
> > of subtle bugs that it would expose.  Are you sure you can't do this 
in
> > some other manner without dragging in pthread_cancel()?

> Well, I was trying to avoid it in the earlier versions, but we ran
> into races where a new snooper thread could start up on the same 
interface
> before the old one woke up and noticed it was supposed to die; the old
> thread would then interfere with the new thread in unpleasant ways.

Right. I had created several patches on top of your previous code. From 
what I remember pretty much all scenarios were working: SIGHUP, multiple 
IP addresses, suspend/resume... Some of the code that became necessary due 
to the interaction of the threads really wasn't 'nice' (tricky)...

   Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120322/0cf5a75c/attachment-0001.htm>


More information about the libvir-list mailing list