From: Simon Wunderlich <sw@simonwunderlich.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Subject: Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: purge bridge loop avoidance when its disabled
Date: Tue, 17 Nov 2015 13:00:24 +0100 [thread overview]
Message-ID: <13532716.IlYpkySTOG@prime> (raw)
In-Reply-To: <1571436.PpFx5574Ye@voltaire>
[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]
On Tuesday 17 November 2015 16:01:27 Marek Lindner wrote:
> On Monday, November 09, 2015 16:20:52 Simon Wunderlich wrote:
> > -BATADV_ATTR_SIF_BOOL(bridge_loop_avoidance, S_IRUGO | S_IWUSR, NULL);
> > +BATADV_ATTR_SIF_BOOL(bridge_loop_avoidance, S_IRUGO | S_IWUSR,
> > + batadv_bla_status_update);
> >
> > #endif
>
> Are we sure this is correct ? The post function is called whether or not
> there actually was a change in the setting. The check in
> __batadv_store_bool_attr() is this:
>
> ret = batadv_store_bool_attr(buff, count, net_dev, attr->name,
> attr_store);
> if (post_func && ret)
> post_func(net_dev);
>
> Let's ignore for now that ret should be changed to check for '> 0' to avoid
> calling post_func() in case of an error. The return value is always non-
> negative unless the input is broken. You could enable BLA while it already
> is enabled which would reset all claim tables. Is that intended ?
Its not intended, although my initial thought was that it didn't hurt too much
- the backbone gateway and claim tables would be dropped and the interface
would go into the "protected" state again, not allowing broadcasts for 30 (or
60 seconds, if the second patch is applied).
However, since you brought up this point, I think we should really change the
behaviour of batadv_store_bool_attr() and friends, only calling post_func if
there really was a change. I've checked the other functions which use that,
and there shouldn't be any problem with that as far as I see - they do all
some changes which depend on actual changes of the respective parameter. The
other update functions are:
* batadv_dat_status_update
* batadv_update_min_mtu
* batadv_post_gw_reselect
* batadv_nc_status_update
If you agree, I'd send another patch to change the behaviour as proposed.
Cheers,
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2015-11-17 12:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 15:20 [B.A.T.M.A.N.] [PATCH 0/2] Bridge loop avoidance startup fixes Simon Wunderlich
2015-11-09 15:20 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: purge bridge loop avoidance when its disabled Simon Wunderlich
2015-11-17 8:01 ` Marek Lindner
2015-11-17 12:00 ` Simon Wunderlich [this message]
2015-11-21 21:42 ` Marek Lindner
2015-11-09 15:20 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: increase BLA wait periods to 6 Simon Wunderlich
2015-11-21 21:43 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: increase BLA wait periods to6 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=13532716.IlYpkySTOG@prime \
--to=sw@simonwunderlich.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=mareklindner@neomailbox.ch \
/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