[libvirt] [PATCH] qemu: cleanup tap devices on FreeBSD

Roman Bogorodskiy bogorodskiy at gmail.com
Wed Feb 26 17:00:42 UTC 2014


  Daniel P. Berrange wrote:

> On Wed, Feb 26, 2014 at 09:12:11AM -0700, Eric Blake wrote:
> > On 02/26/2014 08:57 AM, Roman Bogorodskiy wrote:
> > >>
> > >> Conceptually ok, but I fear this impl will result in the logs getting
> > >> polluted with "cannot delete tap device" or similar log messages on OS
> > >> where TAP device deletion is automatic.
> > > 
> > > Do you have an idea about better way to do that?
> > 
> > Maybe add a boolean parameter that says whether the function should be
> > quiet to avoid log noise, where the default is noisy but this cleanup
> > path is quiet.
> 
> Or just make it #ifdef BSD, or call virNetDevExists() to check it ?

I think I came to an #idef based idea which looks more or less easy to
follow:

 - in virnetdevtap.h, define something like VIR_TAP_NEEDS_MANUAL_CLEANUP on
   certain OSes (i.e. FreeBSD only at this point)
 - Use it in qemu_process.c (that should be a little more readable than
   #ifdef __FreeBSD__)

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140226/2bcc5c39/attachment-0001.sig>


More information about the libvir-list mailing list