Jeremy Fitzhardinge
2010-Sep-03 19:43 UTC
[Xen-devel] Re: [advices] patch for dynamically changing vif rate via proc file
On 09/02/2010 03:03 AM, ahmed amamou wrote:> Hi Jermey and Chris, > Sorry to bother you with this but as Maintainers of XEN HYPERVISOR > INTERFACE ,i wanted to ask you something > > I trying to make a patch that would allow me to dynamically change vif > rate from a /proc file > change written in proc file will be saved and value of > netif->credit_usec and netif->credit_bytes will be assigned on the > next tx_credit_exceeded check > the patch mat be ready before the end of the day if you want i''ll send > you it as soon as i finish > > i just wanted to ask you if it was a good way to change vif rate from > a proc file,as a beginner i don''t really know to much of best > practises in modules programming/proc is definitely the wrong API for this. For this kind of thing, its probably better to either use netlink, or xenbus (xenstore) to keep this kind of per-interface parameter tuning. But it isn''t even clear that doing it at the device level is correct anyway. If the guest wants to control its own network traffic, or if dom0 wants to control the guest traffic, there are many generic mechanisms for doing traffic shaping. What are you trying to achieve? Thanks, J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
ahmed amamou
2010-Sep-03 23:22 UTC
[Xen-devel] Re: [advices] patch for dynamically changing vif rate via proc file
Hi Jeremy thanks for your answer, I’m working in network virtualization especially in link virtualization we are trying an approach in which a link is a combination of up/down link speed between two points. But as we work in virtual environment fixing up/down link speed for each connection is not a good way o enjoy virtualization benefits. So we have as objective to implement an algorithm that decides each link speed according to priority accorded to each network. We want to change VIF speed instead of doing network shaping because we follow a simple rule in networking, when you don’t need a packet throw it as soon as possible and because in this way we are protocol independent (major traffic shaping method are for IP one ). For using proc is the only way I found for the moment to do what I want because I don’t really understand, at least for the moment, the way all this is working. The best way to do it , I think is to force xen_netif to read credit and usec parameter from xenstore each time it verify tx_credit_exceeded but I didn’t find how to do it (as I say I don’t have a clear vision to all the code) Thanks again for your answer don’t hesitate to emit any critics if you see any incoherence in this idea. Best regards Ahmed AMAMOU _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel