From: Antonio Quartulli <antonio@meshcoding.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Antonio Quartulli <antonio@open-mesh.com>,
Antonio Quartulli <ordex@autistici.org>
Subject: [B.A.T.M.A.N.] [RFC] batman-adv: invoke ogm_schedule() only when the interface is activated
Date: Mon, 10 Feb 2014 10:33:40 +0100 [thread overview]
Message-ID: <1392024820-1436-1-git-send-email-antonio@meshcoding.com> (raw)
From: Antonio Quartulli <ordex@autistici.org>
In the current implementation the first OGM is scheduled
when a new hard-interface is enabled, no matter if it is
active (thus ready for sending packets) or not.
The B.A.T.M.A.N. IV scheduling mechanism works in a way
that reschedules the task forever even if the interface is
not active and therefore everything works as expected.
Unfortunately this behaviour is not fine for other
algorithms which may expect the interface to be active
before scheduling the first OGM.
Therefore change this behaviour by scheduling the first OGM
on interface activation.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
hard-interface.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hard-interface.c b/hard-interface.c
index b851cc5..2a04130 100644
--- a/hard-interface.c
+++ b/hard-interface.c
@@ -320,6 +320,8 @@ batadv_hardif_activate_interface(struct batadv_hard_iface *hard_iface)
batadv_update_min_mtu(hard_iface->soft_iface);
+ /* begin scheduling originator messages on that interface */
+ batadv_schedule_bat_ogm(hard_iface);
out:
if (primary_if)
batadv_hardif_free_ref(primary_if);
@@ -459,9 +461,6 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
"Not using interface %s (retrying later): interface not active\n",
hard_iface->net_dev->name);
- /* begin scheduling originator messages on that interface */
- batadv_schedule_bat_ogm(hard_iface);
-
out:
return 0;
--
1.8.5.4
reply other threads:[~2014-02-10 9:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1392024820-1436-1-git-send-email-antonio@meshcoding.com \
--to=antonio@meshcoding.com \
--cc=antonio@open-mesh.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=ordex@autistici.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