<div dir="ltr"><div><div>Hi Michal,<br><br></div> Thanks for the response.<br><br></div>Regards,<br>Pradeep<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 31 March 2014 16:18, Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 30.03.2014 14:46, Pradeep Kiruvale wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
  I am new to QEMU/libvirt<br>
<br>
   I was starting to learn the libvirt code,I was browsing  the code how<br>
the guest network bandwidth to be set like we mention <inbound> <outbound><br>
tags in the xml,but where in code exactly these values set to the guest<br>
interface.<br>
<br>
I browsed the code a lot could not find it.Please help to understand how<br>
this works.<br>
<br>
<br>
</blockquote>
<br></div></div>
The bandwidth is set in virNetDevBandwidthSet() function:<br>
<br>
<a href="http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/util/virnetdevbandwidth.c;h=b06ed4c63c1e64736718b880b1821d745d7f31c2;hb=HEAD#l60" target="_blank">http://libvirt.org/git/?p=<u></u>libvirt.git;a=blob;f=src/util/<u></u>virnetdevbandwidth.c;h=<u></u>b06ed4c63c1e64736718b880b1821d<u></u>745d7f31c2;hb=HEAD#l60</a><br>

<br>
The basic idea is to call /sbin/tc a few times with the correct arguments (the path to the binary may change through different systems).<span class="HOEnZb"><font color="#888888"><br>
<br>
Michal<br>
</font></span></blockquote></div><br></div>