* [B.A.T.M.A.N.] Need some help to understand the code
@ 2016-04-01 12:27 Philipp Psurek
2016-04-02 6:15 ` Sven Eckelmann
2016-04-04 23:15 ` Linus Lüssing
0 siblings, 2 replies; 6+ messages in thread
From: Philipp Psurek @ 2016-04-01 12:27 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Hi all,
I'm 1st term IT student and a candidate for Freifunk's GSoC. I can
imagine to look inside batman-adv. Therefore I've to learn much more
beyond the „Write in C 101“ I took part last year.
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.
Thank you in advance and thank you for batman-adv
best regards,
Philipp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [B.A.T.M.A.N.] Need some help to understand the code
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
1 sibling, 1 reply; 6+ messages in thread
From: Sven Eckelmann @ 2016-04-02 6:15 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]
On Friday 01 April 2016 14:27:31 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.
Hm, I cannot speak for the other people but I would not know of any book which
would prepare you perfectly for writing kernel code. The best resource is the
kernel code itself (LXR is your friend to find things quickly) and the kernel
documentation (e.g. in Documentation/*). Also the Linux Kernel Newbies [1] has
some nice overviews and links to more information.
There are also some books which are well known and can help you to understand
parts better [2,3,4,5]. But I think none of these are must-reads. Having some
of them to find out more about a special topic can be helpful. But don't
wonder when the example codes don't work anymore because the API in the kernel
changed since the book was published :)
I don't know what tasks are currently open in the Freifunk GSoC. But if it is
multicast related then you may better ask Linus about some more literature.
Kind regards,
Sven
[1] http://kernelnewbies.org/
[2] http://www.kroah.com/lkn/
[3] http://www.oreilly.com/openbook/linuxdrive3/book/
[4] http://www.oreilly.com/catalog/understandlni/
[5]
https://www.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [B.A.T.M.A.N.] Need some help to understand the code
2016-04-02 6:15 ` Sven Eckelmann
@ 2016-04-02 7:57 ` Philipp Psurek
0 siblings, 0 replies; 6+ messages in thread
From: Philipp Psurek @ 2016-04-02 7:57 UTC (permalink / raw)
To: Sven Eckelmann, b.a.t.m.a.n
Thank you very much Sven,
I already tried [3] and yes, the API has changed ;-) Some of the
examples has been ported ... I hope to understand this soon.
Am Samstag, den 02.04.2016, 08:15 +0200 schrieb Sven Eckelmann:
> On Friday 01 April 2016 14:27:31 Philipp Psurek wrote:
> [...]
[...]
>
> I don't know what tasks are currently open in the Freifunk GSoC. But
> if it is multicast related then you may better ask Linus about some
> more literature.
OK
[...]
> [3] http://www.oreilly.com/openbook/linuxdrive3/book/
thanx again and
best regards,
Philipp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [B.A.T.M.A.N.] Need some help to understand the code
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-04 23:15 ` Linus Lüssing
2016-04-05 7:11 ` Sven Eckelmann
1 sibling, 1 reply; 6+ messages in thread
From: Linus Lüssing @ 2016-04-04 23:15 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
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).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [B.A.T.M.A.N.] Need some help to understand the code
2016-04-04 23:15 ` Linus Lüssing
@ 2016-04-05 7:11 ` Sven Eckelmann
2016-04-05 7:36 ` Hans-Werner Hilse
0 siblings, 1 reply; 6+ messages in thread
From: Sven Eckelmann @ 2016-04-05 7:11 UTC (permalink / raw)
To: b.a.t.m.a.n, Philipp Psurek
[-- Attachment #1: Type: text/plain, Size: 423 bytes --]
On Tuesday 05 April 2016 01:15:58 Linus Lüssing wrote:
> 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 :).
There is also an easy example how to build an amd64 [1] VM image with
many debug helpers enabled.
Kind regards,
Sven
[1] https://www.open-mesh.org/projects/open-mesh/wiki/Emulation_Debug
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [B.A.T.M.A.N.] Need some help to understand the code
2016-04-05 7:11 ` Sven Eckelmann
@ 2016-04-05 7:36 ` Hans-Werner Hilse
0 siblings, 0 replies; 6+ messages in thread
From: Hans-Werner Hilse @ 2016-04-05 7:36 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Hi,
Am 2016-04-05 09:11, schrieb Sven Eckelmann:
> On Tuesday 05 April 2016 01:15:58 Linus Lüssing wrote:
>> 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 :).
>
> There is also an easy example how to build an amd64 [1] VM image with
> many debug helpers enabled.
And my 2ct: user mode linux still exists - despite making no new
headlines in the news - in current kernels. It might not be fit for
developing PCI device drivers, but for networking code, it's quite nice.
And you can just use gdb on it. It's all just a "make ARCH=um" away! You
want 100 kernel instances communicating using batman-adv? No problem!
Want a conditional breakpoint at some point in the code you don't yet
have a grip on? Inspect stack when things went wrong? Just go ahead :-)
-hwh
(who actually did run 100 UML instances, using batman-adv, just for the
fun of it - and to measure resulting "baseline" traffic)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-05 7:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-04-05 7:11 ` Sven Eckelmann
2016-04-05 7:36 ` Hans-Werner Hilse
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.