On 11/10/14, 3:13 PM, "Eric Blake" <eblake(a)redhat.com> wrote:
On 11/10/2014 03:41 PM, Anirban Chakraborty wrote:
>> BTW: it would be nice if you can version you patches. I mean, this is
>> what, 4th or 5th version? Say that in subject explicitly please. You
>> know, in the prefix: [PATCH v5] network: ...
Using 'git send-email -v5' will do that for you.
Thanks.
>
> I was doing it earlier and then dropped it. I¹ll resin the patch
> addressing all your comments and send it out. However, please let me
>know
> if I should move the above functions (virNetDevBandwidthSet etc.) in
> src/util/virnetdevbandwidth.* and add #include "conf/domain_conf.h" in
> virnetdevbandwidth.h file.
If it needs to reference structs defined in conf/, then the logical
place for the functions is in conf/ (possibly a new file). That way, it
can still be shared between lxc and qemu.
I’m planning to have this function in src/conf/netdev_bandwidth_conf.*,
however, an initial compilation yields following undefined reference from
qemu_process.c:
----
Making all in tests
make[2]: Entering directory `/home/ubuntu/libvirt-ups/tests'
CCLD domaincapstest
../src/.libs/libvirt_driver_qemu_impl.a(libvirt_driver_qemu_impl_la-qemu_pr
ocess.o): In function `qemuProcessStop':
/home/ubuntu/libvirt-ups/src/qemu/qemu_process.c:4847: undefined reference
to `virDomainClearNetBandwidth'
collect2: error: ld returned 1 exit status
----
What am I missing here? All I did was to add virDomainClearNetBandwidth()
to netdev_bandwidth_conf.c (and to .h for function prototype). I have
tried moving this function to domain_conf.c as well, however, didn’t see
any difference in behavior. All other functions from
netdev_bandwidth_conf.c/domain_conf.c are perfectly visible during
compilation.
I have attached the full patch.
Thanks,
Anirban