[libvirt] [PATCH 1 of 3] [LXC] Add functions to manage veth device pairs

Dan Smith danms at us.ibm.com
Thu Jun 19 17:46:40 UTC 2008


DV> Hum, it's not only a kernel feature, it looks more like a
DV> dependancy on iproute, maybe that can be checked at runtime when
DV> initializing the lxc module, no ?

I suppose I could actually let it fail when it tries to do the actual
move.  Would you rather a specific test during the define stage to
reject the <interface> if the non-netns 'ip' command is found?

>> +    if (0 != VIR_ALLOC_N(argv[pidArgvOffset], (sizeof(int) * 3) + 1)) {
>> +        goto error_out;
>> +    }

DV>    Hum, here i don't understand, if argv is defined as local stack data,
DV> I find a bit confusing to use it in the argument for VIR_ALLOC_N. I would
DV> use an intermediate local variable to make this cleaner/ easier to read.

>> +    len = snprintf(argv[pidArgvOffset], (sizeof(int) * 3) + 1, "%d", pidInNs);

DV>   yeah I'm getting very confused by that code :-)

Agreed, I'll fix it up :)

DV>   Oh can you use

DV> /*
DV>  * veth.h: .... a proper file description :-) ....
DV>  *
DV>  * Copyright IBM Corp. 2008
DV>  *
DV>  * See COPYING.LIB for the License of this software
DV>  *
DV>  * Authors:
DV>  *  David L. Leskovec <dlesko at linux.vnet.ibm.com>
DV>  */

DV> as the header template for the two new files to match the other files.
DV> COPYING.LIB is of course LGPL 2.1

Okay, I'll change it.

Thanks!

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080619/e9d8399f/attachment-0001.sig>


More information about the libvir-list mailing list