Skip to contentSkip to conversation

batman-adv: add dynamic, bridged-in TT VID detection

PATCH In review Linus Lüssing 2 participants 5 messages Feb 1, 2025 Batman advanced

lore
Share & tools
lore
#0 lore raw

v5 cover batman-adv: add dynamic, bridged-in TT VID detection

For one thing the following patchest is supposed to mitigate the regression of extra OGM overhead that we accidentally introduced with the introduction of the compatibility version 15, the TVLV support it provided, together with TT VLAN support. The addition of these TVLVs roughly doubled the OGM overhead back then, also/mainly because the 8021q and Linux bridge modules would add TT VLAN IDs 0 and 1, even if no one is actually using them. While the 8021q VLAN 0 ID addition was addressed in upstream already, PATCH 3/3 tries to avoid unnecessary VLAN additions from the bridge and only adds such VLANs if they were detected on actual traffic.

In preparation of this the internal VLAN creation was overhauled in PATCH 1/3. This also in theory allows detecting new VLAN IDs dynamically from traffic from bridged-in traffic. So far, VLAN IDs could only be used which were anticipated and configured on top of bat0 by the administrator.

However the detection of VLANs from bridged-in clients is by default disabled for now through PATCH 2/3. This patch adds a configurable limit for such snooped VLAN IDs, defaulting to zero for now. The issue is that each added VLAN still increases the OGM size considerably in the current protocol, so it is not advised to add many VLANs at the moment, without a bigger upgrade of the protocol. Also there is still an outstanding issue with temporarily broken broadcast traffic upon adding a new VLAN if BLA is enabled at the same time. Therefore defaulting to zero snooped VLANs from bridged-in clients for now.

Regards, Linus

---

v5:
* rebased to current main branch:
-> PATCH 3/3 needed to readd the include for soft-interface.h for
batadv_softif_get_bridge() since commit
"50eddf397ac3 batman-adv: netlink: reduce duplicate code by returning interfaces"

v4:
* reworking PATCH 3/3:
* removing the added exception for VID 0 again, addressed upstream now
* replacing the specific VID 1 exception for the bridge default PVID with a more generic solution: a user might change the PVID or add other, untagged VLANs on an access port which we should also ignore; instead always avoid such kernel event additions if a bridge is on top of bat0

v3:
* fixing refcounting, removing an unnecessary kref_get() in PATCH 1/3
* adding PATCH 2/3 + PATCH 3/3
* resubmitting without the RFC tag

v2: fix a typo, a missing "to" in the commit message

#1 lore raw

PATCH v5 1/3 batman-adv: add dynamic, bridged-in TT VID detection support

So far, if we wanted to bridge VLAN tagged frames into the mesh one would need to manually create an according VLAN interface on top of bat0 first, to trigger batman-adv to create the according structures for a VID.

With this change the VLAN from bridged-in clients is now automatically detected and added to the translation table on the fly.

---
 net/batman-adv/hard-interface.c    |   2 +-
 net/batman-adv/multicast.c         |   8 +-
 net/batman-adv/soft-interface.c    | 125 ++++++++++++++++-------------
 net/batman-adv/soft-interface.h    |   6 +-
 net/batman-adv/translation-table.c |  19 ++---
 net/batman-adv/translation-table.h |   4 +-
 6 files changed, 91 insertions(+), 73 deletions(-)
net/batman-adv/hard-interface.c +1 -1
index 96a412beab2d..f5826dd8752c 100644
@@ -946,7 +946,7 @@ static int batadv_hard_if_event_softif(unsigned long event,
 	switch (event) {
 	case NETDEV_REGISTER:
 		bat_priv = netdev_priv(net_dev);
-		batadv_softif_create_vlan(bat_priv, BATADV_NO_FLAGS);
+		batadv_softif_create_vlan_own(bat_priv, BATADV_NO_FLAGS);
 		break;
 	}
 
net/batman-adv/multicast.c +5 -3
index bcb5fd4e0219..b39c214c0c6d 100644
@@ -723,6 +723,7 @@ static void batadv_mcast_mla_tt_add(struct batadv_priv *bat_priv,
 {
 	struct batadv_hw_addr *mcast_entry;
 	struct hlist_node *tmp;
+	int ret;
 
 	if (!mcast_list)
 		return;
@@ -732,9 +733,10 @@ static void batadv_mcast_mla_tt_add(struct batadv_priv *bat_priv,
 						  &bat_priv->mcast.mla_list))
 			continue;
 
-		if (!batadv_tt_local_add(bat_priv->soft_iface,
-					 mcast_entry->addr, BATADV_NO_FLAGS,
-					 BATADV_NULL_IFINDEX, BATADV_NO_MARK))
+		ret = batadv_tt_local_add(bat_priv->soft_iface,
+					  mcast_entry->addr, BATADV_NO_FLAGS,
+					  BATADV_NULL_IFINDEX, BATADV_NO_MARK);
+		if (ret <= 0)
 			continue;
 
 		hlist_del(&mcast_entry->list);
net/batman-adv/soft-interface.c +68 -57

214 lines not on this page · raw message

net/batman-adv/soft-interface.h +5 -1
index 9f2003f1a497..7050ccd304df 100644
@@ -21,10 +21,14 @@ void batadv_interface_rx(struct net_device *soft_iface,
 			 struct batadv_orig_node *orig_node);
 bool batadv_softif_is_valid(const struct net_device *net_dev);
 extern struct rtnl_link_ops batadv_link_ops;
-int batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid);
+int batadv_softif_create_vlan_own(struct batadv_priv *bat_priv,
+				  unsigned short vid);
 void batadv_softif_vlan_release(struct kref *ref);
 struct batadv_softif_vlan *batadv_softif_vlan_get(struct batadv_priv *bat_priv,
 						  unsigned short vid);
+struct batadv_softif_vlan *
+batadv_softif_vlan_get_or_create(struct batadv_priv *bat_priv,
+				 unsigned short vid);
 
 /**
  * batadv_softif_vlan_put() - decrease the vlan object refcounter and
net/batman-adv/translation-table.c +10 -9
index 7e36108bb4ef..144ce64e4600 100644
@@ -626,8 +626,8 @@ static void batadv_tt_global_free(struct batadv_priv *bat_priv,
  *
  * Return: true if the client was successfully added, false otherwise.
  */
-bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
-			 unsigned short vid, int ifindex, u32 mark)
+int batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
+			unsigned short vid, int ifindex, u32 mark)
 {
 	struct batadv_priv *bat_priv = netdev_priv(soft_iface);
 	struct batadv_tt_local_entry *tt_local;
@@ -639,10 +639,10 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
 	struct hlist_head *head;
 	struct batadv_tt_orig_list_entry *orig_entry;
 	int hash_added, table_size, packet_size_max;
-	bool ret = false;
 	bool roamed_back = false;
 	u8 remote_flags;
 	u32 match_mark;
+	int ret = 0;
 
 	if (ifindex != BATADV_NULL_IFINDEX)
 		in_dev = dev_get_by_index(net, ifindex);
@@ -693,21 +693,22 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
 		net_ratelimited_function(batadv_info, soft_iface,
 					 "Local translation table size (%i) exceeds maximum packet size (%i); Ignoring new local tt entry: %pM\n",
 					 table_size, packet_size_max, addr);
+		ret = -E2BIG;
 		goto out;
 	}
 
 	tt_local = kmem_cache_alloc(batadv_tl_cache, GFP_ATOMIC);
-	if (!tt_local)
+	if (!tt_local) {
+		ret = -ENOMEM;
 		goto out;
+	}
 
 	/* increase the refcounter of the related vlan */
-	vlan = batadv_softif_vlan_get(bat_priv, vid);
+	vlan = batadv_softif_vlan_get_or_create(bat_priv, vid);
 	if (!vlan) {
-		net_ratelimited_function(batadv_info, soft_iface,
-					 "adding TT local entry %pM to non-existent VLAN %d\n",
-					 addr, batadv_print_vid(vid));
 		kmem_cache_free(batadv_tl_cache, tt_local);
 		tt_local = NULL;
+		ret = -ENOMEM;
 		goto out;
 	}
 
@@ -804,7 +805,7 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
 	if (remote_flags ^ (tt_local->common.flags & BATADV_TT_REMOTE_MASK))
 		batadv_tt_local_event(bat_priv, tt_local, BATADV_NO_FLAGS);
 
-	ret = true;
+	ret = 1;
 out:
 	batadv_hardif_put(in_hardif);
 	dev_put(in_dev);
net/batman-adv/translation-table.h +2 -2
index d18740d9a22b..bbdda8488c14 100644
@@ -16,8 +16,8 @@
 #include <linux/types.h>
 
 int batadv_tt_init(struct batadv_priv *bat_priv);
-bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
-			 unsigned short vid, int ifindex, u32 mark);
+int batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
+			unsigned short vid, int ifindex, u32 mark);
 u16 batadv_tt_local_remove(struct batadv_priv *bat_priv,
 			   const u8 *addr, unsigned short vid,
 			   const char *message, bool roaming);
Signature · 1 line
2.47.2
#2 lore raw

PATCH v5 2/3 batman-adv: limit number of learned VLANs from bridged-in clients

In reply to Linus Lüssing

Currently with batman-adv compatibility version 15 each added VLAN increases the OGM protocol overhead of this node considerably. Therefore adding a configurable knob to limit the number of learned, snooped VLANs from traffic from bridged-in clients.

There are currently also still issues in the BLA code that would temporarily break any broadcast transmissions with every newly learned VLAN. Therefore setting the default limit for externally learned VLANs to zero for now.

---
 include/uapi/linux/batman_adv.h    |  6 ++++++
 net/batman-adv/netlink.c           | 15 +++++++++++++++
 net/batman-adv/soft-interface.c    | 29 +++++++++++++++++++++++++----
 net/batman-adv/soft-interface.h    |  4 ++--
 net/batman-adv/translation-table.c |  3 ++-
 net/batman-adv/types.h             |  6 ++++++
 6 files changed, 56 insertions(+), 7 deletions(-)
include/uapi/linux/batman_adv.h +6 -0
index 35dc016c9bb4..44018dd6affd 100644
@@ -481,6 +481,12 @@ enum batadv_nl_attrs {
 	 */
 	BATADV_ATTR_MULTICAST_FANOUT,
 
+	/**
+	 * @BATADV_ATTR_VLAN_DYN_MAX: defines the maximum number of allowed
+	 * learned VLANs from bridged-in clients.
+	 */
+	BATADV_ATTR_VLAN_DYN_MAX,
+
 	/* add attributes above here, update the policy in netlink.c */
 
 	/**
net/batman-adv/netlink.c +15 -0
index c37e0995f67e..1afd1ab1db2e 100644
@@ -129,6 +129,7 @@ static const struct nla_policy batadv_netlink_policy[NUM_BATADV_ATTR] = {
 	[BATADV_ATTR_MCAST_FLAGS]		= { .type = NLA_U32 },
 	[BATADV_ATTR_MCAST_FLAGS_PRIV]		= { .type = NLA_U32 },
 	[BATADV_ATTR_VLANID]			= { .type = NLA_U16 },
+	[BATADV_ATTR_VLAN_DYN_MAX]		= { .type = NLA_U16 },
 	[BATADV_ATTR_AGGREGATED_OGMS_ENABLED]	= { .type = NLA_U8 },
 	[BATADV_ATTR_AP_ISOLATION_ENABLED]	= { .type = NLA_U8 },
 	[BATADV_ATTR_ISOLATION_MARK]		= { .type = NLA_U32 },
@@ -356,6 +357,10 @@ static int batadv_netlink_mesh_fill(struct sk_buff *msg,
 			atomic_read(&bat_priv->orig_interval)))
 		goto nla_put_failure;
 
+	if (nla_put_u16(msg, BATADV_ATTR_VLAN_DYN_MAX,
+			bat_priv->softif_vlan_dyn_max))
+		goto nla_put_failure;
+
 	batadv_hardif_put(primary_if);
 
 	genlmsg_end(msg, hdr);
@@ -610,6 +615,16 @@ static int batadv_netlink_set_mesh(struct sk_buff *skb, struct genl_info *info)
 		atomic_set(&bat_priv->orig_interval, orig_interval);
 	}
 
+	if (info->attrs[BATADV_ATTR_VLAN_DYN_MAX]) {
+		u16 vlan_dyn_max;
+
+		attr = info->attrs[BATADV_ATTR_VLAN_DYN_MAX];
+		vlan_dyn_max = nla_get_u16(attr);
+		vlan_dyn_max = min_t(u16, vlan_dyn_max, VLAN_N_VID);
+
+		bat_priv->softif_vlan_dyn_max = vlan_dyn_max;
+	}
+
 	batadv_netlink_notify_mesh(bat_priv);
 
 	return 0;
net/batman-adv/soft-interface.c +25 -4
index a5ccbdf12171..806c30fd17ce 100644
@@ -46,6 +46,7 @@
 #include "distributed-arp-table.h"
 #include "gateway_client.h"
 #include "hard-interface.h"
+#include "log.h"
 #include "multicast.h"
 #include "network-coding.h"
 #include "send.h"
@@ -561,8 +562,9 @@ struct batadv_softif_vlan *batadv_softif_vlan_get(struct batadv_priv *bat_priv,
  * otherwise.
  */
 static struct batadv_softif_vlan *
-batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid)
+batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid, bool own)
 {
+	unsigned short vlan_dyn_max, vlan_dyn_count;
 	struct batadv_softif_vlan *vlan;
 
 	spin_lock_bh(&bat_priv->softif_vlan_list_lock);
@@ -573,6 +575,19 @@ batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid)
 		return vlan;
 	}
 
+	vlan_dyn_max = bat_priv->softif_vlan_dyn_max;
+	vlan_dyn_count = bat_priv->softif_vlan_dyn_count;
+
+	if (vid & BATADV_VLAN_HAS_TAG && !own &&
+	    vlan_dyn_max <= vlan_dyn_count) {
+		spin_unlock_bh(&bat_priv->softif_vlan_list_lock);
+
+		net_ratelimited_function(batadv_info, bat_priv->soft_iface,
+					 "not adding VLAN %d, already learned %hu VID(s)\n",
+					 batadv_print_vid(vid), vlan_dyn_max);
+		return NULL;
+	}
+
 	vlan = kzalloc(sizeof(*vlan), GFP_ATOMIC);
 	if (!vlan) {
 		spin_unlock_bh(&bat_priv->softif_vlan_list_lock);
@@ -588,6 +603,9 @@ batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid)
 
 	atomic_set(&vlan->ap_isolation, 0);
 
+	if (vid & BATADV_VLAN_HAS_TAG && !own)
+		bat_priv->softif_vlan_dyn_count++;
+
 	hlist_add_head_rcu(&vlan->list, &bat_priv->softif_vlan_list);
 	spin_unlock_bh(&bat_priv->softif_vlan_list_lock);
 
@@ -597,20 +615,21 @@ batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid)
 /**
  * batadv_softif_vlan_get_or_create() - retrieve or create a softif vlan struct
  * @bat_priv: the bat priv with all the soft interface information
+ * @addr: the mac address of the client to add
  * @vid: the VLAN identifier
  *
  * Return: the softif vlan struct if found or created or NULL otherwise.
  */
 struct batadv_softif_vlan *
-batadv_softif_vlan_get_or_create(struct batadv_priv *bat_priv,
-				 unsigned short vid)
+batadv_softif_vlan_get_or_create(struct batadv_priv *bat_priv, const u8 *addr,
+				 unsigned short vid, bool own)
 {
 	struct batadv_softif_vlan *vlan = batadv_softif_vlan_get(bat_priv, vid);
 
 	if (vlan)
 		return vlan;
 
-	return batadv_softif_create_vlan(bat_priv, vid);
+	return batadv_softif_create_vlan(bat_priv, vid, own);
 }
 
 /**
@@ -824,6 +843,8 @@ static int batadv_softif_init_late(struct net_device *dev)
 	bat_priv->tt.last_changeset_len = 0;
 	bat_priv->isolation_mark = 0;
 	bat_priv->isolation_mark_mask = 0;
+	bat_priv->softif_vlan_dyn_max = 0;
+	bat_priv->softif_vlan_dyn_count = 0;
 
 	/* randomize initial seqno to avoid collision */
 	get_random_bytes(&random_seqno, sizeof(random_seqno));
net/batman-adv/soft-interface.h +2 -2
index 7050ccd304df..f5334d275229 100644
@@ -27,8 +27,8 @@ void batadv_softif_vlan_release(struct kref *ref);
 struct batadv_softif_vlan *batadv_softif_vlan_get(struct batadv_priv *bat_priv,
 						  unsigned short vid);
 struct batadv_softif_vlan *
-batadv_softif_vlan_get_or_create(struct batadv_priv *bat_priv,
-				 unsigned short vid);
+batadv_softif_vlan_get_or_create(struct batadv_priv *bat_priv, const u8 *addr,
+				 unsigned short vid, bool own);
 
 /**
  * batadv_softif_vlan_put() - decrease the vlan object refcounter and
net/batman-adv/translation-table.c +2 -1
index 144ce64e4600..342165da7e40 100644
@@ -629,6 +629,7 @@ static void batadv_tt_global_free(struct batadv_priv *bat_priv,
 int batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
 			unsigned short vid, int ifindex, u32 mark)
 {
+	bool own = (ifindex == BATADV_NULL_IFINDEX) ? true : false;
 	struct batadv_priv *bat_priv = netdev_priv(soft_iface);
 	struct batadv_tt_local_entry *tt_local;
 	struct batadv_tt_global_entry *tt_global = NULL;
@@ -704,7 +705,7 @@ int batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
 	}
 
 	/* increase the refcounter of the related vlan */
-	vlan = batadv_softif_vlan_get_or_create(bat_priv, vid);
+	vlan = batadv_softif_vlan_get_or_create(bat_priv, addr, vid, own);
 	if (!vlan) {
 		kmem_cache_free(batadv_tl_cache, tt_local);
 		tt_local = NULL;
net/batman-adv/types.h +6 -0
index fe89f08533fe..9f81ab24f0ba 100644
@@ -1768,6 +1768,12 @@ struct batadv_priv {
 	/** @softif_vlan_list_lock: lock protecting softif_vlan_list */
 	spinlock_t softif_vlan_list_lock;
 
+	/** @softif_vlan_dyn_max: maximum number of allowed learned VLANs */
+	unsigned short softif_vlan_dyn_max;
+
+	/** @softif_vlan_dyn_count: current number of learned VLANs */
+	unsigned short softif_vlan_dyn_count;
+
 #ifdef CONFIG_BATMAN_ADV_BLA
 	/** @bla: bridge loop avoidance data */
 	struct batadv_priv_bla bla;
Signature · 1 line
2.47.2
#3 lore raw

PATCH v5 3/3 batman-adv: avoid adding bridge VLAN IDs through ndo_vlan_rx_add_vid()

In reply to Linus Lüssing

The Linux bridge by default adds the PVID of a port (default VID 1) and by that triggers our ndo_vlan_rx_add_vid() handler. The PVID is for ingress traffic from bat0 to the bridge and other bridge ports. However this makes no statement about what is received or send on bat0 itself, bat0 might as well be an untagged access port, even with a PVID configured. Therefore ignoring here when a bridge is involved.

Also, similarly a "bridge vlan add vid 42 dev bat0 untagged" would call this handler with VID 42. Even though we wouldn't be interested in this VLAN as its traffic would be untagged on our side.

The issue is that any extra VLAN currently increases our own OGM protocol overhead quite a bit, so we want to avoid that by only adding VLANs that we are sure someone will be using. So only add VLANs through snooping of actual, VLAN tagged traffic, not through kernel internal network events if we have a bridge on top.

---
 net/batman-adv/multicast.c      | 30 +++------------------
 net/batman-adv/soft-interface.c | 47 +++++++++++++++++++++++++++++++++
 net/batman-adv/soft-interface.h |  1 +
 3 files changed, 51 insertions(+), 27 deletions(-)
net/batman-adv/multicast.c +3 -27
index b39c214c0c6d..9b7290bf05bd 100644
@@ -56,6 +56,7 @@
 #include "log.h"
 #include "netlink.h"
 #include "send.h"
+#include "soft-interface.h"
 #include "translation-table.h"
 #include "tvlv.h"
 
@@ -71,31 +72,6 @@ static void batadv_mcast_start_timer(struct batadv_priv *bat_priv)
 			   msecs_to_jiffies(BATADV_MCAST_WORK_PERIOD));
 }
 
-/**
- * batadv_mcast_get_bridge() - get the bridge on top of the softif if it exists
- * @soft_iface: netdev struct of the mesh interface
- *
- * If the given soft interface has a bridge on top then the refcount
- * of the according net device is increased.
- *
- * Return: NULL if no such bridge exists. Otherwise the net device of the
- * bridge.
- */
-static struct net_device *batadv_mcast_get_bridge(struct net_device *soft_iface)
-{
-	struct net_device *upper = soft_iface;
-
-	rcu_read_lock();
-	do {
-		upper = netdev_master_upper_dev_get_rcu(upper);
-	} while (upper && !netif_is_bridge_master(upper));
-
-	dev_hold(upper);
-	rcu_read_unlock();
-
-	return upper;
-}
-
 /**
  * batadv_mcast_mla_rtr_flags_softif_get_ipv4() - get mcast router flags from
  *  node for IPv4
@@ -288,7 +264,7 @@ batadv_mcast_mla_flags_get(struct batadv_priv *bat_priv)
 	struct batadv_mcast_mla_flags mla_flags;
 	struct net_device *bridge;
 
-	bridge = batadv_mcast_get_bridge(dev);
+	bridge = batadv_softif_get_bridge(dev);
 
 	memset(&mla_flags, 0, sizeof(mla_flags));
 	mla_flags.enabled = 1;
@@ -530,7 +506,7 @@ batadv_mcast_mla_softif_get(struct net_device *dev,
 			    struct hlist_head *mcast_list,
 			    struct batadv_mcast_mla_flags *flags)
 {
-	struct net_device *bridge = batadv_mcast_get_bridge(dev);
+	struct net_device *bridge = batadv_softif_get_bridge(dev);
 	int ret4, ret6 = 0;
 
 	if (bridge)
net/batman-adv/soft-interface.c +47 -0

77 lines not on this page · raw message

net/batman-adv/soft-interface.h +1 -0
index f5334d275229..130447cb22a8 100644
@@ -19,6 +19,7 @@ int batadv_skb_head_push(struct sk_buff *skb, unsigned int len);
 void batadv_interface_rx(struct net_device *soft_iface,
 			 struct sk_buff *skb, int hdr_size,
 			 struct batadv_orig_node *orig_node);
+struct net_device *batadv_softif_get_bridge(struct net_device *soft_iface);
 bool batadv_softif_is_valid(const struct net_device *net_dev);
 extern struct rtnl_link_ops batadv_link_ops;
 int batadv_softif_create_vlan_own(struct batadv_priv *bat_priv,
Signature · 1 line
2.47.2
maintainer
#4 lore raw
In reply to Linus Lüssing
Quoted 5 lines · On Saturday, 1 February 2025 05:31:27 GMT+1 Linus Lüssing wrote:

v5:
* rebased to current main branch:
-> PATCH 3/3 needed to readd the include for soft-interface.h for
batadv_softif_get_bridge() since commit
"50eddf397ac3 batman-adv: netlink: reduce duplicate code by returning interfaces"

I see also following reports:

ecsv/pu: headers
----------------

    diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
    index 051e7fce..30f65708 100644
    --- a/net/batman-adv/soft-interface.c
    +++ b/net/batman-adv/soft-interface.c
    @@ -23,6 +23,7 @@
     #include <linux/kref.h>
     #include <linux/list.h>
     #include <linux/lockdep.h>
    +#include <linux/net.h>
     #include <linux/netdevice.h>
     #include <linux/netlink.h>
     #include <linux/percpu.h>

ecsv/pu: kerneldoc ./net/batman-adv/soft-interface.c
----------------------------------------------------

./net/batman-adv/soft-interface.c:566: warning: Function parameter or struct member 'own' not described in 'batadv_softif_create_vlan' ./net/batman-adv/soft-interface.c:626: warning: Function parameter or struct member 'own' not described in 'batadv_softif_vlan_get_or_create'

ecsv/pu: unused_symbols
-----------------------

cfg:

* unused_symbols cfg: BLA=n DAT=n DEBUG=n TRACING=n NC=n MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=n DAT=n DEBUG=n TRACING=n NC=y MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=n DAT=n DEBUG=n TRACING=y NC=n MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=n DAT=n DEBUG=y TRACING=n NC=n MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=n DAT=n DEBUG=y TRACING=n NC=n MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=n DAT=n DEBUG=y TRACING=n NC=y MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=n DAT=n DEBUG=y TRACING=y NC=n MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=n DAT=n DEBUG=y TRACING=y NC=y MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=n DAT=y DEBUG=n TRACING=n NC=y MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=n DAT=y DEBUG=n TRACING=n NC=y MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=n DAT=y DEBUG=n TRACING=y NC=n MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=n DAT=y DEBUG=y TRACING=n NC=n MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=n DAT=y DEBUG=y TRACING=n NC=y MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=n DAT=y DEBUG=y TRACING=y NC=n MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=n DAT=y DEBUG=y TRACING=y NC=y MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=n DAT=y DEBUG=y TRACING=y NC=y MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=y DAT=n DEBUG=n TRACING=n NC=n MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=y DAT=n DEBUG=n TRACING=n NC=y MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=y DAT=n DEBUG=n TRACING=y NC=n MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=y DAT=n DEBUG=y TRACING=n NC=n MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=y DAT=n DEBUG=y TRACING=n NC=y MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=y DAT=n DEBUG=y TRACING=n NC=y MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=y DAT=n DEBUG=y TRACING=y NC=y MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=y DAT=y DEBUG=n TRACING=n NC=n MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=y DAT=y DEBUG=n TRACING=n NC=y MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=y DAT=y DEBUG=n TRACING=y NC=n MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=y DAT=y DEBUG=n TRACING=y NC=y MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=y DAT=y DEBUG=y TRACING=n NC=n MCAST=n BATMAN_V=n
* unused_symbols cfg: BLA=y DAT=y DEBUG=y TRACING=n NC=n MCAST=n BATMAN_V=y
* unused_symbols cfg: BLA=y DAT=y DEBUG=y TRACING=y NC=n MCAST=n BATMAN_V=y

batadv_softif_get_bridge

I am guessing I must just ignore the latter because it is only relevant for non-mcast build and the noise from the extra #ifdef around "static" isn't worth it.

The the linux/net.h "dependency" came with the second patch

Btw. I am still waiting for reviews from Antonio

Kind regards,
Sven