linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mac80211: Fixed bug in mesh portal paths
@ 2009-12-10  2:43 Javier Cardona
  2009-12-10  2:43 ` [PATCH 2/2] mac80211: Revert 'Use correct sign for mesh active path refresh' Javier Cardona
  2009-12-10  6:20 ` [PATCH 1/2] mac80211: Fixed bug in mesh portal paths Luis R. Rodriguez
  0 siblings, 2 replies; 4+ messages in thread
From: Javier Cardona @ 2009-12-10  2:43 UTC (permalink / raw)
  To: linux-wireless
  Cc: Javier Cardona, Andrey Yurovsky, stable, linville, johannes

Paths to mesh portals were being timed out immediately after each use in
intermediate forwarding nodes.  mppath->exp_time is set to the expiration time
so assigning it to jiffies was marking the path as expired.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
---
 net/mac80211/rx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 8b3faa8..3d88541 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1712,7 +1712,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
 			mpp_path_add(proxied_addr, mpp_addr, sdata);
 		} else {
 			spin_lock_bh(&mppath->state_lock);
-			mppath->exp_time = jiffies;
 			if (compare_ether_addr(mppath->mpp, mpp_addr) != 0)
 				memcpy(mppath->mpp, mpp_addr, ETH_ALEN);
 			spin_unlock_bh(&mppath->state_lock);
-- 
1.6.3.3


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

* [PATCH 2/2] mac80211: Revert 'Use correct sign for mesh active path refresh'
  2009-12-10  2:43 [PATCH 1/2] mac80211: Fixed bug in mesh portal paths Javier Cardona
@ 2009-12-10  2:43 ` Javier Cardona
  2009-12-10  6:20 ` [PATCH 1/2] mac80211: Fixed bug in mesh portal paths Luis R. Rodriguez
  1 sibling, 0 replies; 4+ messages in thread
From: Javier Cardona @ 2009-12-10  2:43 UTC (permalink / raw)
  To: linux-wireless
  Cc: Javier Cardona, Andrey Yurovsky, stable, linville, johannes

The patch (be48ad42a1a6b82108df722034aebd12680bca44) was actually a bug.
Reverted it and improved the explanation of how mesh path refresh works.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
---
 net/mac80211/mesh.h      |    5 +++--
 net/mac80211/mesh_hwmp.c |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 31e1025..85562c5 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -188,8 +188,9 @@ struct mesh_rmc {
  */
 #define MESH_PREQ_MIN_INT	10
 #define MESH_DIAM_TRAVERSAL_TIME 50
-/* Paths will be refreshed if they are closer than PATH_REFRESH_TIME to their
- * expiration
+/* A path will be refreshed if it is used PATH_REFRESH_TIME milliseconds before
+ * timing out.  This way it will remain ACTIVE and no data frames will be
+ * unnecesarily held in the pending queue.
  */
 #define MESH_PATH_REFRESH_TIME			1000
 #define MESH_MIN_DISCOVERY_TIMEOUT (2 * MESH_DIAM_TRAVERSAL_TIME)
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 9aecf02..c43fa91 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -936,7 +936,7 @@ int mesh_nexthop_lookup(struct sk_buff *skb,
 	}
 
 	if (mpath->flags & MESH_PATH_ACTIVE) {
-		if (time_after(jiffies, mpath->exp_time +
+		if (time_after(jiffies, mpath->exp_time -
 			msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time))
 				&& !memcmp(sdata->dev->dev_addr, hdr->addr4,
 					   ETH_ALEN)
-- 
1.6.3.3


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

* Re: [PATCH 1/2] mac80211: Fixed bug in mesh portal paths
  2009-12-10  2:43 [PATCH 1/2] mac80211: Fixed bug in mesh portal paths Javier Cardona
  2009-12-10  2:43 ` [PATCH 2/2] mac80211: Revert 'Use correct sign for mesh active path refresh' Javier Cardona
@ 2009-12-10  6:20 ` Luis R. Rodriguez
  2009-12-10 12:58   ` John W. Linville
  1 sibling, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-12-10  6:20 UTC (permalink / raw)
  To: Javier Cardona
  Cc: linux-wireless, Andrey Yurovsky, stable, linville, johannes

On Wed, Dec 9, 2009 at 6:43 PM, Javier Cardona <javier@cozybit.com> wrote:
> Paths to mesh portals were being timed out immediately after each use in
> intermediate forwarding nodes.  mppath->exp_time is set to the expiration time
> so assigning it to jiffies was marking the path as expired.
>
> Signed-off-by: Javier Cardona <javier@cozybit.com>
> Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>

Is Cc: stable@kernel.org required or does actually CC'ing
stable@kernel.org in the patch suffice? If the patch has the CC
embedded on the commit log I thought stable team would be notified
upon a merge of the patch. Please correct me if I'm wrong.

Would like to verify as I'm going to be a stable whore now.

  Luis

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

* Re: [PATCH 1/2] mac80211: Fixed bug in mesh portal paths
  2009-12-10  6:20 ` [PATCH 1/2] mac80211: Fixed bug in mesh portal paths Luis R. Rodriguez
@ 2009-12-10 12:58   ` John W. Linville
  0 siblings, 0 replies; 4+ messages in thread
From: John W. Linville @ 2009-12-10 12:58 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Javier Cardona, linux-wireless, Andrey Yurovsky, stable, johannes

On Wed, Dec 09, 2009 at 10:20:03PM -0800, Luis R. Rodriguez wrote:
> On Wed, Dec 9, 2009 at 6:43 PM, Javier Cardona <javier@cozybit.com> wrote:
> > Paths to mesh portals were being timed out immediately after each use in
> > intermediate forwarding nodes.  mppath->exp_time is set to the expiration time
> > so assigning it to jiffies was marking the path as expired.
> >
> > Signed-off-by: Javier Cardona <javier@cozybit.com>
> > Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
> 
> Is Cc: stable@kernel.org required or does actually CC'ing
> stable@kernel.org in the patch suffice? If the patch has the CC
> embedded on the commit log I thought stable team would be notified
> upon a merge of the patch. Please correct me if I'm wrong.
> 
> Would like to verify as I'm going to be a stable whore now.

AIUI either is acceptable.  But adding the Cc line in the commit log
aids the stable team in automating their process.

In any case, sending stuff to stable@kernel.org is highly recommended
(within their guidelines, of course).

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

end of thread, other threads:[~2009-12-10 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-10  2:43 [PATCH 1/2] mac80211: Fixed bug in mesh portal paths Javier Cardona
2009-12-10  2:43 ` [PATCH 2/2] mac80211: Revert 'Use correct sign for mesh active path refresh' Javier Cardona
2009-12-10  6:20 ` [PATCH 1/2] mac80211: Fixed bug in mesh portal paths Luis R. Rodriguez
2009-12-10 12:58   ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).