[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Kernel module advice for bandwidth monitor
From:       "Gerry Weaver" <gerryw () compvia ! com>
Date:       2008-06-23 1:02:03
Message-ID: 20080623010203.9a1561c9 () mail01
[Download RAW message or body]

Hello All,

I am just starting to dig into FreeBSD kernel development and the pfil interface in \
particular. I am in need of some advice and possibly some pointers to relevant \
documentation. I want to develop a bandwidth control driver and the associated \
monitoring code. It seems that the bandwidth control part of the equation is fairly \
straight forward with regard to the pfil framework. However, my current dilemma \
centers around the best way to implement monitoring. There seem to be several \
approaches to doing this. There is the bandwidth control driver itself, the bpf \
interface and the pcap library. My question concerns performance and network latency. \
It would be a given that any approach to monitoring is going to add some overhead in \
these areas, but I'm interested in minimizing this as much as possible. This is \
precisely where I was hoping to get some advice from the kernel gurus out there. I \
assume that it is possible for a kernel driver to communicate over the network. If, \
so it would seem that no context switch to user space would be necessary  to transmit \
stats to another monitor machine. If the bpf or pcap mechanisms were employed, user \
space would become involved. Given the various methods of accessing packet data, and \
the fact that I want to send stats to another machine, which approach would require \
the least overhead? Also, are there any good docs or possibly some code that I could \
look at that would illustrate the requirements/details of network communication from \
within a kernel driver? 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 something. \
Please forgive my newbness as I'm just starting out. Hopefully my questions are not \
too foolish ;)


Thanks,
Gerry
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic