linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexis Green <agreen@cococorp.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Jesse Jones <jjones@cococorp.com>,
	linux-wireless@vger.kernel.org,
	"A. Riley Eller" <reller@cococorp.com>
Subject: [PATCH] mac80211: mesh - don't special case routing to transmitter
Date: Wed, 17 Jun 2015 10:04:22 -0700	[thread overview]
Message-ID: <5581A896.6020207@cococorp.com> (raw)

From: Jesse Jones <jjones@cococorp.com>

Updating the path to the transmitter of a path message is optional
according to section 13.10.8.4 of the standard. Doing so can lead to
better performance since we can adjust the route to the transmitter based
on the freshest possible information. However it can also cause routing
loops with more than four or five nodes. Trading off routing correctness
for a marginal performance improvement seems like a bad idea so this patch
removes that feature.

Signed-off-by: Alexis Green <agreen@cococorp.com>
Signed-off-by: A. Riley Eller <reller@cococorp.com>

---

diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index be63534..5042f48
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -369,7 +369,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
 	struct mesh_path *mpath;
 	struct sta_info *sta;
 	bool fresh_info;
-	const u8 *orig_addr, *ta;
+	const u8 *orig_addr;
 	u32 orig_sn, orig_metric;
 	unsigned long orig_lifetime, exp_time;
 	u32 last_hop_metric, new_metric;
@@ -480,41 +480,6 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
 			spin_unlock_bh(&mpath->state_lock);
 	}
 
-	/* Update and check transmitter routing info */
-	ta = mgmt->sa;
-	if (ether_addr_equal(orig_addr, ta))
-		fresh_info = false;
-	else {
-		fresh_info = true;
-
-		mpath = mesh_path_lookup(sdata, ta);
-		if (mpath) {
-			spin_lock_bh(&mpath->state_lock);
-			if ((mpath->flags & MESH_PATH_FIXED) ||
-				((mpath->flags & MESH_PATH_ACTIVE) &&
-					(last_hop_metric > mpath->metric)))
-				fresh_info = false;
-		} else {
-			mpath = mesh_path_add(sdata, ta);
-			if (IS_ERR(mpath)) {
-				rcu_read_unlock();
-				return 0;
-			}
-			spin_lock_bh(&mpath->state_lock);
-		}
-
-		if (fresh_info) {
-			mesh_path_assign_nexthop(mpath, sta);
-			mpath->metric = last_hop_metric;
-			mpath->exp_time = time_after(mpath->exp_time, exp_time)
-					  ?  mpath->exp_time : exp_time;
-			mesh_path_activate(mpath);
-			spin_unlock_bh(&mpath->state_lock);
-			mesh_path_tx_pending(mpath);
-		} else
-			spin_unlock_bh(&mpath->state_lock);
-	}
-
 	rcu_read_unlock();
 
 	return process ? new_metric : 0;

             reply	other threads:[~2015-06-17 17:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 17:04 Alexis Green [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-06-25  1:55 [PATCH] mac80211: mesh - don't special case routing to transmitter Yeoh Chun-Yeow
2015-06-25 19:35 ` Jesse Jones
2015-06-26  1:32 ` Yeoh Chun-Yeow
2015-06-26  1:52   ` Yeoh Chun-Yeow
2015-06-26 19:15     ` Jesse Jones
2015-06-26 19:46       ` Yeoh Chun-Yeow
2015-06-26 20:13         ` Jesse Jones

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=5581A896.6020207@cococorp.com \
    --to=agreen@cococorp.com \
    --cc=jjones@cococorp.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=reller@cococorp.com \
    /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;
as well as URLs for NNTP newsgroup(s).