Skip to contentSkip to conversation

B.A.T.M.A.N. V - fallback to tp meter estimation if throughput otherwise not available

RFC Superseded Marek Lindner 2 participants 8 messages May 8, 2018 Batman advanced

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover B.A.T.M.A.N. V - fallback to tp meter estimation if throughput otherwise not available

Under normal circumstances B.A.T.M.A.N. V retrieves the neighbor throughput values to populate its metric tables from the various drivers such as WiFi throughput tables and Ethernet throughput.. Whenever the interface drivers do not export link throughput information manual overrides become necessary. To further automate and thus better support these setups, ELP may call the batman-adv throughput meter to schedule a throughput estimation to be used to populate the metric table.

Antonio Quartulli (3):
batman-adv: tp_meter - prevent concurrent tp_meter sessions by using
workqueue
batman-adv: tp_meter - don't check for existing session
batman-adv: to_meter - add option to perform one-hop test

Marek Lindner (3):
batman-adv: tp_meter - allow up to 10 queued sessions
batman-adv: tp_meter - add caller distinction
batman-adv: ELP - use tp meter to estimate the throughput if otherwise
not available

 include/uapi/linux/batadv_packet.h |   1 +
 net/batman-adv/bat_v_elp.c         |  62 ++++-
 net/batman-adv/bat_v_elp.h         |  19 ++
 net/batman-adv/main.c              |  10 +-
 net/batman-adv/main.h              |   7 +-
 net/batman-adv/netlink.c           |   3 +-
 net/batman-adv/routing.c           |   5 +-
 net/batman-adv/tp_meter.c          | 431 +++++++++++++++++------------
 net/batman-adv/tp_meter.h          |  11 +-
 net/batman-adv/types.h             |  32 ++-
 10 files changed, 393 insertions(+), 188 deletions(-)
Signature · 1 line
2.17.0
#1 lore raw

RFC 1/6 batman-adv: tp_meter - prevent concurrent tp_meter sessions by using workqueue

From: Antonio Quartulli <[email protected]>

To ensure that no more than one tp_meter session runs at the same time, use an ordered workqueue instead of spawning one kthread per session.

---
 net/batman-adv/main.c     | 10 ++++--
 net/batman-adv/tp_meter.c | 73 ++++++++++++++++++---------------------
 net/batman-adv/tp_meter.h |  3 +-
 net/batman-adv/types.h    |  5 ++-
 4 files changed, 48 insertions(+), 43 deletions(-)
net/batman-adv/main.c +8 -2
index 69c0d85b..cd3f1924 100644
@@ -91,6 +91,10 @@ static int __init batadv_init(void)
 	if (ret < 0)
 		return ret;
 
+	ret = batadv_tp_meter_init();
+	if (ret < 0)
+		goto err_tp_meter;
+
 	INIT_LIST_HEAD(&batadv_hardif_list);
 	batadv_algo_init();
 
@@ -99,7 +103,6 @@ static int __init batadv_init(void)
 	batadv_v_init();
 	batadv_iv_init();
 	batadv_nc_init();
-	batadv_tp_meter_init();
 
 	batadv_event_workqueue = create_singlethread_workqueue("bat_events");
 	if (!batadv_event_workqueue)
@@ -118,9 +121,11 @@ static int __init batadv_init(void)
 	return 0;
 
 err_create_wq:
+	batadv_tp_meter_destroy();
+err_tp_meter:
 	batadv_tt_cache_destroy();
 
-	return -ENOMEM;
+	return ret;
 }
 
 static void __exit batadv_exit(void)
@@ -138,6 +143,7 @@ static void __exit batadv_exit(void)
 	rcu_barrier();
 
 	batadv_tt_cache_destroy();
+	batadv_tp_meter_destroy();
 }
 
 /**
net/batman-adv/tp_meter.c +34 -39

122 lines not on this page · raw message

net/batman-adv/tp_meter.h +2 -1
index 68e60097..ab0bde26 100644
@@ -25,7 +25,8 @@
 
 struct sk_buff;
 
-void batadv_tp_meter_init(void);
+int batadv_tp_meter_init(void);
+void batadv_tp_meter_destroy(void);
 void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
 		     u32 test_length, u32 *cookie);
 void batadv_tp_stop(struct batadv_priv *bat_priv, const u8 *dst,
net/batman-adv/types.h +4 -1
index 360357f8..c4bc8221 100644
@@ -1354,7 +1354,10 @@ struct batadv_tp_vars {
 	/** @finish_work: work item for the finishing procedure */
 	struct delayed_work finish_work;
 
-	/** @test_length: test length in milliseconds */
+        /** @test_work: work item for the test process */
+	struct work_struct test_work;
+
+        /** @test_length: test length in milliseconds */
 	u32 test_length;
 
 	/** @session: TP session identifier */
Signature · 1 line
2.17.0
#2 lore raw

RFC 2/6 batman-adv: tp_meter - don't check for existing session

In reply to Marek Lindner

From: Antonio Quartulli <[email protected]>

Since the conversion from kthread to queue worker it is not possible to run more than one "sender" session at a time.
For this reason, checking if another session to the same destination is already scheduled is not useful anymore.

Remove such check and allow the user to enqueue a new session to a previously targeted node.

---
 net/batman-adv/tp_meter.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
net/batman-adv/tp_meter.c +1 -15
index 55e93abc..d91d371d 100644
@@ -939,21 +939,7 @@ void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
 	session_cookie = batadv_tp_session_cookie(session_id, icmp_uid);
 	*cookie = session_cookie;
 
-	/* look for an already existing test towards this node */
-	spin_lock_bh(&bat_priv->tp_list_lock);
-	tp_vars = batadv_tp_list_find(bat_priv, dst);
-	if (tp_vars) {
-		spin_unlock_bh(&bat_priv->tp_list_lock);
-		batadv_tp_vars_put(tp_vars);
-		batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
-			   "Meter: test to or from the same node already ongoing, aborting\n");
-		batadv_tp_batctl_error_notify(BATADV_TP_REASON_ALREADY_ONGOING,
-					      dst, bat_priv, session_cookie);
-		return;
-	}
-
 	if (!atomic_add_unless(&bat_priv->tp_num, 1, BATADV_TP_MAX_NUM)) {
-		spin_unlock_bh(&bat_priv->tp_list_lock);
 		batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
 			   "Meter: too many ongoing sessions, aborting (SEND)\n");
 		batadv_tp_batctl_error_notify(BATADV_TP_REASON_TOO_MANY, dst,
@@ -963,7 +949,6 @@ void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
 
 	tp_vars = kmalloc(sizeof(*tp_vars), GFP_ATOMIC);
 	if (!tp_vars) {
-		spin_unlock_bh(&bat_priv->tp_list_lock);
 		batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
 			   "Meter: %s cannot allocate list elements\n",
 			   __func__);
@@ -1021,6 +1006,7 @@ void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
 	spin_lock_init(&tp_vars->prerandom_lock);
 
 	kref_get(&tp_vars->refcount);
+	spin_lock_bh(&bat_priv->tp_list_lock);
 	hlist_add_head_rcu(&tp_vars->list, &bat_priv->tp_list);
 	spin_unlock_bh(&bat_priv->tp_list_lock);
 
Signature · 1 line
2.17.0
#3 lore raw

RFC 3/6 batman-adv: tp_meter - allow up to 10 queued sessions

In reply to Marek Lindner
---
 net/batman-adv/main.h     | 6 ++++--
 net/batman-adv/tp_meter.c | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)
net/batman-adv/main.h +4 -2
index 8da3c933..89dfaf87 100644
@@ -137,9 +137,11 @@
 #define BATADV_NC_NODE_TIMEOUT 10000 /* Milliseconds */
 
 /**
- * BATADV_TP_MAX_NUM - maximum number of simultaneously active tp sessions
+ * BATADV_TP_MAX_NUM_QUEUE - maximum number of queued (outgoing) tp sessions
+ * BATADV_TP_MAX_NUM_RECV - maximum number of simultaneous receiving streams
  */
-#define BATADV_TP_MAX_NUM 5
+#define BATADV_TP_MAX_NUM_QUEUE 10
+#define BATADV_TP_MAX_NUM_RECV 1
 
 /**
  * enum batadv_mesh_state - State of a soft interface
net/batman-adv/tp_meter.c +3 -2
index d91d371d..eb7862cd 100644
@@ -939,7 +939,8 @@ void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
 	session_cookie = batadv_tp_session_cookie(session_id, icmp_uid);
 	*cookie = session_cookie;
 
-	if (!atomic_add_unless(&bat_priv->tp_num, 1, BATADV_TP_MAX_NUM)) {
+	if (!atomic_add_unless(&bat_priv->tp_num, 1, BATADV_TP_MAX_NUM_QUEUE)) {
+		spin_unlock_bh(&bat_priv->tp_list_lock);
 		batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
 			   "Meter: too many ongoing sessions, aborting (SEND)\n");
 		batadv_tp_batctl_error_notify(BATADV_TP_REASON_TOO_MANY, dst,
@@ -1316,7 +1317,7 @@ batadv_tp_init_recv(struct batadv_priv *bat_priv,
 	if (tp_vars)
 		goto out_unlock;
 
-	if (!atomic_add_unless(&bat_priv->tp_num, 1, BATADV_TP_MAX_NUM)) {
+	if (!atomic_add_unless(&bat_priv->tp_num, 1, BATADV_TP_MAX_NUM_RECV)) {
 		batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
 			   "Meter: too many ongoing sessions, aborting (RECV)\n");
 		goto out_unlock;
Signature · 1 line
2.17.0
#4 lore raw

RFC 4/6 batman-adv: tp_meter - add caller distinction

In reply to Marek Lindner

The throughput meter can be called from user space as well as from the batman-adv kernel module itself. Add infrastructure to handle the different callers.

---
 net/batman-adv/netlink.c  |   2 +-
 net/batman-adv/tp_meter.c | 102 +++++++++++++++++++++-----------------
 net/batman-adv/tp_meter.h |   2 +-
 net/batman-adv/types.h    |  15 +++++-
 4 files changed, 72 insertions(+), 49 deletions(-)
net/batman-adv/netlink.c +1 -1
index 0d9459b6..88bf6c6f 100644
@@ -378,7 +378,7 @@ batadv_netlink_tp_meter_start(struct sk_buff *skb, struct genl_info *info)
 	}
 
 	bat_priv = netdev_priv(soft_iface);
-	batadv_tp_start(bat_priv, dst, test_length, &cookie);
+	batadv_tp_start(bat_priv, dst, test_length, &cookie, BATADV_TP_USERSPACE);
 
 	ret = batadv_netlink_tp_meter_put(msg, cookie);
 
net/batman-adv/tp_meter.c +56 -46

160 lines not on this page · raw message

net/batman-adv/tp_meter.h +1 -1
index ab0bde26..d844575d 100644
@@ -28,7 +28,7 @@ struct sk_buff;
 int batadv_tp_meter_init(void);
 void batadv_tp_meter_destroy(void);
 void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
-		     u32 test_length, u32 *cookie);
+		     u32 test_length, u32 *cookie, enum batadv_tp_meter_caller caller);
 void batadv_tp_stop(struct batadv_priv *bat_priv, const u8 *dst,
 		    u8 return_value);
 void batadv_tp_meter_recv(struct batadv_priv *bat_priv, struct sk_buff *skb);
net/batman-adv/types.h +14 -1
index c4bc8221..826b3b42 100644
@@ -1323,6 +1323,16 @@ enum batadv_tp_meter_role {
 	BATADV_TP_SENDER
 };
 
+/**
+ * enum batadv_tp_meter_caller - initiator of the tp meter session
+ * @BATADV_TP_USERSPACE: initiated by user space
+ * @BATADV_TP_ELP: initiated by ELP
+ */
+enum batadv_tp_meter_caller {
+	BATADV_TP_USERSPACE,
+	BATADV_TP_ELP
+};
+
 /**
  * struct batadv_tp_vars - tp meter private variables per session
  */
@@ -1345,7 +1355,10 @@ struct batadv_tp_vars {
 	/** @role: receiver/sender modi */
 	enum batadv_tp_meter_role role;
 
-	/** @sending: sending binary semaphore: 1 if sending, 0 is not */
+        /** @caller: caller of tp meter session (user space or ELP) */
+	enum batadv_tp_meter_caller caller;
+
+        /** @sending: sending binary semaphore: 1 if sending, 0 is not */
 	atomic_t sending;
 
 	/** @reason: reason for a stopped session */
Signature · 1 line
2.17.0
#5 lore raw

RFC 5/6 batman-adv: to_meter - add option to perform one-hop test

In reply to Marek Lindner

From: Antonio Quartulli <[email protected]>

A link test is a TP session ran over a specific one-hop link, rather than towards an originator in the mesh.

---
 include/uapi/linux/batadv_packet.h |   1 +
 net/batman-adv/netlink.c           |   3 +-
 net/batman-adv/routing.c           |   5 +-
 net/batman-adv/tp_meter.c          | 220 +++++++++++++++++++----------
 net/batman-adv/tp_meter.h          |   8 +-
 net/batman-adv/types.h             |   3 +
 6 files changed, 161 insertions(+), 79 deletions(-)
include/uapi/linux/batadv_packet.h +1 -0
index 894d8d2f..fc89ab6b 100644
@@ -355,6 +355,7 @@ struct batadv_icmp_tp_packet {
 enum batadv_icmp_tp_subtype {
 	BATADV_TP_MSG	= 0,
 	BATADV_TP_ACK,
+	BATADV_TP_MSG_LINK,
 };
 
 #define BATADV_RR_LEN 16
net/batman-adv/netlink.c +2 -1
index 88bf6c6f..064020cc 100644
@@ -378,7 +378,8 @@ batadv_netlink_tp_meter_start(struct sk_buff *skb, struct genl_info *info)
 	}
 
 	bat_priv = netdev_priv(soft_iface);
-	batadv_tp_start(bat_priv, dst, test_length, &cookie, BATADV_TP_USERSPACE);
+	batadv_tp_start(bat_priv, dst, NULL, test_length, &cookie,
+			BATADV_TP_USERSPACE);
 
 	ret = batadv_netlink_tp_meter_put(msg, cookie);
 
net/batman-adv/routing.c +3 -2
index cc3ed93a..2a2c1ffe 100644
@@ -229,6 +229,7 @@ bool batadv_check_management_packet(struct sk_buff *skb,
  * otherwise.
  */
 static int batadv_recv_my_icmp_packet(struct batadv_priv *bat_priv,
+				      struct batadv_hard_iface *recv_if,
 				      struct sk_buff *skb)
 {
 	struct batadv_hard_iface *primary_if = NULL;
@@ -281,7 +282,7 @@ static int batadv_recv_my_icmp_packet(struct batadv_priv *bat_priv,
 		if (!pskb_may_pull(skb, sizeof(struct batadv_icmp_tp_packet)))
 			goto out;
 
-		batadv_tp_meter_recv(bat_priv, skb);
+		batadv_tp_meter_recv(bat_priv, recv_if, skb);
 		ret = NET_RX_SUCCESS;
 		/* skb was consumed */
 		skb = NULL;
@@ -418,7 +419,7 @@ int batadv_recv_icmp_packet(struct sk_buff *skb,
 
 	/* packet for me */
 	if (batadv_is_my_mac(bat_priv, icmph->dst))
-		return batadv_recv_my_icmp_packet(bat_priv, skb);
+		return batadv_recv_my_icmp_packet(bat_priv, recv_if, skb);
 
 	/* TTL exceeded */
 	if (icmph->ttl < 2)
net/batman-adv/tp_meter.c +146 -74

405 lines not on this page · raw message

net/batman-adv/tp_meter.h +6 -2
index d844575d..3a1be483 100644
@@ -28,9 +28,13 @@ struct sk_buff;
 int batadv_tp_meter_init(void);
 void batadv_tp_meter_destroy(void);
 void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
-		     u32 test_length, u32 *cookie, enum batadv_tp_meter_caller caller);
+		     struct batadv_hardif_neigh_node *neigh,
+		     u32 test_length, u32 *cookie,
+		     enum batadv_tp_meter_caller caller);
 void batadv_tp_stop(struct batadv_priv *bat_priv, const u8 *dst,
 		    u8 return_value);
-void batadv_tp_meter_recv(struct batadv_priv *bat_priv, struct sk_buff *skb);
+void batadv_tp_meter_recv(struct batadv_priv *bat_priv,
+			  struct batadv_hard_iface *recv_if,
+			  struct sk_buff *skb);
 
 #endif /* _NET_BATMAN_ADV_TP_METER_H_ */
net/batman-adv/types.h +3 -0
index 826b3b42..98dccc6c 100644
@@ -1454,6 +1454,9 @@ struct batadv_tp_vars {
 
 	/** @rcu: struct used for freeing in an RCU-safe manner */
 	struct rcu_head rcu;
+
+	/** @neigh_node: in case of LINK test, represents the other-end */
+	struct batadv_hardif_neigh_node *hardif_neigh;
 };
 
 /**
Signature · 1 line
2.17.0
#6 lore raw

RFC 6/6 batman-adv: ELP - use tp meter to estimate the throughput if otherwise not available

In reply to Marek Lindner
---
 net/batman-adv/bat_v_elp.c | 62 ++++++++++++++++++++++++++++++++++++--
 net/batman-adv/bat_v_elp.h | 19 ++++++++++++
 net/batman-adv/main.h      |  1 +
 net/batman-adv/tp_meter.c  | 25 +++++++++++++--
 net/batman-adv/types.h     |  9 ++++++
 5 files changed, 111 insertions(+), 5 deletions(-)
net/batman-adv/bat_v_elp.c +60 -2
index 28687493..028dc3ab 100644
@@ -51,6 +51,7 @@
 #include "originator.h"
 #include "routing.h"
 #include "send.h"
+#include "tp_meter.h"
 
 /**
  * batadv_v_elp_start_timer() - restart timer for ELP periodic work
@@ -67,6 +68,41 @@ static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface)
 			   msecs_to_jiffies(msecs));
 }
 
+/**
+ * batadv_v_elp_tp_start() - start a tp meter session for a neighbor
+ * @neigh: neighbor to run tp meter on
+ */
+static void batadv_v_elp_tp_start(struct batadv_hardif_neigh_node *neigh)
+{
+	struct batadv_hard_iface *hard_iface = neigh->if_incoming;
+	struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
+
+	neigh->bat_v.tp_meter_running = true;
+	batadv_tp_start(bat_priv, neigh->addr, neigh, 10, NULL, BATADV_TP_ELP);
+}
+
+/**
+ * batadv_v_elp_tp_fail() - handle tp meter session failure
+ * @neigh: neighbor to run tp meter on
+ */
+void batadv_v_elp_tp_fail(struct batadv_hardif_neigh_node *neigh)
+{
+	neigh->bat_v.tp_meter_running = false;
+}
+
+/**
+ * batadv_v_elp_tp_finish() - post-process tp meter results
+ * @neigh: neighbor tp meter on
+ * @throughput: tp meter throughput result
+ */
+void batadv_v_elp_tp_finish(struct batadv_hardif_neigh_node *neigh,
+			    u32 throughput)
+{
+	ewma_throughput_add(&neigh->bat_v.throughput, throughput);
+	neigh->bat_v.last_tp_meter_run = jiffies;
+	neigh->bat_v.tp_meter_running = false;
+}
+
 /**
  * batadv_v_elp_get_throughput() - get the throughput towards a neighbour
  * @neigh: the neighbour for which the throughput has to be obtained
@@ -80,6 +116,7 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
 	struct ethtool_link_ksettings link_settings;
 	struct net_device *real_netdev;
 	struct station_info sinfo;
+	u32 last_tp_run_msecs;
 	u32 throughput;
 	int ret;
 
@@ -112,10 +149,13 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
 			 */
 			return 0;
 		}
+
+		/* unsupported WiFi driver */
 		if (ret)
-			goto default_throughput;
+			goto fallback_throughput;
+
 		if (!(sinfo.filled & BIT(NL80211_STA_INFO_EXPECTED_THROUGHPUT)))
-			goto default_throughput;
+			goto fallback_throughput;
 
 		return sinfo.expected_throughput / 100;
 	}
@@ -139,6 +179,24 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
 			return throughput * 10;
 	}
 
+fallback_throughput:
+	last_tp_run_msecs = jiffies_to_msecs(jiffies - neigh->bat_v.last_tp_meter_run);
+
+	/* check the tp_meter_running flag before checking the timestamp to
+	 * avoid a race condition where a new tp meter session is scheduled
+	 * right after the previous tp meter session has completed
+	 */
+	if (!neigh->bat_v.tp_meter_running &&
+	    last_tp_run_msecs > BATADV_ELP_TP_RUN_INTERVAL)
+		batadv_v_elp_tp_start(neigh);
+
+	/* discard too old tp test results */
+	if (last_tp_run_msecs > 2 * BATADV_ELP_TP_RUN_INTERVAL)
+		neigh->bat_v.tp_meter_throughput = 0;
+
+	if (!neigh->bat_v.tp_meter_throughput)
+		return neigh->bat_v.tp_meter_throughput;
+
 default_throughput:
 	if (!(hard_iface->bat_v.flags & BATADV_WARNING_DEFAULT)) {
 		batadv_info(hard_iface->soft_iface,
net/batman-adv/bat_v_elp.h +19 -0
index e8c7b7fd..d0605054 100644
@@ -33,4 +33,23 @@ int batadv_v_elp_packet_recv(struct sk_buff *skb,
 			     struct batadv_hard_iface *if_incoming);
 void batadv_v_elp_throughput_metric_update(struct work_struct *work);
 
+#ifdef CONFIG_BATMAN_ADV_BATMAN_V
+
+void batadv_v_elp_tp_fail(struct batadv_hardif_neigh_node *neigh);
+void batadv_v_elp_tp_finish(struct batadv_hardif_neigh_node *neigh,
+			    u32 throughput);
+
+#else
+
+static inline void batadv_v_elp_tp_fail(struct batadv_hardif_neigh_node *neigh)
+{
+}
+
+static inline void
+batadv_v_elp_tp_finish(struct batadv_hardif_neigh_node *neigh, u32 throughput)
+{
+}
+
+#endif /* CONFIG_BATMAN_ADV_BATMAN_V */
+
 #endif /* _NET_BATMAN_ADV_BAT_V_ELP_H_ */
net/batman-adv/main.h +1 -0
index 89dfaf87..ed4ae913 100644
@@ -69,6 +69,7 @@
 #define BATADV_ELP_MIN_PROBE_SIZE 200 /* bytes */
 #define BATADV_ELP_PROBE_MAX_TX_DIFF 100 /* milliseconds */
 #define BATADV_ELP_MAX_AGE 64
+#define BATADV_ELP_TP_RUN_INTERVAL 60000 /* milliseconds */
 #define BATADV_OGM_MAX_ORIGDIFF 5
 #define BATADV_OGM_MAX_AGE 64
 
net/batman-adv/tp_meter.c +22 -3
index 1526286b..e7a3c24e 100644
@@ -56,6 +56,7 @@
 #include "netlink.h"
 #include "originator.h"
 #include "send.h"
+#include "bat_v_elp.h"
 
 /**
  * BATADV_TP_DEF_TEST_LENGTH - Default test length if not specified by the user
@@ -225,6 +226,7 @@ static void batadv_tp_caller_notify(struct batadv_priv *bat_priv,
 				    enum batadv_tp_meter_reason reason)
 {
 	u32 total_bytes;
+	u64 throughput;
 	u32 test_time;
 	u32 cookie;
 	bool reason_is_error;
@@ -249,6 +251,21 @@ static void batadv_tp_caller_notify(struct batadv_priv *bat_priv,
 
 		break;
 	case BATADV_TP_ELP:
+		if (reason_is_error) {
+			batadv_v_elp_tp_fail(tp_vars->hardif_neigh);
+			return;
+		}
+
+		test_time = jiffies_to_msecs(jiffies - tp_vars->start_time);
+		total_bytes = atomic64_read(&tp_vars->tot_sent);
+
+		/* The following calculation includes these steps:
+		 * - convert bytes to bits
+		 * - divide bits by the test length (msecs)
+		 * - convert result from bits/ms to 0.1Mb/s (* 1024 * 10 / 1000)
+		 */
+		throughput = total_bytes * 8 >> ilog2(test_time) / 10;
+		batadv_v_elp_tp_finish(tp_vars->hardif_neigh, throughput);
 		break;
 	default:
 		break;
@@ -266,13 +283,15 @@ static void batadv_tp_caller_notify(struct batadv_priv *bat_priv,
 static void batadv_tp_caller_init_error(struct batadv_priv *bat_priv,
 					enum batadv_tp_meter_caller caller,
 					enum batadv_tp_meter_reason reason,
-					const u8 *dst, u32 cookie)
+					const u8 *dst, u32 cookie,
+					struct batadv_hardif_neigh_node *hardif_neigh)
 {
 	switch (caller) {
 	case BATADV_TP_USERSPACE:
 		batadv_netlink_tpmeter_notify(bat_priv, dst, reason, 0, 0, cookie);
 		break;
 	case BATADV_TP_ELP:
+		batadv_v_elp_tp_fail(hardif_neigh);
 		break;
 	default:
 		break;
@@ -978,7 +997,7 @@ void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
 		batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
 			   "Meter: too many ongoing sessions, aborting (SEND)\n");
 		batadv_tp_caller_init_error(bat_priv, caller, BATADV_TP_REASON_TOO_MANY,
-					    dst, session_cookie);
+					    dst, session_cookie, neigh);
 		return;
 	}
 
@@ -988,7 +1007,7 @@ void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst,
 			   "Meter: %s cannot allocate list elements\n",
 			   __func__);
 		batadv_tp_caller_init_error(bat_priv, caller, BATADV_TP_REASON_MEMORY_ERROR,
-					    dst, session_cookie);
+					    dst, session_cookie, neigh);
 		return;
 	}
 
net/batman-adv/types.h +9 -0
index 98dccc6c..54fabcb1 100644
@@ -583,6 +583,15 @@ struct batadv_hardif_neigh_node_bat_v {
 
 	/** @metric_work: work queue callback item for metric update */
 	struct work_struct metric_work;
+
+	/** @tp_meter_running: tp meter measurements towards this neighbor in progress */
+	bool tp_meter_running;
+
+	/** @last_tp_meter_run: timestamp of last tp meter measurement completion */
+	unsigned long last_tp_meter_run;
+
+	/** @tp_meter_throughput: throughput information measured by tp meter */
+	unsigned long tp_meter_throughput;
 };
 
 /**
Signature · 1 line
2.17.0
maintainer
#7 lore raw
In reply to Marek Lindner

Name of failed tests
====================

ecsv/pu
-------

* checkpatch ./net/batman-adv/bat_v_elp.c
* checkpatch ./net/batman-adv/tp_meter.c
* checkpatch ./net/batman-adv/types.h
* headers
* kerneldoc ./net/batman-adv/routing.c
* kerneldoc ./net/batman-adv/tp_meter.c
* kerneldoc ./net/batman-adv/types.h
* kerneldoc include/uapi/linux/batadv_packet.h
* smatch linux-3.10 CONFIG_BATMAN_ADV_BLA=n CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-3.10 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-3.11 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-3.15 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-3.16 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=y
* smatch linux-3.16 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=n CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-3.18 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=y
* smatch linux-3.19 CONFIG_BATMAN_ADV_BLA=n CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=y
* smatch linux-3.19 CONFIG_BATMAN_ADV_BLA=n CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=n CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-3.4 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=n CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=n CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-3.5 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-3.7 CONFIG_BATMAN_ADV_BLA=n CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-4.0 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=n CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=y
* smatch linux-4.10 CONFIG_BATMAN_ADV_BLA=n CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-4.10 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=y
* smatch linux-4.11 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=n CONFIG_BATMAN_ADV_BATMAN_V=y
* smatch linux-4.12 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=y
* smatch linux-4.15 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-4.4 CONFIG_BATMAN_ADV_BLA=n CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-4.6 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=y
* smatch linux-4.6 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=n CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-4.8 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=n CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=n CONFIG_BATMAN_ADV_BATMAN_V=n
* smatch linux-4.9 CONFIG_BATMAN_ADV_BLA=n CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
* sparse linux-3.10 cfg: BLA=n DAT=y DEBUGFS=y DEBUG=y NC=y MCAST=y BATMAN_V=n
* sparse linux-3.10 cfg: BLA=y DAT=y DEBUGFS=y DEBUG=y NC=y MCAST=y BATMAN_V=n
* sparse linux-3.11 cfg: BLA=y DAT=n DEBUGFS=y DEBUG=y NC=y MCAST=y BATMAN_V=n
* sparse linux-3.15 cfg: BLA=y DAT=y DEBUGFS=y DEBUG=y NC=y MCAST=y BATMAN_V=n
* sparse linux-3.16 cfg: BLA=y DAT=n DEBUGFS=y DEBUG=n NC=n MCAST=y BATMAN_V=y
* sparse linux-3.16 cfg: BLA=y DAT=y DEBUGFS=n DEBUG=n NC=y MCAST=y BATMAN_V=n
* sparse linux-3.18 cfg: BLA=y DAT=y DEBUGFS=y DEBUG=y NC=y MCAST=y BATMAN_V=y
* sparse linux-3.19 cfg: BLA=n DAT=n DEBUGFS=y DEBUG=y NC=n MCAST=y BATMAN_V=y
* sparse linux-3.19 cfg: BLA=n DAT=y DEBUGFS=n DEBUG=n NC=y MCAST=y BATMAN_V=n
* sparse linux-3.4 cfg: BLA=y DAT=n DEBUGFS=n DEBUG=n NC=y MCAST=n BATMAN_V=n
* sparse linux-3.5 cfg: BLA=y DAT=n DEBUGFS=y DEBUG=y NC=y MCAST=y BATMAN_V=n
* sparse linux-3.7 cfg: BLA=n DAT=n DEBUGFS=y DEBUG=y NC=y MCAST=y BATMAN_V=n
* sparse linux-4.0 cfg: BLA=y DAT=n DEBUGFS=n DEBUG=n NC=n MCAST=y BATMAN_V=y
* sparse linux-4.10 cfg: BLA=n DAT=y DEBUGFS=y DEBUG=y NC=y MCAST=y BATMAN_V=n
* sparse linux-4.10 cfg: BLA=y DAT=n DEBUGFS=y DEBUG=y NC=n MCAST=y BATMAN_V=y
* sparse linux-4.11 cfg: BLA=y DAT=n DEBUGFS=y DEBUG=y NC=n MCAST=n BATMAN_V=y
* sparse linux-4.12 cfg: BLA=y DAT=n DEBUGFS=y DEBUG=y NC=n MCAST=y BATMAN_V=y
* sparse linux-4.15 cfg: BLA=y DAT=y DEBUGFS=y DEBUG=n NC=y MCAST=y BATMAN_V=n
* sparse linux-4.4 cfg: BLA=n DAT=y DEBUGFS=y DEBUG=n NC=n MCAST=y BATMAN_V=n
* sparse linux-4.6 cfg: BLA=y DAT=n DEBUGFS=y DEBUG=n NC=n MCAST=y BATMAN_V=y
* sparse linux-4.6 cfg: BLA=y DAT=y DEBUGFS=y DEBUG=n NC=n MCAST=n BATMAN_V=n
* sparse linux-4.8 cfg: BLA=y DAT=y DEBUGFS=n DEBUG=n NC=y MCAST=n BATMAN_V=n
* sparse linux-4.9 cfg: BLA=n DAT=y DEBUGFS=y DEBUG=y NC=n MCAST=y BATMAN_V=n

Output of different failed tests
================================

ecsv/pu: checkpatch ./net/batman-adv/bat_v_elp.c
------------------------------------------------

WARNING: line over 80 characters
#183: FILE: ./net/batman-adv/bat_v_elp.c:183:
+ last_tp_run_msecs = jiffies_to_msecs(jiffies - neigh->bat_v.last_tp_meter_run);

total: 0 errors, 1 warnings, 0 checks, 604 lines checked

ecsv/pu: checkpatch ./net/batman-adv/tp_meter.c
-----------------------------------------------

WARNING: line over 80 characters
#238: FILE: ./net/batman-adv/tp_meter.c:238:
+ cookie = batadv_tp_session_cookie(tp_vars->session, tp_vars->icmp_uid);

WARNING: line over 80 characters
#241: FILE: ./net/batman-adv/tp_meter.c:241:
+ batadv_netlink_tpmeter_notify(bat_priv, tp_vars->other_end,

WARNING: line over 80 characters
#249: FILE: ./net/batman-adv/tp_meter.c:249:
+ BATADV_TP_REASON_COMPLETE, test_time,

WARNING: line over 80 characters
#287: FILE: ./net/batman-adv/tp_meter.c:287:
+ struct batadv_hardif_neigh_node *hardif_neigh)

WARNING: line over 80 characters
#291: FILE: ./net/batman-adv/tp_meter.c:291:
+ batadv_netlink_tpmeter_notify(bat_priv, dst, reason, 0, 0, cookie);

CHECK: Please don't use multiple blank lines
#643: FILE: ./net/batman-adv/tp_meter.c:643:
+
+

ERROR: code indent should use tabs where possible #966: FILE: ./net/batman-adv/tp_meter.c:966:
+ /* init work item that will actually execute the test and schedule it */$

ERROR: code indent should use tabs where possible #967: FILE: ./net/batman-adv/tp_meter.c:967:
+ INIT_WORK(&tp_vars->test_work, batadv_tp_send);$

WARNING: please, no spaces at the start of a line #967: FILE: ./net/batman-adv/tp_meter.c:967:
+ INIT_WORK(&tp_vars->test_work, batadv_tp_send);$

ERROR: code indent should use tabs where possible #968: FILE: ./net/batman-adv/tp_meter.c:968:
+ queue_work(batadv_tp_meter_queue, &tp_vars->test_work);$

WARNING: please, no spaces at the start of a line #968: FILE: ./net/batman-adv/tp_meter.c:968:
+ queue_work(batadv_tp_meter_queue, &tp_vars->test_work);$

WARNING: line over 80 characters
#981: FILE: ./net/batman-adv/tp_meter.c:981:
+ u32 test_length, u32 *cookie, enum batadv_tp_meter_caller caller)

WARNING: line over 80 characters
#999: FILE: ./net/batman-adv/tp_meter.c:999:
+ batadv_tp_caller_init_error(bat_priv, caller, BATADV_TP_REASON_TOO_MANY,

WARNING: Possible unnecessary 'out of memory' message #1006: FILE: ./net/batman-adv/tp_meter.c:1006:
+ if (!tp_vars) {
+ batadv_dbg(BATADV_DBG_TP_METER, bat_priv,

WARNING: line over 80 characters #1009: FILE: ./net/batman-adv/tp_meter.c:1009:
+ batadv_tp_caller_init_error(bat_priv, caller, BATADV_TP_REASON_MEMORY_ERROR,

ERROR: code indent should use tabs where possible #1543: FILE: ./net/batman-adv/tp_meter.c:1543:
+ struct batadv_hard_iface *recv_if,$

WARNING: please, no spaces at the start of a line #1543: FILE: ./net/batman-adv/tp_meter.c:1543:
+ struct batadv_hard_iface *recv_if,$

ERROR: code indent should use tabs where possible #1544: FILE: ./net/batman-adv/tp_meter.c:1544:
+ struct sk_buff *skb)$

WARNING: please, no spaces at the start of a line #1544: FILE: ./net/batman-adv/tp_meter.c:1544:
+ struct sk_buff *skb)$

total: 5 errors, 13 warnings, 1 checks, 1588 lines checked

ecsv/pu: checkpatch ./net/batman-adv/types.h
--------------------------------------------

WARNING: line over 80 characters
#587: FILE: ./net/batman-adv/types.h:587:
+ /** @tp_meter_running: tp meter measurements towards this neighbor in progress */

CHECK: Avoid using bool structure members because of possible alignment issues - see: https://lkml.org/lkml/2017/11/21/384
#588: FILE: ./net/batman-adv/types.h:588:
+ bool tp_meter_running;

WARNING: line over 80 characters
#590: FILE: ./net/batman-adv/types.h:590:
+ /** @last_tp_meter_run: timestamp of last tp meter measurement completion */

ERROR: code indent should use tabs where possible #1367: FILE: ./net/batman-adv/types.h:1367:
+ /** @caller: caller of tp meter session (user space or ELP) */$

ERROR: code indent should use tabs where possible #1370: FILE: ./net/batman-adv/types.h:1370:
+ /** @sending: sending binary semaphore: 1 if sending, 0 is not */$

ERROR: code indent should use tabs where possible #1379: FILE: ./net/batman-adv/types.h:1379:
+ /** @test_work: work item for the test process */$

ERROR: code indent should use tabs where possible #1382: FILE: ./net/batman-adv/types.h:1382:
+ /** @test_length: test length in milliseconds */$

total: 4 errors, 2 warnings, 1 checks, 2455 lines checked

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

    diff --git a/build/net/batman-adv/bat_v_elp.h b/build/net/batman-adv/bat_v_elp.h
    index d87886b..cc6af92 100644
    --- a/build/net/batman-adv/bat_v_elp.h
    +++ b/build/net/batman-adv/bat_v_elp.h
    @@ -19,6 +19,8 @@
     #ifndef _NET_BATMAN_ADV_BAT_V_ELP_H_
     #define _NET_BATMAN_ADV_BAT_V_ELP_H_
     
     #include "main.h" // IWYU pragma: keep
    +
    +#include <linux/types.h>
     
     struct sk_buff;
    diff --git a/build/net/batman-adv/tp_meter.c b/build/net/batman-adv/tp_meter.c
    index 770a95d..442580a 100644
    --- a/build/net/batman-adv/tp_meter.c
    +++ b/build/net/batman-adv/tp_meter.c
    @@ -17,6 +17,8 @@
      */
     
     #include "tp_meter.h"
     #include "main.h" // IWYU pragma: keep
     
     #include <linux/atomic.h>
    @@ -24,7 +26,7 @@
     #include <linux/byteorder/generic.h>
     #include <linux/cache.h>
     #include <linux/compiler.h>
    -#include <linux/err.h>
    +#include <linux/errno.h>
     #include <linux/etherdevice.h>
     #include <linux/gfp.h>
     #include <linux/if_ether.h>
    @@ -35,7 +37,6 @@
     #include <linux/list.h>
    +#include <linux/log2.h>
     #include <linux/netdevice.h>
     #include <linux/param.h>
    -#include <linux/printk.h>
     #include <linux/random.h>
     #include <linux/rculist.h>
     #include <linux/rcupdate.h>
    @@ -51,12 +52,12 @@
     #include <uapi/linux/batadv_packet.h>
     #include <uapi/linux/batman_adv.h>
     
    +#include "bat_v_elp.h"
     #include "hard-interface.h"
     #include "log.h"
     #include "netlink.h"
     #include "originator.h"
     #include "send.h"
    -#include "bat_v_elp.h"
     
     /**
      * BATADV_TP_DEF_TEST_LENGTH - Default test length if not specified by the user

ecsv/pu: kerneldoc ./net/batman-adv/routing.c
---------------------------------------------

./net/batman-adv/routing.c:234: warning: Function parameter or member 'recv_if' not described in 'batadv_recv_my_icmp_packet'

ecsv/pu: kerneldoc ./net/batman-adv/tp_meter.c
----------------------------------------------

./net/batman-adv/tp_meter.c:288: warning: Function parameter or member 'hardif_neigh' not described in 'batadv_tp_caller_init_error' ./net/batman-adv/tp_meter.c:620: warning: Function parameter or member 'bat_priv' not described in 'batadv_tp_send_msg' ./net/batman-adv/tp_meter.c:620: warning: Excess function parameter 'src' description in 'batadv_tp_send_msg' ./net/batman-adv/tp_meter.c:620: warning: Excess function parameter 'orig_node' description in 'batadv_tp_send_msg' ./net/batman-adv/tp_meter.c:889: warning: Function parameter or member 'work' not described in 'batadv_tp_send' ./net/batman-adv/tp_meter.c:889: warning: Excess function parameter 'arg' description in 'batadv_tp_send' ./net/batman-adv/tp_meter.c:982: warning: Function parameter or member 'neigh' not described in 'batadv_tp_start' ./net/batman-adv/tp_meter.c:1194: warning: Function parameter or member 'tp_vars' not described in 'batadv_tp_send_ack' ./net/batman-adv/tp_meter.c:1194: warning: Excess function parameter 'dst' description in 'batadv_tp_send_ack' ./net/batman-adv/tp_meter.c:1389: warning: Function parameter or member 'recv_if' not described in 'batadv_tp_init_recv' ./net/batman-adv/tp_meter.c:1461: warning: Function parameter or member 'recv_if' not described in 'batadv_tp_recv_msg' ./net/batman-adv/tp_meter.c:1545: warning: Function parameter or member 'recv_if' not described in 'batadv_tp_meter_recv' ./net/batman-adv/tp_meter.c:1570: warning: No description found for return value of 'batadv_tp_meter_init'

ecsv/pu: kerneldoc ./net/batman-adv/types.h
-------------------------------------------

./net/batman-adv/types.h:1469: warning: Function parameter or member 'hardif_neigh' not described in 'batadv_tp_vars'

ecsv/pu: kerneldoc include/uapi/linux/batadv_packet.h
-----------------------------------------------------

include/uapi/linux/batadv_packet.h:359: warning: Enum value 'BATADV_TP_MSG_LINK' not described in enum 'batadv_icmp_tp_subtype'

ecsv/pu: smatch linux-4.0 CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=n CONFIG_BATMAN_ADV_DEBUGFS=n CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=y
---------------------------------------------------------------------------

    /home/build_test/build_env/tmp.CtNjyfTqvL/build/net/batman-adv/tp_meter.c:1086 batadv_tp_start() error:  locking inconsistency.  We assume 'spin_lock:&bat_priv->tp_list_lock' is both locked and unlocked at the start.
    /home/build_test/build_env/tmp.CtNjyfTqvL/build/net/batman-adv/tp_meter.c:1086 batadv_tp_start() error:  locking inconsistency.  We assume 'bottom_half:' is both locked and unlocked at the start.

/home/build_test/build_env/tmp.CtNjyfTqvL/build/net/batman-adv/tp_meter.c:1086 batadv_tp_start() warn: inconsistent returns 'spin_lock:&bat_priv->tp_list_lock'.
Locked on: line 1011
Unlocked on: line 1001
line 1086
/home/build_test/build_env/tmp.CtNjyfTqvL/build/net/batman-adv/tp_meter.c:1086 batadv_tp_start() warn: inconsistent returns 'bottom_half:'.
Locked on: line 1011
Unlocked on: line 1001
line 1086

ecsv/pu: smatch linux-4.9 CONFIG_BATMAN_ADV_BLA=n CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y CONFIG_BATMAN_ADV_BATMAN_V=n
---------------------------------------------------------------------------

    /home/build_test/build_env/tmp.CtNjyfTqvL/build/net/batman-adv/tp_meter.c:1086 batadv_tp_start() error:  locking inconsistency.  We assume 'spin_lock:&bat_priv->tp_list_lock' is both locked and unlocked at the start.
    /home/build_test/build_env/tmp.CtNjyfTqvL/build/net/batman-adv/tp_meter.c:1086 batadv_tp_start() error:  locking inconsistency.  We assume 'bottom_half:' is both locked and unlocked at the start.

ecsv/pu: sparse linux-4.9 cfg: BLA=n DAT=y DEBUGFS=y DEBUG=y NC=n MCAST=y BATMAN_V=n
---------------------------------------------------------------------------

/home/build_test/build_env/tmp.CtNjyfTqvL/build/net/batman-adv/tp_meter.c:996:31: warning: context imbalance in 'batadv_tp_start' - unexpected unlock

Statistics
==========

ecsv/pu
-------

Failed tests:                54
Started build tests:         30
Tested Linux versions:       21
Tested configs:              27