public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM
@ 2011-12-03 20:54 Antonio Quartulli
  2011-12-04  9:36 ` Marek Lindner
  2011-12-04 11:26 ` [B.A.T.M.A.N.] [PATCHv2] " Antonio Quartulli
  0 siblings, 2 replies; 5+ messages in thread
From: Antonio Quartulli @ 2011-12-03 20:54 UTC (permalink / raw)
  To: b.a.t.m.a.n

Whenever we add a local client for which we already have a global entry, the
latter has to be marked with the TT_CLIENT_ROAM flag (instead of
TT_CLIENT_PENDING)

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 translation-table.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/translation-table.c b/translation-table.c
index 7a7df4a..cf3e2c2 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -242,9 +242,11 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
 	if (tt_global_entry) {
 		/* This node is probably going to update its tt table */
 		tt_global_entry->orig_node->tt_poss_change = true;
-		/* The global entry has to be marked as PENDING and has to be
+		/* The global entry has to be marked as ROAMING and has to be
 		 * kept for consistency purpose */
-		tt_global_entry->common.flags |= TT_CLIENT_PENDING;
+		tt_global_entry->common.flags |= TT_CLIENT_ROAM;
+		tt_global_entry->roam_at = jiffies;
+
 		send_roam_adv(bat_priv, tt_global_entry->common.addr,
 			      tt_global_entry->orig_node);
 	}
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM
  2011-12-03 20:54 [B.A.T.M.A.N.] [PATCH] batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM Antonio Quartulli
@ 2011-12-04  9:36 ` Marek Lindner
  2011-12-04 10:35   ` Antonio Quartulli
  2011-12-04 11:26 ` [B.A.T.M.A.N.] [PATCHv2] " Antonio Quartulli
  1 sibling, 1 reply; 5+ messages in thread
From: Marek Lindner @ 2011-12-04  9:36 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Sunday, December 04, 2011 04:54:18 Antonio Quartulli wrote:
> Whenever we add a local client for which we already have a global entry,
> the latter has to be marked with the TT_CLIENT_ROAM flag (instead of
> TT_CLIENT_PENDING)

Am I right that this patch should go into linux 3.2 ? Maybe even to stable ? 
If so, which versions ? linux 3.0 and linux 3.1 ?
Are there more patches for stable from your end ? I'd like to send them in one 
go and not one by one ..

Regards,
Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM
  2011-12-04  9:36 ` Marek Lindner
@ 2011-12-04 10:35   ` Antonio Quartulli
  0 siblings, 0 replies; 5+ messages in thread
From: Antonio Quartulli @ 2011-12-04 10:35 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Sun, Dec 04, 2011 at 05:36:43 +0800, Marek Lindner wrote:
> On Sunday, December 04, 2011 04:54:18 Antonio Quartulli wrote:
> > Whenever we add a local client for which we already have a global entry,
> > the latter has to be marked with the TT_CLIENT_ROAM flag (instead of
> > TT_CLIENT_PENDING)
> 
> Am I right that this patch should go into linux 3.2 ? Maybe even to stable ? 
> If so, which versions ? linux 3.0 and linux 3.1 ?
> Are there more patches for stable from your end ? I'd like to send them in one 
> go and not one by one ..

Actually I would send it to stable-3.1.

Please, give me 12hours more for the other patches. I'll work on them later
today.

Cheers,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [B.A.T.M.A.N.] [PATCHv2] batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM
  2011-12-03 20:54 [B.A.T.M.A.N.] [PATCH] batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM Antonio Quartulli
  2011-12-04  9:36 ` Marek Lindner
@ 2011-12-04 11:26 ` Antonio Quartulli
  2011-12-05 17:04   ` Marek Lindner
  1 sibling, 1 reply; 5+ messages in thread
From: Antonio Quartulli @ 2011-12-04 11:26 UTC (permalink / raw)
  To: b.a.t.m.a.n

In case of a client roaming from node A to node B, the latter have to mark the
corresponding global entry with TT_CLIENT_ROAM (instead of TT_CLIENT_PENDING).

Marking a global entry with TT_CLIENT_PENDING will end up in keeping such entry
forever (because this flag is only meant to be used with local entries and it is
never checked on global ones).

In the worst case (all the clients roaming to the same node A) the local and the
global table will contain exactly the same clients. Batman-adv will continue to
work, but the memory usage is duplicated.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---

* commit message improved

 translation-table.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/translation-table.c b/translation-table.c
index 7a7df4a..cf3e2c2 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -242,9 +242,11 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
 	if (tt_global_entry) {
 		/* This node is probably going to update its tt table */
 		tt_global_entry->orig_node->tt_poss_change = true;
-		/* The global entry has to be marked as PENDING and has to be
+		/* The global entry has to be marked as ROAMING and has to be
 		 * kept for consistency purpose */
-		tt_global_entry->common.flags |= TT_CLIENT_PENDING;
+		tt_global_entry->common.flags |= TT_CLIENT_ROAM;
+		tt_global_entry->roam_at = jiffies;
+
 		send_roam_adv(bat_priv, tt_global_entry->common.addr,
 			      tt_global_entry->orig_node);
 	}
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM
  2011-12-04 11:26 ` [B.A.T.M.A.N.] [PATCHv2] " Antonio Quartulli
@ 2011-12-05 17:04   ` Marek Lindner
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Lindner @ 2011-12-05 17:04 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Sunday, December 04, 2011 19:26:50 Antonio Quartulli wrote:
> In case of a client roaming from node A to node B, the latter have to mark
> the corresponding global entry with TT_CLIENT_ROAM (instead of
> TT_CLIENT_PENDING).
> 
> Marking a global entry with TT_CLIENT_PENDING will end up in keeping such
> entry forever (because this flag is only meant to be used with local
> entries and it is never checked on global ones).
> 
> In the worst case (all the clients roaming to the same node A) the local
> and the global table will contain exactly the same clients. Batman-adv
> will continue to work, but the memory usage is duplicated.

Applied in revision 913c412.

Thanks,
Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-05 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-03 20:54 [B.A.T.M.A.N.] [PATCH] batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM Antonio Quartulli
2011-12-04  9:36 ` Marek Lindner
2011-12-04 10:35   ` Antonio Quartulli
2011-12-04 11:26 ` [B.A.T.M.A.N.] [PATCHv2] " Antonio Quartulli
2011-12-05 17:04   ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox