🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #14499

[PATCH net-next 15/15] batman-adv: mcast: document the value stored in is_routable

#14499
From: Simon Wunderlich
Date: Wed, 11 Nov 2026 10:27
112 lines
14826 bytes
From: Sven Eckelmann <sven@narfation.org>

The kerneldoc of is_routable says it indicates whether the destination is
routable, which reads like a boolean. But it actually holds the
protocol of the routable destination (ETH_P_IP or ETH_P_IPV6) or 0.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 net/batman-adv/multicast.c      | 16 ++++++++++------
 net/batman-adv/multicast_forw.c |  9 ++++++---
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index 0446324c64e85..1e086a6385261 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -984,7 +984,7 @@ static bool batadv_mcast_is_report_ipv4(struct sk_buff *skb)
  * @bat_priv: the bat priv with all the mesh interface information
  * @skb: the IPv4 packet to check
  * @is_unsnoopable: stores whether the destination is snoopable
- * @is_routable: stores whether the destination is routable
+ * @is_routable: stores ETH_P_IP when destination is routable
  *
  * Checks whether the given IPv4 packet has the potential to be forwarded with a
  * mode more optimal than classic flooding.
@@ -1052,7 +1052,7 @@ static bool batadv_mcast_is_report_ipv6(struct sk_buff *skb)
  * @bat_priv: the bat priv with all the mesh interface information
  * @skb: the IPv6 packet to check
  * @is_unsnoopable: stores whether the destination is snoopable
- * @is_routable: stores whether the destination is routable
+ * @is_routable: stores ETH_P_IPV6 when destination is routable
  *
  * Checks whether the given IPv6 packet has the potential to be forwarded with a
  * mode more optimal than classic flooding.
@@ -1094,7 +1094,8 @@ static int batadv_mcast_forw_mode_check_ipv6(struct batadv_priv *bat_priv,
  * @bat_priv: the bat priv with all the mesh interface information
  * @skb: the multicast frame to check
  * @is_unsnoopable: stores whether the destination is snoopable
- * @is_routable: stores whether the destination is routable
+ * @is_routable: stores the protocol (ETH_P_IP or ETH_P_IPV6) if the destination
+ *  is routable
  *
  * Checks whether the given multicast ethernet frame has the potential to be
  * forwarded with a mode more optimal than classic flooding.
@@ -1180,7 +1181,8 @@ static int batadv_mcast_forw_rtr_count(struct batadv_priv *bat_priv,
  * @bat_priv: the bat priv with all the mesh interface information
  * @skb: the multicast packet to check
  * @vid: the vlan identifier
- * @is_routable: stores whether the destination is routable
+ * @is_routable: 0 if the destination is not routable, otherwise the protocol
+ *  (ETH_P_IP or ETH_P_IPV6) of the routable destination
  * @count: the number of originators the multicast packet need to be sent to
  *
  * For a multicast packet with multiple destination originators, checks which
@@ -1224,7 +1226,8 @@ batadv_mcast_forw_mode_by_count(struct batadv_priv *bat_priv,
  * @bat_priv: the bat priv with all the mesh interface information
  * @skb: the multicast packet to check
  * @vid: the vlan identifier
- * @is_routable: stores whether the destination is routable
+ * @is_routable: stores the protocol (ETH_P_IP or ETH_P_IPV6) if the destination
+ *  is routable
  *
  * Return: The forwarding mode as enum batadv_forw_mode.
  */
@@ -1554,7 +1557,8 @@ batadv_mcast_forw_want_rtr(struct batadv_priv *bat_priv,
  * @bat_priv: the bat priv with all the mesh interface information
  * @skb: the multicast packet to transmit
  * @vid: the vlan identifier
- * @is_routable: stores whether the destination is routable
+ * @is_routable: 0 if the destination is not routable, otherwise the protocol
+ *  (ETH_P_IP or ETH_P_IPV6) of the routable destination
  *
  * Sends copies of a frame with multicast destination to any node that signaled
  * interest in it, that is either via the translation table or the according
diff --git a/net/batman-adv/multicast_forw.c b/net/batman-adv/multicast_forw.c
index 8700f92b9bb0f..0120d1ea30acf 100644
--- a/net/batman-adv/multicast_forw.c
+++ b/net/batman-adv/multicast_forw.c
@@ -477,7 +477,8 @@ batadv_mcast_forw_push_adjust_padding(struct sk_buff *skb, int *count,
  * @bat_priv: the bat priv with all the mesh interface information
  * @skb: the skb to push the destination addresses onto
  * @vid: the vlan identifier
- * @is_routable: indicates whether the destination is routable
+ * @is_routable: 0 if the destination is not routable, otherwise the protocol
+ *  (ETH_P_IP or ETH_P_IPV6) of the routable destination
  * @count: the number of originators the multicast packet needs to be sent to
  * @tvlv_len: stores the amount of currently pushed TVLV bytes
  *
@@ -569,7 +570,8 @@ static int batadv_mcast_forw_push_tracker(struct sk_buff *skb, int num_dests,
  * @bat_priv: the bat priv with all the mesh interface information
  * @skb: the skb to push the tracker TVLV onto
  * @vid: the vlan identifier
- * @is_routable: indicates whether the destination is routable
+ * @is_routable: 0 if the destination is not routable, otherwise the protocol
+ *  (ETH_P_IP or ETH_P_IPV6) of the routable destination
  * @count: the number of originators the multicast packet needs to be sent to
  * @tvlv_len: stores the amount of currently pushed TVLV bytes
  *
@@ -1123,7 +1125,8 @@ static int batadv_mcast_forw_expand_head(struct batadv_priv *bat_priv,
  * @bat_priv: the bat priv with all the mesh interface information
  * @skb: the multicast packet to encapsulate and send
  * @vid: the vlan identifier
- * @is_routable: indicates whether the destination is routable
+ * @is_routable: 0 if the destination is not routable, otherwise the protocol
+ *  (ETH_P_IP or ETH_P_IPV6) of the routable destination
  * @count: the number of originators the multicast packet needs to be sent to
  *
  * Encapsulates the given multicast packet in a batman-adv multicast packet.
-- 
2.47.3
Technical Details
Message-ID: <20261111102729.2096241-16-sw@simonwunderlich.de>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361004-linux-kernel-netdev=dewy.ru
References: <20261111102729.2096241-1-sw@simonwunderlich.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361004-linux-kernel-netdev=dewy.ru
From: sw@simonwunderlich.de (Simon Wunderlich)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next 15/15] batman-adv: mcast: document the value stored in is_routable
Date: Wed, 11 Nov 2026 11:27:29 +0100
Organization: Usenet Network
Message-ID: <20261111102729.2096241-16-sw@simonwunderlich.de>
References: <20261111102729.2096241-1-sw@simonwunderlich.de>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="830686"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:qC5iysMEQ8ywnvPMjvLFe15hMJs= sha256:/8sV4yxYPHDGdgQQ7675qeKmjtNx3tZ+6yV6HQ29hhE=
	sha1:tXy1NJIV2Q727yMTnu5FqG6oA+I= sha256:HToq9HsYazzxHGFwe/LWOmrO4kGQxDwZkR2pLPe0HKk=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id CB14E113EAB; Wed, 11 Nov 2026 13:30:33 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=simonwunderlich.de
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id WFRlSFZ3h5EA;
	Wed, 11 Nov 2026 13:30:29 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-361004-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=simonwunderlich.de
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id A8B31113EA5; Wed, 11 Nov 2026 13:30:21 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 0CC3A67A0F; Wed, 11 Nov 2026 10:28:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
	t=1794392870;
	b=WYBfnaz2mCgtMJ0iVUy6yeLM5PkgecGdONLGvmqwvNsOx/ZvHNsxuYXm6PeVvqWB3mOT
	 NGbS94NFGFC51eUl9LkmdG877ciHWu6DNgeUbk73xxRtiw5XWxTxgzSIoLwyexig2or0k
	 Hk7YbupZdSv02xMzjRaYodZyuy5hlA1zjpXCnwLVTJgJi7N8WEXAEpQK53lq08dblDpRW
	 6dnvnt4YSs0mHgN7Au10ddlFioaKuDAuW8nLXgS5xUmM7bfqWppOQP5QrwPsTK6nE95cE
	 eGWePdnssQ5kG2g99u+4cZXbwzEeOV4CCYCKSvgeP//hHVZgQaFEjbBT8ImBZCbdOAg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794392870;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To:
	 Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=061AyPVq+UbNcTTu8ui/UjYhadGaINZY0Wyh6TQdlnA=;
	b=yI9CShV3XLcFvZQQR/gC2peHpmEU1NY0qgGwkxXfZ1Dd8cljqiBsc+lCRfLYgAlBXDtj
	 g8ODUNAGlK2zTPHdjx6uB766ZSENxnOi+YlBOeNPl4C4GDSdyGpmSEZvjksuf35JSdP9h
	 j6hwTAIPI+aqvd3hkDKLbYasNu9KMJGOqDj4FgIFAZYDqGosV5v2vxMO1DY+A+Z4X6v81
	 o3yCUAZFMUINNGUbZjd2Xz4qvGYKSdrTwSIPOCQDOzx89NQhWC1/agxSRRA+S+Lok8Pa3
	 7rAhA8zeqs2PrplZXGMzc6z/bdDchEyaMtWePBC0IwIWSQZnbFEJMXbCrXk8BiSahvg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=DESMkFGZ;
	dmarc=pass header.from=simonwunderlich.de;
	spf=pass smtp.mailfrom=simonwunderlich.de;
	arc=fail smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 64409606A327;
	Wed, 11 Nov 2026 10:27:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=DESMkFGZ
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=23.88.38.48
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794392864;
	b=xseFiCcz/GgpKoKnE4RjSMnxJ/wj1EWWQyTwF6pwWKp3gUQNkNlltDHcO1r7OswUdyM+
	 NrdlVqnzgiamX1nvrzOSR2JZ8uYM6ZVHtbhMuiUaDaLzToDnIK7KFF4zXeS3eYJpS3NbJ
	 AhOAaUIRlQYj/dEiIOAZwIHBD1g26tZNY8IxLuqUBr+xxOG+SrzFHk5JBjchPJpk++d7l
	 UYx/KEMI2sZacAqyZNbsF3aCbVZQ+iJZZPkE3fnpE8gm2fxS/WDHPY0mk6LDSjeKby2s9
	 R44id0RRjAu9G+RDsiEqxD3rD/vaF6c/VO51ncU2nDiotYcKoeDh4fy5P7g30LU/9Ng==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794392864;
	h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date:
	 Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=061AyPVq+UbNcTTu8ui/UjYhadGaINZY0Wyh6TQdlnA=;
	b=3GFY6+gzIIRN0lB40HWlrxZjRX9gRi+eYZvvcCLGf1MTdZex8lS0r8ADpVmcJuFWIZpt
	 ViInO8GJjT0CNCkfVcFFkieeIOUWCSutxdY8Ji3Pb98d9wvgCY6C1Qs7jbGO9sILHXPTf
	 4Zw4JDtwdSDV7gkSwPHRbshtGINzNvTK2FowrU4v9e0qur3K1KV83A1yBq6XCJY0DB1xo
	 BkgGz8PvfyhkEFJy+03kkBO6/tUXwC7YevignV4YpjCOW3R+usEtn9y181loSreHtk2/i
	 OfrmGR53spWLtKZJK0RIQCycLXafjCcjUnmIHWpsA/7S/OKilbUBkd8xCnw/MeZCe8Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=simonwunderlich.de;
	spf=pass smtp.mailfrom=simonwunderlich.de;
	dkim=pass header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=DESMkFGZ;
	arc=none smtp.remote-ip=23.88.38.48
X-Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [23.88.38.48])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with UTF8SMTPS id 0A91360A2610
	for <netdev@vger.kernel.org>; Wed, 11 Nov 2026 10:27:44 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0A91360A2610
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=simonwunderlich.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=simonwunderlich.de
X-Received: from kero.packetmixer.de (p200300c59740deD843Be7e4A980e9c65.dip0.t-ipconnect.de [IPv6:2003:c5:9740:ded8:43be:7e4a:980e:9c65])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mail.simonwunderlich.de (Postfix) with UTF8SMTPSA id 4EBA7FA2F2;
	Wed, 11 Nov 2026 11:27:42 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de;
	s=09092022; t=1794392862;
	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;
	bh=061AyPVq+UbNcTTu8ui/UjYhadGaINZY0Wyh6TQdlnA=;
	b=DESMkFGZkfmDTZFvXolYreqs8euou2Bvhr3RZ+PyFs6D1Ek951LUVo+uSQ1O+xO7q+VDst
	w1SRZ+JVhnLe0iwCxDCbE+WLTf+fia2EW8CdkoqExdePmvAhA+bu1msnSSXTdWn866w14e
	/i8+iz8hoHfy2p2/dwKBDVKSUr5Xf5cJcW7JV7jyjY5NofCS5Nbnrj6ZxUsVk0d6e+QkBb
	I1dZZ+Jq+vDWqAotrVv34QNmgMp+RikL5LPYvwE9Ji9FFqzz9BnhpPDA96j790U478j4mH
	AQCd58O8fb21wC4HvCVjPFHHFJ3VWUY805oc1T0G1oDrIp0Rf3sXjhd2HBwbrg==
X-Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	b.a.t.m.a.n@lists.open-mesh.org,
	Sven Eckelmann <sven@narfation.org>,
	Simon Wunderlich <sw@simonwunderlich.de>
X-Mailer: git-send-email 2.47.3
X-In-Reply-To: <20261111102729.2096241-1-sw@simonwunderlich.de>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list