Date: Sun, 22 Jun 2008 20:02:03 -0500 From: "Gerry Weaver" <gerryw@compvia.com> To: freebsd-hackers@freebsd.org Subject: Kernel module advice for bandwidth monitor Message-ID: <20080623010203.9a1561c9@mail01>
next in thread | raw e-mail | index | archive | help
Hello All, I am just starting to dig into FreeBSD kernel development and the pfil i= nterface in particular. I am in need of some advice and possibly some po= inters to relevant documentation. I want to develop a bandwidth control = driver and the associated monitoring code. It seems that the bandwidth c= ontrol part of the equation is fairly straight forward with regard to th= e pfil framework. However, my current dilemma centers around the best wa= y to implement monitoring. There seem to be several approaches to doing = this. There is the bandwidth control driver itself, the bpf interface an= d the pcap library. My question concerns performance and network latency= . It would be a given that any approach to monitoring is going to add so= me overhead in these areas, but I'm interested in minimizing this as muc= h as possible. This is precisely where I was hoping to get some advice f= rom the kernel gurus out there. I assume that it is possible for a kerne= l driver to communicate over the network. If, so it would seem that no c= ontext switch to user space would be necessary to transmit stats to ano= ther monitor machine. If the bpf or pcap mechanisms were employed, user = space would become involved. Given the various methods of accessing pack= et data, and the fact that I want to send stats to another machine, whic= h approach would require the least overhead=3F Also, are there any good = docs or possibly some code that I could look at that would illustrate th= e requirements/details of network communication from within a kernel dri= ver=3F I searched the relevant lists for this, but was not able to find = anything that looked like what I needed. I apologize if I have missed so= mething. Please forgive my newbness as I'm just starting out. Hopefully = my questions are not too foolish ;) Thanks, Gerry
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080623010203.9a1561c9>