public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] Need some help to understand the code
Date: Tue, 5 Apr 2016 01:15:58 +0200	[thread overview]
Message-ID: <20160404231558.GG3002@otheros> (raw)
In-Reply-To: <1459513651.4076.17.camel@gmail.com>

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).

  parent reply	other threads:[~2016-04-04 23:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 12:27 [B.A.T.M.A.N.] Need some help to understand the code Philipp Psurek
2016-04-02  6:15 ` Sven Eckelmann
2016-04-02  7:57   ` Philipp Psurek
2016-04-04 23:15 ` Linus Lüssing [this message]
2016-04-05  7:11   ` Sven Eckelmann
2016-04-05  7:36     ` Hans-Werner Hilse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160404231558.GG3002@otheros \
    --to=linus.luessing@c0d3.blue \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox