public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Matthias Schiffer <mschiffer@universe-factory.net>
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.] [PATCHv2 maint] batman-adv: set network coding packet handlers in batadv_recv_handler_init()
Date: Fri, 27 Sep 2013 10:13:51 +0200	[thread overview]
Message-ID: <52453E3F.6080300@universe-factory.net> (raw)
In-Reply-To: <1412297.LnmMWnToDl@diderot>

[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]

On 09/27/2013 08:07 AM, Marek Lindner wrote:
> On Thursday 26 September 2013 10:29:49 Matthias Schiffer wrote:
>> batman-adv saves its table of packet handlers as a global state, so handlers
>> must be set up only once (and setting them up a second time will fail).
>>
>> The recently-added network coding support tries to set up its handler each
>> time a new softif is registered, which obviously fails when more that one
>> softif is used (and in consequence, the softif creation fails).
>>
>> Fix this by moving the handler setup to batadv_recv_handler_init(), which is
>> called by batman-adv's __init function (and where most other packet
>> handlers are set up).
> 
> Would you mind changing your approach to adding a global nc_init() / nc_free() 
> and do the callback registration there ?
> 
> Thanks,
> Marek
> 

No problem. Any idea for a good name for the new function? Currently,
the init functions are named a bit inconsistently, there is
batadv_iv_init, which is called in batadv_init, and many other
batadv_*_init called in batadv_mesh_init. I'd prefer renaming all those
to batadv_*_mesh_init, but that seems like lots of avoidable changes for
a net/stable patch.

Maybe the maint patch could stay like it is, and I'll add another patch
on top for master that cleans things up?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2013-09-27  8:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26  7:49 [B.A.T.M.A.N.] [PATCH maint] batman-adv: set network coding packet handlers in batadv_recv_handler_init() Matthias Schiffer
2013-09-26  8:29 ` [B.A.T.M.A.N.] [PATCHv2 " Matthias Schiffer
2013-09-27  6:07   ` Marek Lindner
2013-09-27  8:13     ` Matthias Schiffer [this message]
2013-09-27  8:32       ` Marek Lindner
2013-09-27 16:03         ` [B.A.T.M.A.N.] [PATCHv3 maint] batman-adv: set up network coding packet handlers during module init Matthias Schiffer
2013-09-30 13:04           ` Marek Lindner

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=52453E3F.6080300@universe-factory.net \
    --to=mschiffer@universe-factory.net \
    --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