Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2318605ybt; Tue, 16 Jun 2020 02:57:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5UNzR84MJZnx0ANFawDRCONTVFv5wTlmsHLQk6jf+Yx0hcbo21WW+yzl2n6D+vvK+hBqR X-Received: by 2002:a17:906:4e0a:: with SMTP id z10mr1926768eju.57.1592301461902; Tue, 16 Jun 2020 02:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592301461; cv=none; d=google.com; s=arc-20160816; b=n+L837n9/ozQwxJQzkwcTyXB2CeO684p+PAgQr3Jth+kv/eZBy6tL7DflLtDFHnKfz oSCih+zMWfOvGqeEtGhnAUmDf7JOjuhZhaEXgiUqsNfN/2d8MU7HtuXRGuervkozqCS+ p56EB+35WwfwHGyjpHbaRykZUeuVQxCPtzcwQkHFsb3dQ+5p9TdcLuoQESVuFSfJFXmt 8e+BhjuJlKO+A0zx+G48Ut3G1gnhY3U5YrZe+8x49/l30jqicyjhe9fyXDDxrN1rwGdG EZhVMhpwVtvv+DVBxyXkCXIt7HM9Z/7M55sVKKSt4QmqADnSIpQ2BUV/UttfzMyL9t+Q JPmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :from; bh=W1bxfH5UQtTaVLAGIdUaDW/4kYkCmlLDeCxRAozivkk=; b=PKEidfnXjBwNE1g27rDm3fhqAEwdAcz+Y/cVSgp/EaDl7PX2/efO/ioJloHBoKfnNg XUr7kFcTCNCM5nzb2fZ0YZpPmjosACI+sLpcts6E1gKETI6cJerBnx4Q8KrPF86WOTSM 6SHpvzNCEIopuUoAgVhGFSvtFwCailgRj8xSAn9eOf1MLQ+Ei8yPw/I2H3e8Mb6COhoh stvzio6Kj8ZvX+WXAMZZLhK684OPmazmDVHNMfhPPi4FGzkTPRLMccdGM8gU0odRXfrx 1KrS/YCa+j6JbI9QLrLcuFQ7MzUWMiRiWKJXErY7zAvaV2Nbxq5Az+19CWOCV0padrVd vBkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@c0d3.blue header.s=2018 header.b=XuH90fbE; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si9963695edw.203.2020.06.16.02.57.08; Tue, 16 Jun 2020 02:57:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@c0d3.blue header.s=2018 header.b=XuH90fbE; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728044AbgFPJyW (ORCPT + 99 others); Tue, 16 Jun 2020 05:54:22 -0400 Received: from mail.aperture-lab.de ([138.201.29.205]:42454 "EHLO mail.aperture-lab.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbgFPJyV (ORCPT ); Tue, 16 Jun 2020 05:54:21 -0400 From: =?UTF-8?q?Linus=20L=C3=BCssing?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c0d3.blue; s=2018; t=1592301259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W1bxfH5UQtTaVLAGIdUaDW/4kYkCmlLDeCxRAozivkk=; b=XuH90fbEe7EGShZRxZU9XJgqMJa48jhv66deQK9F8C744EVdmRgMTsGSST1EPVYfhrIiXI jSOhIQeIAVEiFvQrOT/B7Ib16CQG+aHOGxWAqwkqj22vJRBb/7UHPDT1eRFu2IouHlKPjm fl2lYbBIatYjPprdRK8rGf1ih5Ifi+nai8KAsyKWtJJ686nyEJRvddY+mLJ+Ja1dsii2Zl zpLQ3T39pwzwWWARnSOjWncn/Kiq30ZXT75EIFgRPnLtfmgLTfiOyXnNKjLM8UVO6aj/qf /EgipImIGe/Iklz9leDA6Jjhn39IbOPfvwonzbycmOhUpRMoDbe4y/Zd25K+sw== To: Johannes Berg Cc: linux-wireless@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, =?UTF-8?q?Linus=20L=C3=BCssing?= , Sven Eckelmann , Simon Wunderlich Subject: [PATCH] iw: mesh: add mesh_param "mesh_nolearn" to skip path discovery Date: Tue, 16 Jun 2020 11:53:58 +0200 Message-Id: <20200616095358.20143-2-linus.luessing@c0d3.blue> In-Reply-To: <20200616095358.20143-1-linus.luessing@c0d3.blue> References: <20200616095358.20143-1-linus.luessing@c0d3.blue> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=linus.luessing@c0d3.blue smtp.mailfrom=linus.luessing@c0d3.blue Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Linus Lüssing Currently, before being able to forward a packet between two 802.11s nodes, both a PLINK handshake is performed upon receiving a beacon and then later a PREQ/PREP exchange for path discovery is performed on demand upon receiving a data frame to forward. When running a mesh protocol on top of an 802.11s interface, like batman-adv, we do not need the multi-hop mesh routing capabilities of 802.11s and usually set mesh_fwding=0. However, even with mesh_fwding=0 the PREQ/PREP path discovery is still performed on demand. Even though in this scenario the next hop PREQ/PREP will determine is always the direct 11s neighbor node. The new mesh_nolearn parameter allows to skip the PREQ/PREP exchange in this scenario, leading to a reduced delay, reduced packet buffering and simplifies HWMP in general. mesh_nolearn is still rather conservative in that if the packet destination is not a direct 11s neighbor, it will fall back to PREQ/PREP path discovery. For normal, multi-hop 802.11s mesh routing it is usually not advisable to enable mesh_nolearn as a transmission to a direct but distant neighbor might be worse than reaching that same node via a more robust / higher throughput etc. multi-hop path. Cc: Sven Eckelmann Cc: Simon Wunderlich Signed-off-by: Linus Lüssing --- mesh.c | 2 ++ nl80211.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/mesh.c b/mesh.c index 0650d0c..48bbc3f 100644 --- a/mesh.c +++ b/mesh.c @@ -264,6 +264,8 @@ static const struct mesh_param_descr _mesh_param_descrs[] = _my_nla_put_u16, _parse_u16, _print_u16_in_TUs}, {"mesh_plink_timeout", NL80211_MESHCONF_PLINK_TIMEOUT, _my_nla_put_u32, _parse_u32, _print_u32_in_seconds}, + {"mesh_nolearn", NL80211_MESHCONF_NOLEARN, + _my_nla_put_u8, _parse_u8_as_bool, _print_u8}, }; static void print_all_mesh_param_descr(void) diff --git a/nl80211.h b/nl80211.h index c14666b..4c55e89 100644 --- a/nl80211.h +++ b/nl80211.h @@ -4228,6 +4228,12 @@ enum nl80211_mesh_power_mode { * field. If left unset then the mesh formation field will only * advertise such if there is an active root mesh path. * + * @NL80211_MESHCONF_NOLEARN: Try to avoid multi-hop path discovery (e.g. + * PREQ/PREP for HWMP) if the destination is a direct neighbor. Note that + * this might not be the optimal decision as a multi-hop route might be + * better. So if using this setting you will likely also want to disable + * dot11MeshForwarding and use another mesh routing protocol on top. + * * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use */ enum nl80211_meshconf_params { @@ -4261,6 +4267,7 @@ enum nl80211_meshconf_params { NL80211_MESHCONF_AWAKE_WINDOW, NL80211_MESHCONF_PLINK_TIMEOUT, NL80211_MESHCONF_CONNECTED_TO_GATE, + NL80211_MESHCONF_NOLEARN, /* keep last */ __NL80211_MESHCONF_ATTR_AFTER_LAST, -- 2.27.0