On Fri, Apr 01, 2016 at 02:27:31PM +0200, Philipp Psurek wrote:
If you have some spare time please recommend me some literature that
has helped you on your way to write batman-adv code. I've two, three
weeks to prepare myself and evaluate if I understand the code (or some
parts of it) or participate in fixing some other Freifunk related
issues.
Hi Philipp,
A few of the basics would be lists and locking as they are used
everywhere in the code and would be something you would need to
use and understand for batman-adv coding.
For lists, for instance:
http://www.makelinux.net/ldd3/chp-11-sect-5
http://kernelnewbies.org/FAQ/LinkedLists
Or the kerneldoc for lists themselves :) :
http://lxr.free-electrons.com/source/include/linux/list.h
For locking, two kinds of locks are mostly used in batman-adv. The
easy ones are spin-locks:
http://lxr.free-electrons.com/source/Documentation/locking/spinlocks.txt
And then there is the fancy but super awesome RCU locking :) :
https://lwn.net/Articles/262464/
Finally, knowing how SKBs work is something you should look into
for Linux network coding:
http://vger.kernel.org/~davem/skb.html
A friend of mine had written a small (< 300 lines) but fun kernel module:
https://github.com/Gnoxter/devcat
Maybe you could set up a KVM instance and play a little with its
code in there? Try out lists and spinlocks etc. in there without
crashing the VM instance :).
Cheers, Linus
PS: If you need any help, feel free to query me in #batman on
Freenode (nick: T_X).