From patchwork Wed Aug 16 16:39:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 18589 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 9BDFB835CA for ; Wed, 16 Aug 2023 18:41:04 +0200 (CEST) ARC-Seal: i=3; cv=pass; a=rsa-sha256; d=open-mesh.org; s=20121; t=1692204064; b=rThZrtlgYMdPZ7EiyLsRcf9j1dqp8P0p1y6LKdc0bl4UyyvrHvcVjlZZD52gdJc/eOIrG GsZKRvoU0aS/zIiGQavVAxRVQDBVAymChc4rIdpEXNaJ9ettGUphB8RXkvJn3Cp9Cqhc5Eb 84ZgT27/gL1CTVdSyI/kIG2de/O/dwc= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204064; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=amJQTPXrCeuUiYKJIPBLJv02MxYZRVyiUw9AyUoaEmQ=; b=vOyJ3pMvtRSjLTnzk0van556uO+ReYkub4YmTWoWolR3Y9GL1D+rEZ2kbqnajOhptyqiT 0cdnqUGJ1SeU32QYE4ASqKtkLLJ5AeARrdN7fxASJjcltmggfKBRJyuMdt1sjEQQoR6V5qJ 4Q5w5QxGujhx8l1UyUFfhTOV35FbqXE= ARC-Authentication-Results: i=3; open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Authentication-Results: open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [23.88.38.48]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 3D2C98011C for ; Wed, 16 Aug 2023 18:40:02 +0200 (CEST) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=amJQTPXrCeuUiYKJIPBLJv02MxYZRVyiUw9AyUoaEmQ=; b=MxJcgGwwbzCHdKHHrrLdktzBi+fXPEa0pPTRYsg+zQ2Ad1bJcep5QrYaUTh9gxqYHN8B6S eq3Xz+RM5DE86MS9YM2pmEOKH9NMBBQqjirGelbDDaWg6Huc17KD5Ty9ntiWERbRzRaHP+ d7IehHmKW1uX73uxgpj8veiewh9nfBk= ARC-Authentication-Results: i=2; diktynna.open-mesh.org; dkim=pass header.d=simonwunderlich.de header.s=09092022 header.b=Kp9TQ+Yt; spf=pass (diktynna.open-mesh.org: domain of sw@simonwunderlich.de designates 23.88.38.48 as permitted sender) smtp.mailfrom=sw@simonwunderlich.de; dmarc=pass (policy=none) header.from=simonwunderlich.de; arc=pass ("simonwunderlich.de:s=09092022:i=1") ARC-Seal: i=2; s=20121; d=open-mesh.org; t=1692204002; a=rsa-sha256; cv=pass; b=kAxTAuxsVICeeOnmtAmdJaSAfLh/JfvgRj1YQ7n+yRI4o59LYRmggA4JaHJZeYpFGpgT0y OK0qXRbtlupdxfneGHn//rpA0TIIt15ZJF/h61PZ2YlrSDGxMRi9EJRJUDKBMF7cWN1nI9 kbqIBTRr27rLySk3vjic5XTbt4KI5+c= Received: from kero.packetmixer.de (p200300Fa272a67000BB2D6DCAF57d46e.dip0.t-ipconnect.de [IPv6:2003:fa:272a:6700:bb2:d6dc:af57:d46e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with ESMTPSA id DF06FFB5C4; Wed, 16 Aug 2023 18:40:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204002; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=amJQTPXrCeuUiYKJIPBLJv02MxYZRVyiUw9AyUoaEmQ=; b=Kp9TQ+YtoGGHDDL28+D5GjW/EjCoCqxQT9iOMXbSplYWYauFZC+Zz22I74uTdd1osMdx/p WG2VnXo/8fSUj6QPvdfAZP8HcdH1+bJaENYm4zUywUNzAiVNNjEYrG6ItXjkrGoZnkHRe6 SXrpSsQvTo1A2JfVPikuIyW8XplKa8A2eU4bUWNITEx52Dzohq++duLu1ZOSfsGrBWBQHj 7qovh7oAdKVEYCbVhAx2xf3MSbK5mSU0p6Pu+AOtQO8/0UayKSk6MTI1+tTsd4EpojrvlV ZjwA0TIQJEclnU62HJ8NGs7dKL2SZ6MoSiNqfMfv78f+DkpQaYXKOmjYedT/UQ== From: Simon Wunderlich To: kuba@kernel.org, davem@davemloft.net Subject: [PATCH 1/7] batman-adv: Start new development cycle Date: Wed, 16 Aug 2023 18:39:54 +0200 Message-Id: <20230816164000.190884-2-sw@simonwunderlich.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816164000.190884-1-sw@simonwunderlich.de> References: <20230816164000.190884-1-sw@simonwunderlich.de> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204002; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=amJQTPXrCeuUiYKJIPBLJv02MxYZRVyiUw9AyUoaEmQ=; b=qc3/HpVqg9desG0/jzyJbn1zWCN6/fPRJYNVsdlmbHHpmqea1xsNZw6XdFaDlCIHcOkd6Q ZxJAgjnHzYT/tCdjN+vTofruJSTywIRChO6zfjIzlawC0O4aJWu442i/Tx9wYIjeXHlGOT Rulwus+yKUIxsS1lgKRuUA4InXcrvtQe7fDwCoc+N30fQpUoHlOaAafN7DZn+GB4bOgt5A UaiXNZpJWah9TTbnt5TNXJga3fbO66tAaHgoGt0PfE4p+h5hjtTx7mE0tNJIg3BHrin1zS /+XQNkuK51hTqkLlsdRRhgMixgdT/Kr28Z4e2U3sy1gJ61K2wwdjGMaNsqn6xg== ARC-Seal: i=1; s=09092022; d=simonwunderlich.de; t=1692204002; a=rsa-sha256; cv=none; b=12vnSjM6zHgsGbIzvXGWSXbUnpAO9GKEA8Z421OW7nlBEXf1s3IHnqfDoM7fiUSErrrGPPQlGWqHw/3/X+ThbDW/2/vfHqnhOjzs4TB6yCnzX6vOZqCb3o7m8P1IFUEQfAx8IfUv8q0r9lzo0tu+fC5HZvMJYVQTxDq2dHHwpNu80iLbOqx0W3oJknvu7Zi3av9l9fE29gRW54h6FKA2skM6onxoisVPfytK2M0AVjef0VE2L8iDRR2iYREUBm8C91HJOc1e6t93TsZJ/mhsrEV3npvtdpp0Z0PCvQrbexjs63bfviFoOGOOkiKZ1T9TmGgwEW9LzbBeQDziyvYHPQ== ARC-Authentication-Results: i=1; mail.simonwunderlich.de; auth=pass smtp.auth=sw@simonwunderlich.de smtp.mailfrom=sw@simonwunderlich.de Message-ID-Hash: AMVG6BHBMYQX6GR5RYOT244UI2QFA4BY X-Message-ID-Hash: AMVG6BHBMYQX6GR5RYOT244UI2QFA4BY X-MailFrom: sw@simonwunderlich.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This version will contain all the (major or even only minor) changes for Linux 6.6. The version number isn't a semantic version number with major and minor information. It is just encoding the year of the expected publishing as Linux -rc1 and the number of published versions this year (starting at 0). Signed-off-by: Simon Wunderlich --- net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 156ed39eded1..10007c5894a1 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -13,7 +13,7 @@ #define BATADV_DRIVER_DEVICE "batman-adv" #ifndef BATADV_SOURCE_VERSION -#define BATADV_SOURCE_VERSION "2023.1" +#define BATADV_SOURCE_VERSION "2023.3" #endif /* B.A.T.M.A.N. parameters */ From patchwork Wed Aug 16 16:39:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 18591 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id DAE4A83709 for ; Wed, 16 Aug 2023 18:42:44 +0200 (CEST) ARC-Seal: i=3; cv=pass; a=rsa-sha256; d=open-mesh.org; s=20121; t=1692204164; b=iWI5DsrSgQKdQK3bifGbWnVQN6TulSAjpNlPMhCFgthtwQDSAVuXouCNoIJL+TyckS9yn 75sMzgpoUisIoyqZjac1WKgIg6YJNb253RamupozrZdJzKnVGOCg8Uy9pUHkEUri5BzIkiw Ku/AGFQ7FpEZdceWofdIPvCVkJzRU0M= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204164; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=5sUYbNqhvEwel1SnIcIOzH8ev0lU6YpbfJPn2kk+jys=; b=RmMkGRouDcIwhpt0xi2mEMyMFlTOrs5Lj6jg07QM+QKIDs74XcdbD6btF5zb1HjflLw2u TJTbMJdswZKjlKNtp0Lu5J8vSh88xOby+FJq9MpissLO0vikBskGjoj4psoGPjePmbKv/g2 Bm+6fAIa+jHgMZgrf5xQtVF/qFOHrqE= ARC-Authentication-Results: i=3; open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Authentication-Results: open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [IPv6:2a01:4f8:c17:e8c0::1]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 954BD80920 for ; Wed, 16 Aug 2023 18:40:02 +0200 (CEST) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5sUYbNqhvEwel1SnIcIOzH8ev0lU6YpbfJPn2kk+jys=; b=gtcaqqZSH4JIsA4Z4n4OqVldi3Ui/ncqDtAc0i1hBESaSOL1NFIrfvkndVScyAu3M/bRIF 1pt/IE6INN/jqpK0IE+vJiCvIQkUgF6TyPqqfkwazX+8YaHIQYUvYXxnjWbnxBbr5tSZgf V4QMhV3Ym26SsBgK3fzN4JWrESX5AXM= ARC-Authentication-Results: i=2; diktynna.open-mesh.org; dkim=pass header.d=simonwunderlich.de header.s=09092022 header.b="yI/IKRhF"; spf=pass (diktynna.open-mesh.org: domain of sw@simonwunderlich.de designates 2a01:4f8:c17:e8c0::1 as permitted sender) smtp.mailfrom=sw@simonwunderlich.de; dmarc=pass (policy=none) header.from=simonwunderlich.de; arc=pass ("simonwunderlich.de:s=09092022:i=1") ARC-Seal: i=2; s=20121; d=open-mesh.org; t=1692204003; a=rsa-sha256; cv=pass; b=pXBDvBRBfx03hvjmZIwaz6vm8aHeOqhklFRSCnGDsFVkUtK7S6EyFL91zXsnYblqDhBoSz ok8z0qhjRfhmNd8leBWWN6FqVm64re4ByiDSXJ8ivGoy4JxZYUK6zly0nDzIBhWuqaD3uo 4ALjoFRkfZP4W+4loowwMFn71dUc0R4= Received: from kero.packetmixer.de (p200300FA272a67000Bb2D6DcAf57D46E.dip0.t-ipconnect.de [IPv6:2003:fa:272a:6700:bb2:d6dc:af57:d46e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with ESMTPSA id 3F50DFB5C5; Wed, 16 Aug 2023 18:40:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204002; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5sUYbNqhvEwel1SnIcIOzH8ev0lU6YpbfJPn2kk+jys=; b=yI/IKRhFy+YW+6ro/aDBeavgCLP2gfTSSqqgmlOK6g94B3tgyXgsQaSnO7AaMU0gjz2ouH isi1zVyCb/vH/oCBUaHx1fhVfRDIE4UoJdZPQL+DJMaio8BzNFQokIHK9URzmz5Vk2F/dB moqyqNMPed/JRFDlBeuUZ1cCRPm36DEW3mqxg/AJ0+L1mJBn6G2Ao8hjZ5gRb5ARlW3jAX jOpx6vtI8xN19gIvA5Bj78kL4bGkjMksbaltrAatgbqj2E3RMk/3Kw356MrqddGabXHlut fC/FGUEbzj0aAUYp7q0FubhxUihsr8xPuBKvyb9a8mIDQAyXLYGMEQ57XO8rVg== From: Simon Wunderlich To: kuba@kernel.org, davem@davemloft.net Subject: [PATCH 2/7] batman-adv: Remove unused declarations Date: Wed, 16 Aug 2023 18:39:55 +0200 Message-Id: <20230816164000.190884-3-sw@simonwunderlich.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816164000.190884-1-sw@simonwunderlich.de> References: <20230816164000.190884-1-sw@simonwunderlich.de> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204002; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5sUYbNqhvEwel1SnIcIOzH8ev0lU6YpbfJPn2kk+jys=; b=Gjw+X2TXV9lmXC2cIouRX/GeRbLar2fuBT84HRlICSgzqBChzqj39skcG0mRZu+8mvvh1F G6WVzSF3odlKr1GCo//vvsqO5brAlsO0Euma4NG/bdPz4qkdcqB25FtbisOavGNoKiKuzo lpgg9uNTWp5/DFsgh84CEzK18tKhOpwhZiIpiT+64SUatjoaxLLd5t6r3js0NZJYJsBC4l c+qhsseClEpjaHYnVPqmdSgEuoHxg2I6Hibk5O0Q8IhgTdUlJGX5dQkPt0Fgg8zTvZpoF5 3l/Ig6cDmMOQUHu5OGUsw8x40qgwbr8bjdvavvIMHYofLP15KnH2fQib928uDw== ARC-Seal: i=1; s=09092022; d=simonwunderlich.de; t=1692204002; a=rsa-sha256; cv=none; b=gl2LSSRhCEl91VNW5tZZDVEtC16utTaoobwQUh0q6JOUwaLs4wNhqVfok4sHYDoof2wImu+sRSrd+nEGIQefI4lO7YNaX+tWJiULon1/MD+OiGGzGTh0f+BeNRevoUieTIAsM+E8bx7sb8s55quDgRLHQZFNk4QHBiVMarsJqpPvrhJUhwP4KRNaNP9yxaBvpJRZAmJHS4a1iIZwHXD8UQSGmkWwQSsKyTOkpseE2QF7xgiO54R52psX6htzpQvxDU3sE75s7KO3iSJnJu5TTEMd8mGIceRjBT/bcFuHnLhMhysxNAs7Mc0X3nL8yKyL5qEPePrXe4sD/oPbdJMQAg== ARC-Authentication-Results: i=1; mail.simonwunderlich.de; auth=pass smtp.auth=sw@simonwunderlich.de smtp.mailfrom=sw@simonwunderlich.de Message-ID-Hash: HRJ6JXBF5FYTF67LGGCMEN3HVCHMKG25 X-Message-ID-Hash: HRJ6JXBF5FYTF67LGGCMEN3HVCHMKG25 X-MailFrom: sw@simonwunderlich.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, YueHaibing X-Mailman-Version: 3.3.8 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: YueHaibing Since commit 335fbe0f5d25 ("batman-adv: tvlv - convert tt query packet to use tvlv unicast packets") batadv_recv_tt_query() is not used. And commit 122edaa05940 ("batman-adv: tvlv - convert roaming adv packet to use tvlv unicast packets") left behind batadv_recv_roam_adv(). Signed-off-by: YueHaibing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/routing.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/batman-adv/routing.h b/net/batman-adv/routing.h index 5f387786e9a7..afd15b3879f1 100644 --- a/net/batman-adv/routing.h +++ b/net/batman-adv/routing.h @@ -27,10 +27,6 @@ int batadv_recv_frag_packet(struct sk_buff *skb, struct batadv_hard_iface *iface); int batadv_recv_bcast_packet(struct sk_buff *skb, struct batadv_hard_iface *recv_if); -int batadv_recv_tt_query(struct sk_buff *skb, - struct batadv_hard_iface *recv_if); -int batadv_recv_roam_adv(struct sk_buff *skb, - struct batadv_hard_iface *recv_if); int batadv_recv_unicast_tvlv(struct sk_buff *skb, struct batadv_hard_iface *recv_if); int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb, From patchwork Wed Aug 16 16:39:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 18592 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 78CC181767 for ; Wed, 16 Aug 2023 18:43:25 +0200 (CEST) ARC-Seal: i=3; cv=pass; a=rsa-sha256; d=open-mesh.org; s=20121; t=1692204205; b=bXJFRIT8Y0K6sBz+Q1Nq0HATNJ4LRlM11RjsVHidj6H8mKtULtZ+4S0VyvwoueCDYHbQL hpy8iM0RE9CyTFdF8DjmySLaQZls5yqTT2digfxeXrMQ0zttsJrkNqr8q/H+Y//HHRXE1x+ 2nhtP9r/u3Exr4T24LOCAESM4I6RIrU= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204205; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=3aowMFLZM7X2HepHolPQIe7EpcGzJaDXnHi+P/sor0M=; b=DsL9x4TAGWiZ6/Ne397r0tIjrTjY/cpEZO3XNHCno2z97mVlChc1xBOrpnJHg0c0vxsMi i86oZNKE0iCSyV+ucQIop509sKzMaDXVTZt2jgqzs9kFLYTD5KINZ0npstFJ9zbGiTlufll xgfD7J0/TzBM2C0t6bCB5Vgw7XuOm3s= ARC-Authentication-Results: i=3; open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Authentication-Results: open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [IPv6:2a01:4f8:c17:e8c0::1]) by diktynna.open-mesh.org (Postfix) with ESMTPS id C4D218011C for ; Wed, 16 Aug 2023 18:40:02 +0200 (CEST) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3aowMFLZM7X2HepHolPQIe7EpcGzJaDXnHi+P/sor0M=; b=C4/5H2P6Z5aij5f5mnWo8ChZN+B9iwGHYgVwtxhIq1V+3uVSrctvbVjribA2kHvHEv1uJE yFiBOKHpn+MgSHs/F7NmOLJRBr1ko2O8fEIJ0Vwt9IOoNS2t5fH0eaYtuuiL03urEp9oto pLTcPyCzSZNcinXk8Xd4HiHnjxQE7p0= ARC-Authentication-Results: i=2; diktynna.open-mesh.org; dkim=pass header.d=simonwunderlich.de header.s=09092022 header.b=lV5p9bQi; spf=pass (diktynna.open-mesh.org: domain of sw@simonwunderlich.de designates 2a01:4f8:c17:e8c0::1 as permitted sender) smtp.mailfrom=sw@simonwunderlich.de; dmarc=pass (policy=none) header.from=simonwunderlich.de; arc=pass ("simonwunderlich.de:s=09092022:i=1") ARC-Seal: i=2; s=20121; d=open-mesh.org; t=1692204003; a=rsa-sha256; cv=pass; b=Q5weDyg13BiZ2tWeIMI2AWwOV72YVa4oGDX94w6irGoHnXCh1zQ1/ZOkO9r419Pak5ItWx dkufia6CImrQbpUx0fp8hpRUq5jjtDEbsoTxOo4XdfU5V7w6Jkcp62Zuqn47YvOuLaHJM7 PB2BzWnVhTUV9XlkrlIE9EdB4wUzPeM= Received: from kero.packetmixer.de (p200300fA272a67000bB2d6DCAf57d46e.dip0.t-ipconnect.de [IPv6:2003:fa:272a:6700:bb2:d6dc:af57:d46e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with ESMTPSA id 97F40FB5C6; Wed, 16 Aug 2023 18:40:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204002; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3aowMFLZM7X2HepHolPQIe7EpcGzJaDXnHi+P/sor0M=; b=lV5p9bQiZs5uw9YhXxAdIBYSQRi9TQNzfgmvcXkc8vfyCVqRIcJFPOlwrtGYcioQf2XPqr iyA4FyKm551rS3fH9PBoC9iyzJB149Pyhz3gHRay8LXROX6uBLJMXhymGJUr/ijr2H/LcD fJFXOJTzcaqZErKtd7G0PgGcIjnqdfgZcrE/xjkWcmL8j/q8mQYZ1kFqJRDq2znldRC9Fz lvXgV1Ptikdv+hzHlP6ePhjUwzY2lR7TqpySmXmMq1uvqF8S1lEzMugxVizWZcLl0jOsZd Y/HiGFRPgotuDZqKH78ZmhXKyLVfRo980b2lsUiOTVXOKoKixVyWgozR8+7TfQ== From: Simon Wunderlich To: kuba@kernel.org, davem@davemloft.net Subject: [PATCH 3/7] batman-adv: Avoid magic value for minimum MTU Date: Wed, 16 Aug 2023 18:39:56 +0200 Message-Id: <20230816164000.190884-4-sw@simonwunderlich.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816164000.190884-1-sw@simonwunderlich.de> References: <20230816164000.190884-1-sw@simonwunderlich.de> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204002; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3aowMFLZM7X2HepHolPQIe7EpcGzJaDXnHi+P/sor0M=; b=D3jg9HpRScAbHmU4fzYNsyqDBrLhJkWu2jp/8I6VZv8vKolum0b1g7okYPvoLR7qr6MxAv X7PQ5K5743sI5+Y6D3NNmEuaNZrNteQhCJGxk81/EBpnGPJo5uDJRBXqgXA26ud3omSqx9 0GzMtfpcQCUyJ2bxjUiiwtbxdABnVtgNmzc6rWd6iT3I4gT8Iue7b4Bwj1aPpoitLnwEcW 02juqOWlHXj1DfUjveaoIlbPomJLsyxuY7gQZTTyuXEBIXwDu7tip8aufzeuAhGmeSYzVI vwQ/8RmOhDSbCVzGPw/dCBdt+7tGFgRzOVHaET05G+ShT1egCQANKYNg6Gi1rA== ARC-Seal: i=1; s=09092022; d=simonwunderlich.de; t=1692204002; a=rsa-sha256; cv=none; b=0bv9CU+vS79LbFiWF/Hp+8NyIdw1kx//W84joQFfSPCYewUimo3wPPW0mThM+qhVCHf7j/lOvHgrcxQbKaws9dN/dkjROLDyTdVVqxvTpNF8NHNqKzEFAsR9qt9ddEefKXZlhatEeF14mOrhPPrUSR/8k+WhsmMRR24LOdt4TmivYj1Xjt/NSe/Lt4oMpzsbXx81QYhNQFnS1kJMk4UB1ytCVRViHrmjLLtNGg958i6Vf8wywvgMwfP0/w2SVmOZWMjbOwJeBJ0NremwtkApuFRCLOHVHd8XHQerMj+nvEU0FWv+HPLVksG5seZ+fzid3FxEjvxQLo9EPumVLolGJA== ARC-Authentication-Results: i=1; mail.simonwunderlich.de; auth=pass smtp.auth=sw@simonwunderlich.de smtp.mailfrom=sw@simonwunderlich.de Message-ID-Hash: BEL2BT3ZU2VK4EMNNRS6ETLZF5XKEKEM X-Message-ID-Hash: BEL2BT3ZU2VK4EMNNRS6ETLZF5XKEKEM X-MailFrom: sw@simonwunderlich.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Sven Eckelmann The header linux/if_ether.h already defines a constant for the minimum MTU. So simply use it instead of having a magic constant in the code. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/soft-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index d3fdf82282af..f7947fad06f2 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -154,7 +154,7 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p) static int batadv_interface_change_mtu(struct net_device *dev, int new_mtu) { /* check ranges */ - if (new_mtu < 68 || new_mtu > batadv_hardif_min_mtu(dev)) + if (new_mtu < ETH_MIN_MTU || new_mtu > batadv_hardif_min_mtu(dev)) return -EINVAL; dev->mtu = new_mtu; From patchwork Wed Aug 16 16:39:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 18593 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 1455C8352E for ; Wed, 16 Aug 2023 18:44:06 +0200 (CEST) ARC-Seal: i=3; cv=pass; a=rsa-sha256; d=open-mesh.org; s=20121; t=1692204246; b=c/hHyVU1Vp6KCWSdv9ACNr0rWmQuPjBNNDl1klZazeqs4KYl+GIbY1Np7zrXGLP+U4Ffh oh3v4PhlQLGbOdkEuyFv0cnAb5lMP4as40tXFviMwTPEBygCeSkOTrMt5kDcu7qneT1cuzD WjRuXHwhQfb/EAI/DfbkPeVeIbCQIOc= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204246; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=uW70VC8neWnWOII3gWAKEJvTBQed0PVoEJYqOOj4oac=; b=ms2mHt8R6Va+w9Mw7IfQpC0240ytBAD9rN5Ku7H8fa2d5wH0w8japYdRInyujZFoYr9I2 gCQDewq4r5ZELKZ9d53PSESlvRPeSOcKcsOeagle2gsCyAtNzg3XdKgO5acYeV/nEcwXllw NVd/m2zCQAUIO8D9aSvJ7wZk6XJrujE= ARC-Authentication-Results: i=3; open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Authentication-Results: open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [IPv6:2a01:4f8:c17:e8c0::1]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 8CA7081D81 for ; Wed, 16 Aug 2023 18:40:03 +0200 (CEST) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=uW70VC8neWnWOII3gWAKEJvTBQed0PVoEJYqOOj4oac=; b=Pzv3ZWINFRyR5mvzaEebWyW8iCBl6vTg/YIUu3bNas3VLk6LAhoIvkkr+hojcj6oXpVk9u Vo9simNXrXS3lYBwTIB/J+Eu9C+MZJKFf5t4n2OXOrc033KFSTwloUivWJIKisGCNApv++ J8ItTTC6KJrHR8tGMFdH/MVEHSaJPAg= ARC-Authentication-Results: i=2; diktynna.open-mesh.org; dkim=pass header.d=simonwunderlich.de header.s=09092022 header.b=0pgIlluF; spf=pass (diktynna.open-mesh.org: domain of sw@simonwunderlich.de designates 2a01:4f8:c17:e8c0::1 as permitted sender) smtp.mailfrom=sw@simonwunderlich.de; dmarc=pass (policy=none) header.from=simonwunderlich.de; arc=pass ("simonwunderlich.de:s=09092022:i=1") ARC-Seal: i=2; s=20121; d=open-mesh.org; t=1692204003; a=rsa-sha256; cv=pass; b=imQFLPLEhV16LlMg2T+v1X73ZGOnKHoxiLUn++yVdqMANzjHJC97WkT7ND5v5LYNyiO5Fu 7wgKV0x2tzbSX/b68t5mmOU1/gdXxa4UqH2SF2FQfvwK5Rq5OtOikQPcjTrWDWzbd9LSsq MxwJ/5d6+gIldO0r+t55Gq8EWPQ4UWo= Received: from kero.packetmixer.de (p200300FA272a67000Bb2D6DcAf57D46E.dip0.t-ipconnect.de [IPv6:2003:fa:272a:6700:bb2:d6dc:af57:d46e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with ESMTPSA id 4E9A2FB5CA; Wed, 16 Aug 2023 18:40:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204003; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uW70VC8neWnWOII3gWAKEJvTBQed0PVoEJYqOOj4oac=; b=0pgIlluFbyenkLOXiV2hFNdxgWMSmASEV6FNzo35RFKowAvP+t1JFk9FBL4U1Xn/4HFr3r GtO0f8foQAXJ5j7vr3xWz4bApaZDyknwvfA24EbpQ8napChEui9eWw+w41DK+qDJAAjpmz pj6EW+x2RmBIMe5DMt7RI8fz5ZnsACKc8oxSiQwx2HdZ1rA/odUA9O1Czhr8WEvv3/Lw7e xA7z0JHwXkeSg1xJ+tYvk2P2dtyFj2kFfa27cZ36VjFFkpYrSLLeNJEuI0DDLORnU04rvS YlOYztjqeSxdQk5f5NfFZ6ux5Jh7JLA2MI82AicMjLiO/bXhqjEIKxnn2RFQ8A== From: Simon Wunderlich To: kuba@kernel.org, davem@davemloft.net Subject: [PATCH 5/7] batman-adv: Drop unused function batadv_gw_bandwidth_set Date: Wed, 16 Aug 2023 18:39:58 +0200 Message-Id: <20230816164000.190884-6-sw@simonwunderlich.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816164000.190884-1-sw@simonwunderlich.de> References: <20230816164000.190884-1-sw@simonwunderlich.de> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204003; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uW70VC8neWnWOII3gWAKEJvTBQed0PVoEJYqOOj4oac=; b=n7+iRaexOwST9/xzbZzXws23EGdRsfsehX9ut+4V4rSH/j5kompevJUhBrqRX+didg+zQ7 JtJMTMNgZk6Bh9EEJBeNx1fJLUzWW53S1Zv8poXf3AnGy5DDG+V6QQXxkZgcwsPCivn+dc Zur9jwlHznaDfY0j/NpSSGVJHV3kv9GCPXUqUKefU73cSLkNPvUYW95mlLv6N3RJhTHgsG hlVrSrhDjh9ucPLtQtCmGXP6Xqm0Z4j4irPW2GJ54PWktQqbzR40H1es5UTNdaXfjkjGrF zbcfTsWYJTuPD8fc2Tk1lAdswBBip7r8w79zm8qbTkXnmI6Mv4NszOfM3k0DQQ== ARC-Seal: i=1; s=09092022; d=simonwunderlich.de; t=1692204003; a=rsa-sha256; cv=none; b=NRDQZmqNZwJ06vtJR14s2Kbiu8ZY4LL+IwRIDvE99fs8e8XzOic/nzmEYaCpPgkWKIZ7gjeraxR2qotACDtzy4iaZyYf4ISg8ZDTBaFpzgXlPtrdjFcV+vEL6ZXbay8/4DWNQ7SToLz1AwjyY4jCXYRq4BsQFnhOlhbknMttX12JGpt4SKymONa8BGSd7SnBnizzruO/u2aoqp9w5C6f2LUQj44sArAz9SkyMwc+BH2HJ0uJ8x5+1ztNrea2h+gJ/wAZzIc55vcnILmurk+doqeIbYs6W3DLK4kFS9xiy6gX+R6NLza1nxz59O12HUUlZ3Yynaq2dCMlmPhi2KjtxQ== ARC-Authentication-Results: i=1; mail.simonwunderlich.de; auth=pass smtp.auth=sw@simonwunderlich.de smtp.mailfrom=sw@simonwunderlich.de Message-ID-Hash: P2MXIAOHAKGD2QHD6W5KAFHMHTA2PCKX X-Message-ID-Hash: P2MXIAOHAKGD2QHD6W5KAFHMHTA2PCKX X-MailFrom: sw@simonwunderlich.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Sven Eckelmann This function is no longer used since the sysfs support was removed from batman-adv. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/gateway_common.c | 88 --------------------------------- net/batman-adv/gateway_common.h | 2 - 2 files changed, 90 deletions(-) diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c index 6a964a773f57..d9632607f92b 100644 --- a/net/batman-adv/gateway_common.c +++ b/net/batman-adv/gateway_common.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -90,42 +89,6 @@ bool batadv_parse_throughput(struct net_device *net_dev, char *buff, return true; } -/** - * batadv_parse_gw_bandwidth() - parse supplied string buffer to extract - * download and upload bandwidth information - * @net_dev: the soft interface net device - * @buff: string buffer to parse - * @down: pointer holding the returned download bandwidth information - * @up: pointer holding the returned upload bandwidth information - * - * Return: false on parse error and true otherwise. - */ -static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff, - u32 *down, u32 *up) -{ - char *slash_ptr; - bool ret; - - slash_ptr = strchr(buff, '/'); - if (slash_ptr) - *slash_ptr = 0; - - ret = batadv_parse_throughput(net_dev, buff, "download gateway speed", - down); - if (!ret) - return false; - - /* we also got some upload info */ - if (slash_ptr) { - ret = batadv_parse_throughput(net_dev, slash_ptr + 1, - "upload gateway speed", up); - if (!ret) - return false; - } - - return true; -} - /** * batadv_gw_tvlv_container_update() - update the gw tvlv container after * gateway setting change @@ -155,57 +118,6 @@ void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv) } } -/** - * batadv_gw_bandwidth_set() - Parse and set download/upload gateway bandwidth - * from supplied string buffer - * @net_dev: netdev struct of the soft interface - * @buff: the buffer containing the user data - * @count: number of bytes in the buffer - * - * Return: 'count' on success or a negative error code in case of failure - */ -ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff, - size_t count) -{ - struct batadv_priv *bat_priv = netdev_priv(net_dev); - u32 down_curr; - u32 up_curr; - u32 down_new = 0; - u32 up_new = 0; - bool ret; - - down_curr = (unsigned int)atomic_read(&bat_priv->gw.bandwidth_down); - up_curr = (unsigned int)atomic_read(&bat_priv->gw.bandwidth_up); - - ret = batadv_parse_gw_bandwidth(net_dev, buff, &down_new, &up_new); - if (!ret) - return -EINVAL; - - if (!down_new) - down_new = 1; - - if (!up_new) - up_new = down_new / 5; - - if (!up_new) - up_new = 1; - - if (down_curr == down_new && up_curr == up_new) - return count; - - batadv_gw_reselect(bat_priv); - batadv_info(net_dev, - "Changing gateway bandwidth from: '%u.%u/%u.%u MBit' to: '%u.%u/%u.%u MBit'\n", - down_curr / 10, down_curr % 10, up_curr / 10, up_curr % 10, - down_new / 10, down_new % 10, up_new / 10, up_new % 10); - - atomic_set(&bat_priv->gw.bandwidth_down, down_new); - atomic_set(&bat_priv->gw.bandwidth_up, up_new); - batadv_gw_tvlv_container_update(bat_priv); - - return count; -} - /** * batadv_gw_tvlv_ogm_handler_v1() - process incoming gateway tvlv container * @bat_priv: the bat priv with all the soft interface information diff --git a/net/batman-adv/gateway_common.h b/net/batman-adv/gateway_common.h index 87c37f907261..cb2e72d7ab14 100644 --- a/net/batman-adv/gateway_common.h +++ b/net/batman-adv/gateway_common.h @@ -27,8 +27,6 @@ enum batadv_bandwidth_units { #define BATADV_GW_MODE_CLIENT_NAME "client" #define BATADV_GW_MODE_SERVER_NAME "server" -ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff, - size_t count); void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv); void batadv_gw_init(struct batadv_priv *bat_priv); void batadv_gw_free(struct batadv_priv *bat_priv); From patchwork Wed Aug 16 16:39:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 18590 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 1CA1E83266 for ; Wed, 16 Aug 2023 18:42:02 +0200 (CEST) ARC-Seal: i=3; cv=pass; a=rsa-sha256; d=open-mesh.org; s=20121; t=1692204122; b=4LpMXhFrqf6o6rrW31tNrOHLfXDSNWHIGAK7sjiNSW7seru71/Jr29iI8Efu3sIVekjrz A75l/upKo/1sK73f822JsMDkfmytDpy/9Nzw59e9uA+Skpwm6PMjGIoBE6/sEreDqm7sUM5 hFXnjFx4aeOz7yqMwFOq+ZPbt+aGo6Y= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204122; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=11GJVf3mHqk6CBqwQS0ucNSZAqSlqPiz6vx8rtLSE8Q=; b=DavNjaolWqTgSGImf72TRs+Qp754ugn5bMh/qBLvLs7zp5fl7nGpw5dCJK3Q06S0KAUMe M7sLpuFWu0/GktxQhLUYmk9Js7WwW/GK8D8s43SDXh6mRANW89mMryD3CvJBj4nID7vGTm7 gKehfZuwGJUfhJC1n82UkEMvGW/3TAw= ARC-Authentication-Results: i=3; open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Authentication-Results: open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [IPv6:2a01:4f8:c17:e8c0::1]) by diktynna.open-mesh.org (Postfix) with ESMTPS id D345B81E85 for ; Wed, 16 Aug 2023 18:40:03 +0200 (CEST) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=11GJVf3mHqk6CBqwQS0ucNSZAqSlqPiz6vx8rtLSE8Q=; b=OllGkV9AxCcvpUKkejBjG4nluEU+5ehA7diq5HgwxXn5cM5mUB3RqBzdYbxUfTqFHxk61R PFxvSMpLmEOk1eAz1/ko2395H+Lady0LlEz+MXNEB8Uk+NEEOtPTzbFE84M3zd2BbbTuOs 5QBKIIyxcH9OffCEdcFofpRAN0bgYIU= ARC-Authentication-Results: i=2; diktynna.open-mesh.org; dkim=pass header.d=simonwunderlich.de header.s=09092022 header.b=1gXJSkh5; spf=pass (diktynna.open-mesh.org: domain of sw@simonwunderlich.de designates 2a01:4f8:c17:e8c0::1 as permitted sender) smtp.mailfrom=sw@simonwunderlich.de; dmarc=pass (policy=none) header.from=simonwunderlich.de; arc=pass ("simonwunderlich.de:s=09092022:i=1") ARC-Seal: i=2; s=20121; d=open-mesh.org; t=1692204003; a=rsa-sha256; cv=pass; b=xEAXPxLch3hyla8Hl0VBN0gl3BEaDqBAltlgxb9eNPG6UKrDLF3gLv5noS/GTABzFgz0wP BQRzjI5wxvDlwFzmMMTGZmFa8HhdTtX77jwpsPERtmxQNm66JbhokO8kFwP4zT2vm3drOs XcZrL/VKT+s2F/IT8ruoo1CVm8HHj8g= Received: from kero.packetmixer.de (p200300fA272a67000bB2d6DCAf57d46e.dip0.t-ipconnect.de [IPv6:2003:fa:272a:6700:bb2:d6dc:af57:d46e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with ESMTPSA id A3E20FB5CB; Wed, 16 Aug 2023 18:40:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204003; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=11GJVf3mHqk6CBqwQS0ucNSZAqSlqPiz6vx8rtLSE8Q=; b=1gXJSkh5TOOdUOZ0MlX3uWaPteM2CB5UuLPNo+FHc9CvibFPCl/kuWeG5IQqcXRUbH49Ud Jzcg0ltn4cHhM86s6vH34Xy9/cDH8jljsNqwcPuQqvws6KJPzEEMvVU8oLQQsiDGb6Kk8p 7ySIVMDGYoqAGPb176gObY+b1dlUbWiRmbd8IzieKOVsBgPuYKs2rneqtLsvShgnsl9sqU gPqHU7/MKg5hBtMHEUqpd4l0j0joOtsJjXFymd4YgpRPQj5ew9rpFXN5Dw2HBG0Y4vLaNx Au0+xbiNDIhXdq8F6Q93opsTYGOvI+kZ+fY7B3JDnjpxyzO1P02WS32oU9+kbA== From: Simon Wunderlich To: kuba@kernel.org, davem@davemloft.net Subject: [PATCH 6/7] batman-adv: Keep batadv_netlink_notify_* static Date: Wed, 16 Aug 2023 18:39:59 +0200 Message-Id: <20230816164000.190884-7-sw@simonwunderlich.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816164000.190884-1-sw@simonwunderlich.de> References: <20230816164000.190884-1-sw@simonwunderlich.de> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204003; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=11GJVf3mHqk6CBqwQS0ucNSZAqSlqPiz6vx8rtLSE8Q=; b=X4zxSjo3QoOa0lfTBSYXoMx/sNMNU8Cyn0bbAtXPWxR+qrL9sfKYPTt9a5u/YQoxXY4oOH WPRC5IYYOnwKCwLHDr+DsQ5XS0/wb47k2Ubo25xPDz5Qei2Y5MLouRMmK66bkHs43l8Bl6 rr4VOrId4FDvXGSX+UNZDlGQ0mnTT7Mop/9lhGvnQKF1++ljNCic2AeL6hn5kSS3HAnlbg r0zHFpJh382jcDNaDc35JV7nESgJlZ3l9PB4x0Ou+KKNBps6/fkPKrk0z/JgCKg2UpTmA8 tZUqF7vpGvSaKb8FQkVsJV84GI8TZ87N9p22FWLCOn/ycdfE2B3ZQYn90brzFQ== ARC-Seal: i=1; s=09092022; d=simonwunderlich.de; t=1692204003; a=rsa-sha256; cv=none; b=v4+4vyKKXtUZY7uAr2EL6pZr+1KHZQg1Nnczdf1mOIMSt2KUQaVOw9IzIh4rqdhSa8gHNZMpIMVVqG71QIA9ZyCPSYmaNtGYnqunWr2XzYhkNqwUr+wVkerVOdMJ/7MWWl2VU1YIBTaWaaOTt68pfvg29XLqfYwszXC7H/COLhU+gujlNVbaNRamb/iohWtecvoCWMVa1O3vcpVYKILb0qXE0ijkmsnBk6Ai6ikW8WBE0vWBWNMaL6kYIhKYi6W8b+UshvK006yRsgHrKGDLcvH8503OkjPeq4GH6ATKjKnKyKbDSPb3Ii+7mjp1R8Qd+REXr17Gx6axE1U72c5GfQ== ARC-Authentication-Results: i=1; mail.simonwunderlich.de; auth=pass smtp.auth=sw@simonwunderlich.de smtp.mailfrom=sw@simonwunderlich.de Message-ID-Hash: RJMORXGCPQQO4WTWVWEYGUUWM3ZR7TYA X-Message-ID-Hash: RJMORXGCPQQO4WTWVWEYGUUWM3ZR7TYA X-MailFrom: sw@simonwunderlich.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Sven Eckelmann The batadv_netlink_notify_*() functions are not used by any other source file. Just keep them local to netlink.c to get informed by the compiler when they are not used anymore. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/netlink.c | 10 +++++----- net/batman-adv/netlink.h | 6 ------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c index ad5714f737be..b6c512ce6704 100644 --- a/net/batman-adv/netlink.c +++ b/net/batman-adv/netlink.c @@ -377,7 +377,7 @@ static int batadv_netlink_mesh_fill(struct sk_buff *msg, * * Return: 0 on success, < 0 on error */ -int batadv_netlink_notify_mesh(struct batadv_priv *bat_priv) +static int batadv_netlink_notify_mesh(struct batadv_priv *bat_priv) { struct sk_buff *msg; int ret; @@ -858,8 +858,8 @@ static int batadv_netlink_hardif_fill(struct sk_buff *msg, * * Return: 0 on success, < 0 on error */ -int batadv_netlink_notify_hardif(struct batadv_priv *bat_priv, - struct batadv_hard_iface *hard_iface) +static int batadv_netlink_notify_hardif(struct batadv_priv *bat_priv, + struct batadv_hard_iface *hard_iface) { struct sk_buff *msg; int ret; @@ -1073,8 +1073,8 @@ static int batadv_netlink_vlan_fill(struct sk_buff *msg, * * Return: 0 on success, < 0 on error */ -int batadv_netlink_notify_vlan(struct batadv_priv *bat_priv, - struct batadv_softif_vlan *vlan) +static int batadv_netlink_notify_vlan(struct batadv_priv *bat_priv, + struct batadv_softif_vlan *vlan) { struct sk_buff *msg; int ret; diff --git a/net/batman-adv/netlink.h b/net/batman-adv/netlink.h index 48102cc7490c..876d2806a67d 100644 --- a/net/batman-adv/netlink.h +++ b/net/batman-adv/netlink.h @@ -21,12 +21,6 @@ int batadv_netlink_tpmeter_notify(struct batadv_priv *bat_priv, const u8 *dst, u8 result, u32 test_time, u64 total_bytes, u32 cookie); -int batadv_netlink_notify_mesh(struct batadv_priv *bat_priv); -int batadv_netlink_notify_hardif(struct batadv_priv *bat_priv, - struct batadv_hard_iface *hard_iface); -int batadv_netlink_notify_vlan(struct batadv_priv *bat_priv, - struct batadv_softif_vlan *vlan); - extern struct genl_family batadv_netlink_family; #endif /* _NET_BATMAN_ADV_NETLINK_H_ */ From patchwork Wed Aug 16 16:40:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 18594 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from diktynna.open-mesh.org (localhost [IPv6:::1]) by diktynna.open-mesh.org (Postfix) with ESMTP id 60E8183C28 for ; Wed, 16 Aug 2023 18:44:47 +0200 (CEST) ARC-Seal: i=3; cv=pass; a=rsa-sha256; d=open-mesh.org; s=20121; t=1692204287; b=sYBI24aY6EiE88VCRt2sYu0+Vne34X2zt3PT2vVNc6zxJTVNRXx/9N/dkVmn9DtO4Grdn FfvdhTL/TXtyPO76+wHbzwF4QDKwqbizo5T6m9F5FK4MF/YqgVBTUimtHwpwmx7VnLZG8d2 iy59Qp0NbSzWU+F4my1VNDbEXiyCYPA= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204287; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=aSto0Q4wf/OxzIwEeyKk+XUSuWvgF3+KU1wJs1NzNX8=; b=kgWTC8S6OEHr0KtlDlLBn73CS4kQOB8mtPtoL6nbzNaxN7FNghYCFRc52eXhBGsCC1X/m 8Vpp+BHzXylEJ1mS3uEI/Vb7yknTXbfvfU+kYNl/HiEfzxPEW2rg9WGhKtr9WCZiCm7LOf0 yqwdYyvGXNRlZLfvE47S26uJ0n+x3QY= ARC-Authentication-Results: i=3; open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Authentication-Results: open-mesh.org; dkim=pass header.d=simonwunderlich.de; arc=pass; dmarc=pass (Used From Domain Record) header.from=simonwunderlich.de policy.dmarc=none Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [IPv6:2a01:4f8:c17:e8c0::1]) by diktynna.open-mesh.org (Postfix) with ESMTPS id 367F581650 for ; Wed, 16 Aug 2023 18:40:04 +0200 (CEST) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh.org; s=20121; t=1692204004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=aSto0Q4wf/OxzIwEeyKk+XUSuWvgF3+KU1wJs1NzNX8=; b=yxiRRps1lndRwKiI9BTLOXkaf1PhgNOgCvUnjPbwDYedBbtkYtcTWLIXzPkucFIJLzLN2T kBILcaO4xCL0jYAxTNlt4BMXwpUjfFcEV5iaSQpRKJC8B9K1/cs94LFOgvAFXSNl9I5o8X s1Sb1sG3gen9NGQN50/1xOkLP1IQhGk= ARC-Authentication-Results: i=2; diktynna.open-mesh.org; dkim=pass header.d=simonwunderlich.de header.s=09092022 header.b="NLk7/iq/"; spf=pass (diktynna.open-mesh.org: domain of sw@simonwunderlich.de designates 2a01:4f8:c17:e8c0::1 as permitted sender) smtp.mailfrom=sw@simonwunderlich.de; dmarc=pass (policy=none) header.from=simonwunderlich.de; arc=pass ("simonwunderlich.de:s=09092022:i=1") ARC-Seal: i=2; s=20121; d=open-mesh.org; t=1692204004; a=rsa-sha256; cv=pass; b=1kl0ETmPyiAful0sB3sOyMlG//051rGUeFsWf47Q17LqC9tevkJ3WtIT9gNqwAjBpz9kCc ah/XOJlnj8eu2oJ3ho2F/zNsSUGrLX/aNclQ4ZDsAH/Vb8mZivUgJuB5moD0IV4QRrtcmO gofEUZ3E1yAQKlMQIkaUHhpxrV5IaeU= Received: from kero.packetmixer.de (p200300fA272a67000bB2d6DCAf57d46e.dip0.t-ipconnect.de [IPv6:2003:fa:272a:6700:bb2:d6dc:af57:d46e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with ESMTPSA id 0189AFB5CC; Wed, 16 Aug 2023 18:40:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204004; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aSto0Q4wf/OxzIwEeyKk+XUSuWvgF3+KU1wJs1NzNX8=; b=NLk7/iq/p1qDRzRVDRbQiC1DKcgsM0pJUfhyULTuEvqJhk5C6wtLsjCGhPvwloWIZe1XVm tCaTcJaQWe3+MZPPkLB7CbdNB2X5AxAOaUIo2NXewEBguFTqadgEOKlMybhngh6etSJr/8 jJXzkx0HdvoANE/3lxP08mIJLknYmfmoFOL2ldyUaC2jp52jUAad8gxsi4lxiUkolE/USx T8Z9ceMPkFr7G8/L3JTXXxic4vGZe3r9lndl1sMFRxqJSsV5RUNFtGhub8LEvyrv+5ljpX woAolHSgI3pH6m63u7ek2iMNI96QC/7jo3rr12Eegg9dmhpYFvIK9TF/xQo4fA== From: Simon Wunderlich To: kuba@kernel.org, davem@davemloft.net Subject: [PATCH 7/7] batman-adv: Drop per algo GW section class code Date: Wed, 16 Aug 2023 18:40:00 +0200 Message-Id: <20230816164000.190884-8-sw@simonwunderlich.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816164000.190884-1-sw@simonwunderlich.de> References: <20230816164000.190884-1-sw@simonwunderlich.de> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1692204004; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aSto0Q4wf/OxzIwEeyKk+XUSuWvgF3+KU1wJs1NzNX8=; b=ubxi8uqAmNe3b5mW8zkgN3+eMLVlPbHZEEuClfVjdONe/v9rpC9DEmCb8tO432GNTvUWZI Ita1j8m9II5orIYbbDg4FpMia+DGgKbFpp+Eulu5zqVVP7zWHyupBCNJ6ISEYJFGm/I2iW +gsuBasD4spyHyyOBRCdzxHY1mmf3qAWR5A18qSpK+fHd77zkVbpDB79Nylvlvxjhs/JzC dC3/arTgtxQ3YeTg5JBOIWdjez7vzRHhBnU38v0mdNMan3SFwNW92XAMPu1T32aYPTpNxB b9xDuc3wqpP8CTx5ALFCzJYSwkIIzz+jnEiM9G+oVF6if+DC4F9xsRVbZU1Dww== ARC-Seal: i=1; s=09092022; d=simonwunderlich.de; t=1692204004; a=rsa-sha256; cv=none; b=YZdLgFieiM1+6NWVt52dDoRhOtwfFENGJlg9/YaTvtX/EonSnlJiaVsQtM615M1QKOEN9ENPcGzQFgdKL7/IK9mKTSN8dkFFDajv0TNNSQAHOC8sbpQ94DGyGj0cVxThCONUEIVg6HiYBSWGxy83PcKbVSrziGTv+QkY9QU47VLLVMvvGvr9J+VwxRa/xFBYMTI7e+6j2HpQe85Vpbt3aUSYJZIWDsgFMGxmFJse/AsSYQTVf4UG1rkypr2PsAaNRaVlJSUcr/EFWqe2EOX13K62kXqp4DaRycHGez7P6MOkr7rPswagYJ9VG+mxi5X+9P17aOZ2imoVAZDPDeUMwg== ARC-Authentication-Results: i=1; mail.simonwunderlich.de; auth=pass smtp.auth=sw@simonwunderlich.de smtp.mailfrom=sw@simonwunderlich.de Message-ID-Hash: NIGQGWU4UBPNYFVXA7JZXHADI53FWEA2 X-Message-ID-Hash: NIGQGWU4UBPNYFVXA7JZXHADI53FWEA2 X-MailFrom: sw@simonwunderlich.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-b.a.t.m.a.n.lists.open-mesh.org-0; header-match-b.a.t.m.a.n.lists.open-mesh.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Sven Eckelmann This code was only used in the past for the sysfs interface. But since this was replace with netlink, it was never executed. The function pointer was only checked to figure out whether the limit 255 (B.A.T.M.A.N. IV) or 2**32-1 (B.A.T.M.A.N. V) should be used as limit. So instead of keeping the function pointer, just store the limits directly in struct batadv_algo_gw_ops. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/bat_iv_ogm.c | 1 + net/batman-adv/bat_v.c | 23 +--------- net/batman-adv/gateway_common.c | 74 +-------------------------------- net/batman-adv/gateway_common.h | 5 --- net/batman-adv/netlink.c | 5 +-- net/batman-adv/types.h | 7 ++-- 6 files changed, 8 insertions(+), 107 deletions(-) diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 828fb393ee94..74b49c35ddc1 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -2516,6 +2516,7 @@ static struct batadv_algo_ops batadv_batman_iv __read_mostly = { }, .gw = { .init_sel_class = batadv_iv_init_sel_class, + .sel_class_max = BATADV_TQ_MAX_VALUE, .get_best_gw_node = batadv_iv_gw_get_best_gw_node, .is_eligible = batadv_iv_gw_is_eligible, .dump = batadv_iv_gw_dump, diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c index 54e41fc709c3..ac11f1f08db0 100644 --- a/net/batman-adv/bat_v.c +++ b/net/batman-adv/bat_v.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include "bat_v_elp.h" #include "bat_v_ogm.h" #include "gateway_client.h" -#include "gateway_common.h" #include "hard-interface.h" #include "hash.h" #include "log.h" @@ -512,25 +512,6 @@ static void batadv_v_init_sel_class(struct batadv_priv *bat_priv) atomic_set(&bat_priv->gw.sel_class, 50); } -static ssize_t batadv_v_store_sel_class(struct batadv_priv *bat_priv, - char *buff, size_t count) -{ - u32 old_class, class; - - if (!batadv_parse_throughput(bat_priv->soft_iface, buff, - "B.A.T.M.A.N. V GW selection class", - &class)) - return -EINVAL; - - old_class = atomic_read(&bat_priv->gw.sel_class); - atomic_set(&bat_priv->gw.sel_class, class); - - if (old_class != class) - batadv_gw_reselect(bat_priv); - - return count; -} - /** * batadv_v_gw_throughput_get() - retrieve the GW-bandwidth for a given GW * @gw_node: the GW to retrieve the metric for @@ -818,7 +799,7 @@ static struct batadv_algo_ops batadv_batman_v __read_mostly = { }, .gw = { .init_sel_class = batadv_v_init_sel_class, - .store_sel_class = batadv_v_store_sel_class, + .sel_class_max = U32_MAX, .get_best_gw_node = batadv_v_gw_get_best_gw_node, .is_eligible = batadv_v_gw_is_eligible, .dump = batadv_v_gw_dump, diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c index d9632607f92b..2dd36ef03c84 100644 --- a/net/batman-adv/gateway_common.c +++ b/net/batman-adv/gateway_common.c @@ -9,86 +9,14 @@ #include #include -#include -#include -#include -#include #include -#include +#include #include #include #include "gateway_client.h" -#include "log.h" #include "tvlv.h" -/** - * batadv_parse_throughput() - parse supplied string buffer to extract - * throughput information - * @net_dev: the soft interface net device - * @buff: string buffer to parse - * @description: text shown when throughput string cannot be parsed - * @throughput: pointer holding the returned throughput information - * - * Return: false on parse error and true otherwise. - */ -bool batadv_parse_throughput(struct net_device *net_dev, char *buff, - const char *description, u32 *throughput) -{ - enum batadv_bandwidth_units bw_unit_type = BATADV_BW_UNIT_KBIT; - u64 lthroughput; - char *tmp_ptr; - int ret; - - if (strlen(buff) > 4) { - tmp_ptr = buff + strlen(buff) - 4; - - if (strncasecmp(tmp_ptr, "mbit", 4) == 0) - bw_unit_type = BATADV_BW_UNIT_MBIT; - - if (strncasecmp(tmp_ptr, "kbit", 4) == 0 || - bw_unit_type == BATADV_BW_UNIT_MBIT) - *tmp_ptr = '\0'; - } - - ret = kstrtou64(buff, 10, <hroughput); - if (ret) { - batadv_err(net_dev, - "Invalid throughput speed for %s: %s\n", - description, buff); - return false; - } - - switch (bw_unit_type) { - case BATADV_BW_UNIT_MBIT: - /* prevent overflow */ - if (U64_MAX / 10 < lthroughput) { - batadv_err(net_dev, - "Throughput speed for %s too large: %s\n", - description, buff); - return false; - } - - lthroughput *= 10; - break; - case BATADV_BW_UNIT_KBIT: - default: - lthroughput = div_u64(lthroughput, 100); - break; - } - - if (lthroughput > U32_MAX) { - batadv_err(net_dev, - "Throughput speed for %s too large: %s\n", - description, buff); - return false; - } - - *throughput = lthroughput; - - return true; -} - /** * batadv_gw_tvlv_container_update() - update the gw tvlv container after * gateway setting change diff --git a/net/batman-adv/gateway_common.h b/net/batman-adv/gateway_common.h index cb2e72d7ab14..5d097d6a1dd9 100644 --- a/net/batman-adv/gateway_common.h +++ b/net/batman-adv/gateway_common.h @@ -9,9 +9,6 @@ #include "main.h" -#include -#include - /** * enum batadv_bandwidth_units - bandwidth unit types */ @@ -30,7 +27,5 @@ enum batadv_bandwidth_units { void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv); void batadv_gw_init(struct batadv_priv *bat_priv); void batadv_gw_free(struct batadv_priv *bat_priv); -bool batadv_parse_throughput(struct net_device *net_dev, char *buff, - const char *description, u32 *throughput); #endif /* _NET_BATMAN_ADV_GATEWAY_COMMON_H_ */ diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c index b6c512ce6704..d37872b34281 100644 --- a/net/batman-adv/netlink.c +++ b/net/batman-adv/netlink.c @@ -548,15 +548,12 @@ static int batadv_netlink_set_mesh(struct sk_buff *skb, struct genl_info *info) * algorithm in use implements the GW API */ - u32 sel_class_max = 0xffffffffu; + u32 sel_class_max = bat_priv->algo_ops->gw.sel_class_max; u32 sel_class; attr = info->attrs[BATADV_ATTR_GW_SEL_CLASS]; sel_class = nla_get_u32(attr); - if (!bat_priv->algo_ops->gw.store_sel_class) - sel_class_max = BATADV_TQ_MAX_VALUE; - if (sel_class >= 1 && sel_class <= sel_class_max) { atomic_set(&bat_priv->gw.sel_class, sel_class); batadv_gw_reselect(bat_priv); diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index ca9449ec9836..54c2b8fa48cc 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -2191,11 +2191,10 @@ struct batadv_algo_gw_ops { void (*init_sel_class)(struct batadv_priv *bat_priv); /** - * @store_sel_class: parse and stores a new GW selection class - * (optional) + * @sel_class_max: maximum allowed GW selection class */ - ssize_t (*store_sel_class)(struct batadv_priv *bat_priv, char *buff, - size_t count); + u32 sel_class_max; + /** * @get_best_gw_node: select the best GW from the list of available * nodes (optional)