[libvirt] [PATCH] Split up platfrom specifics from bridge driver

Eric Blake eblake at redhat.com
Thu Jul 18 13:07:30 UTC 2013


On 07/18/2013 03:23 AM, Daniel P. Berrange wrote:
> On Wed, Jul 17, 2013 at 05:41:56PM -0600, Eric Blake wrote:
>> So, although I like the split, I can't help but wonder if your rebase
>> should take the road of adjusting things to use a callback struct,
>> rather than requiring matching implementations across multiple files.
> 
> I think the callback struct approach is useful for the case where you
> have multiple possible implementations compiled in at once and we need
> to choose them dynamically. Here though, we're making the choice at
> compile time, so I think callback + dynamic dispatch is somewhat overkill.
> 
> Following of the virthread approach of #include'ing .c file was my
> suggestion to Roman for how to structure this.

Fair enough.  It just means that we don't have the compiler helping us
remember to add both functions at once, so it raises the probability
that someone will add a Linux-only function and forget to add the noop
counterpart.  But as long as we detect it before a release (that's what
release candidate testing is for, right?) we should be okay.

Roman, I'll accept your code with the .c inclusion, so you don't have to
do the extra work of a dynamic dispatch rewrite; now it's just waiting
for a rebased patch.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130718/da1caefd/attachment-0001.sig>


More information about the libvir-list mailing list