Skip to contentSkip to conversation

mac80211: Fixed bug in mesh portal paths

PATCH In review Javier Cardona 3 participants 4 messages Dec 10, 2009 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mac80211: Fixed bug in mesh portal paths

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.

---
 net/mac80211/rx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
net/mac80211/rx.c +0 -1
index 8b3faa8..3d88541 100644
@@ -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);
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 2/2 mac80211: Revert 'Use correct sign for mesh active path refresh'

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

---
 net/mac80211/mesh.h      |    5 +++--
 net/mac80211/mesh_hwmp.c |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
net/mac80211/mesh.h +3 -2
index 31e1025..85562c5 100644
@@ -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)
net/mac80211/mesh_hwmp.c +1 -1
index 9aecf02..c43fa91 100644
@@ -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)
Signature · 1 line
1.6.3.3
#2 lore raw
In reply to Javier Cardona
Quoted 6 lines · Javier Cardona

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.

Is Cc: [email protected] required or does actually CC'ing [email protected] 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

#3 lore raw
Quoted 8 lines · Luis R. Rodriguez
Quoted 6 lines · Javier Cardona

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.

Quoted 6 lines

Is Cc: [email protected] required or does actually CC'ing [email protected] 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 [email protected] is highly recommended (within their guidelines, of course).

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.