From patchwork Wed Jun 17 17:04:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexis Green X-Patchwork-Id: 6627201 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1FA239F1C1 for ; Wed, 17 Jun 2015 17:04:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10B502082F for ; Wed, 17 Jun 2015 17:04:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7EF92082B for ; Wed, 17 Jun 2015 17:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755262AbbFQREh (ORCPT ); Wed, 17 Jun 2015 13:04:37 -0400 Received: from mail-ie0-f179.google.com ([209.85.223.179]:33260 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753447AbbFQREg (ORCPT ); Wed, 17 Jun 2015 13:04:36 -0400 Received: by iebgx4 with SMTP id gx4so38080347ieb.0 for ; Wed, 17 Jun 2015 10:04:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:content-type:content-transfer-encoding; bh=MwY5T/4XG3d4lUXN8hGuh0/Uc9Egum1OlE1qfYyb68c=; b=FITYA6XmNegGlrfAQZlt+Ddof46IcCwV8D8pRMoTp57A9BhAg1YCBj80wBrSylPDgu peB38EkuRxpzsvy+qe7/GcKCuFPgRwjmIFBY9D7X9grq0S7SFquKg0H5OMOUQ3KEPZfk pHpoXCEJYXyRmBElrwFyp0ejyFnjP7lI5nBIm6Bvdgvi6umaTB2gELEg2To9X7dRJ56l KJmDWgUqRSM15b84sjYsoJIz6LpXLcSrzLvLDuDAXyr2oZoh1j+JuT4rvlR2QSyfcf9g NQ/kboNqnPAWoNKwp5edJvHc6iUa0OX3uBklW128fAg0N8x7s9KZXoFfNnMJaB/awrDI jiCA== X-Gm-Message-State: ALoCoQln6sl1VCT3Of9uZx9Dc3HCOI54YSwqS/Ea6p5W07HfmaI5fsAleLsBBXPQP7NN3Pme/+kN X-Received: by 10.50.30.105 with SMTP id r9mr37032232igh.11.1434560675728; Wed, 17 Jun 2015 10:04:35 -0700 (PDT) Received: from [10.4.0.237] ([67.137.71.162]) by mx.google.com with ESMTPSA id p196sm2946577iop.15.2015.06.17.10.04.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Jun 2015 10:04:35 -0700 (PDT) Message-ID: <5581A896.6020207@cococorp.com> Date: Wed, 17 Jun 2015 10:04:22 -0700 From: Alexis Green Reply-To: agreen@cococorp.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Johannes Berg CC: Jesse Jones , linux-wireless@vger.kernel.org, "A. Riley Eller" Subject: [PATCH] mac80211: mesh - don't special case routing to transmitter Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jesse Jones 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 Signed-off-by: A. Riley Eller --- -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;