[libvirt] [PATCH] network: Add bandwidth support to ethernet interface

Anirban Chakraborty abchak at juniper.net
Wed Nov 12 18:32:10 UTC 2014



On 11/12/14, 2:53 AM, "Michal Privoznik" <mprivozn at redhat.com> wrote:

>On 11.11.2014 23:45, Anirban Chakraborty wrote:
>> 
>> 
>> On 11/10/14, 3:13 PM, "Eric Blake" <eblake at 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
>> ----
>
>This message comes from the linker. So you're not exporting the
>virDomainClearNetBandwidth anywhere. I mean, you need to add it to the
>src/libvirt_private.syms and the error will go away.

Thanks a lot for the tip. It works now. I wasn’t aware of the existence of
a symbol export file.

Anirban





More information about the libvir-list mailing list