All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: Only process mesh PREPs with equal seq number if metric is better.
@ 2011-05-06 22:11 Javier Cardona
  2011-05-06 22:17 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Javier Cardona @ 2011-05-06 22:11 UTC (permalink / raw)
  To: John W. Linville
  Cc: Fabrice Deyber, Javier Cardona, Thomas Pedersen, devel,
	Johannes Berg, linux-wireless, jlopex

From: Fabrice Deyber <fabricedeyber@agilemesh.com>

This fixes routing loops in PREP propagation and is in accordance with Draft
11, Section: 11C.9.8.4.

Signed-off-by: Fabrice Deyber <fabricedeyber@agilemesh.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
---
 net/mac80211/mesh_hwmp.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index e57f2e7..849fecd 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -391,7 +391,6 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
 			    (mpath->flags & MESH_PATH_SN_VALID)) {
 				if (SN_GT(mpath->sn, orig_sn) ||
 				    (mpath->sn == orig_sn &&
-				     action == MPATH_PREQ &&
 				     new_metric >= mpath->metric)) {
 					process = false;
 					fresh_info = false;
-- 
1.7.1


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

* Re: [PATCH] mac80211: Only process mesh PREPs with equal seq number if metric is better.
  2011-05-06 22:11 [PATCH] mac80211: Only process mesh PREPs with equal seq number if metric is better Javier Cardona
@ 2011-05-06 22:17 ` Johannes Berg
  2011-05-06 22:28   ` Javier Cardona
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2011-05-06 22:17 UTC (permalink / raw)
  To: Javier Cardona
  Cc: John W. Linville, Fabrice Deyber, Thomas Pedersen, devel,
	linux-wireless, jlopex

On Fri, 2011-05-06 at 15:11 -0700, Javier Cardona wrote:
> From: Fabrice Deyber <fabricedeyber@agilemesh.com>
> 
> This fixes routing loops in PREP propagation and is in accordance with Draft
> 11, Section: 11C.9.8.4.

> +++ b/net/mac80211/mesh_hwmp.c
> @@ -391,7 +391,6 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
>  			    (mpath->flags & MESH_PATH_SN_VALID)) {
>  				if (SN_GT(mpath->sn, orig_sn) ||
>  				    (mpath->sn == orig_sn &&
> -				     action == MPATH_PREQ &&

I don't understand how removing the action comparison maps to the patch
description -- can you explain a bit more?

johannes


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

* Re: [PATCH] mac80211: Only process mesh PREPs with equal seq number if metric is better.
  2011-05-06 22:17 ` Johannes Berg
@ 2011-05-06 22:28   ` Javier Cardona
  2011-05-06 22:38     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Javier Cardona @ 2011-05-06 22:28 UTC (permalink / raw)
  To: Johannes Berg
  Cc: John W. Linville, Fabrice Deyber, Thomas Pedersen, devel,
	linux-wireless, jlopex

On Fri, May 6, 2011 at 3:17 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Fri, 2011-05-06 at 15:11 -0700, Javier Cardona wrote:
>> From: Fabrice Deyber <fabricedeyber@agilemesh.com>
>>
>> This fixes routing loops in PREP propagation and is in accordance with Draft
>> 11, Section: 11C.9.8.4.
>
>> +++ b/net/mac80211/mesh_hwmp.c
>> @@ -391,7 +391,6 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
>>                           (mpath->flags & MESH_PATH_SN_VALID)) {
>>                               if (SN_GT(mpath->sn, orig_sn) ||
>>                                   (mpath->sn == orig_sn &&
>> -                                  action == MPATH_PREQ &&
>
> I don't understand how removing the action comparison maps to the patch
> description -- can you explain a bit more?

If the if condition is true, this PREQ or PREP will be ignored.  The
first part of the condition eliminates old sequence numbers, where the
metric is not checked.  The second part of the if condidion (||
(mpath->sn == ...) used to eliminate all the PREQs with equal seq
number and worse metric.  The patch modifies it to also eliminate
PREPs.

j


-- 
Javier Cardona
cozybit Inc.
http://www.cozybit.com

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

* Re: [PATCH] mac80211: Only process mesh PREPs with equal seq number if metric is better.
  2011-05-06 22:28   ` Javier Cardona
@ 2011-05-06 22:38     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2011-05-06 22:38 UTC (permalink / raw)
  To: Javier Cardona
  Cc: John W. Linville, Fabrice Deyber, Thomas Pedersen, devel,
	linux-wireless, jlopex

On Fri, 2011-05-06 at 15:28 -0700, Javier Cardona wrote:

> >> This fixes routing loops in PREP propagation and is in accordance with Draft
> >> 11, Section: 11C.9.8.4.
> >
> >> +++ b/net/mac80211/mesh_hwmp.c
> >> @@ -391,7 +391,6 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
> >>                           (mpath->flags & MESH_PATH_SN_VALID)) {
> >>                               if (SN_GT(mpath->sn, orig_sn) ||
> >>                                   (mpath->sn == orig_sn &&
> >> -                                  action == MPATH_PREQ &&
> >
> > I don't understand how removing the action comparison maps to the patch
> > description -- can you explain a bit more?
> 
> If the if condition is true, this PREQ or PREP will be ignored.  The
> first part of the condition eliminates old sequence numbers, where the
> metric is not checked.  The second part of the if condidion (||
> (mpath->sn == ...) used to eliminate all the PREQs with equal seq
> number and worse metric.  The patch modifies it to also eliminate
> PREPs.

Ah. Thanks for the explanation, guess I shouldn't be trying to read this
after midnight :-)

johannes


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

end of thread, other threads:[~2011-05-06 22:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-06 22:11 [PATCH] mac80211: Only process mesh PREPs with equal seq number if metric is better Javier Cardona
2011-05-06 22:17 ` Johannes Berg
2011-05-06 22:28   ` Javier Cardona
2011-05-06 22:38     ` Johannes Berg

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.