Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a283ad50 authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'batadv-next-for-davem-20161027' of git://git.open-mesh.org/linux-merge



Simon Wunderlich says:

====================
This code cleanup patchset includes the following changes (chronological
order):

 - bump version strings, by Simon Wunderlich

 - README updates/clean up, by Sven Eckelmann (4 patches)

 - Code clean up and restructuring by Sven Eckelmann (2 patches)

 - Kerneldoc fix in forw_packet structure, by Linus Luessing

 - Remove unused argument in dbg_arp, by Antonio Quartulli

 - Add support to build batman-adv without wireless, by Linus Luessing

 - Restructure error handling for is_ap_isolated, by Markus Elfring

 - Remove unused initialization in various functions, by Sven Eckelmann

 - Use better names for fragment and gateway list heads, by Sven
   Eckelmann (2 patches)

 - Convert to octal permissions for files, by Sven Eckelmann

 - Avoid precedence issues for some macros, by Sven Eckelmann
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6ce40fc5 4c7da0f6
Loading
Loading
Loading
Loading
+20 −15
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ compatible interfaces. Once found, it will create subfolders in
the /sys directories of each supported interface, e.g.

# ls /sys/class/net/eth0/batman_adv/
# iface_status  mesh_iface
# elp_interval  iface_status  mesh_iface  throughput_override

If an interface does not have the "batman_adv" subfolder it prob-
ably is not supported. Not supported  interfaces  are:  loopback,
@@ -71,17 +71,19 @@ All mesh wide settings can be found in batman's own interface
folder:

# ls /sys/class/net/bat0/mesh/
#aggregated_ogms        distributed_arp_table  gw_sel_class    orig_interval
#ap_isolation           fragmentation          hop_penalty     routing_algo
#bonding                gw_bandwidth           isolation_mark  vlan0
#bridge_loop_avoidance  gw_mode                log_level
# aggregated_ogms        fragmentation  isolation_mark  routing_algo
# ap_isolation           gw_bandwidth   log_level       vlan0
# bonding                gw_mode        multicast_mode
# bridge_loop_avoidance  gw_sel_class   network_coding
# distributed_arp_table  hop_penalty    orig_interval

There is a special folder for debugging information:

# ls /sys/kernel/debug/batman_adv/bat0/
# bla_backbone_table  log                 transtable_global
# bla_claim_table     originators         transtable_local
# gateways            socket
# bla_backbone_table  log          neighbors          transtable_local
# bla_claim_table     mcast_flags  originators
# dat_cache           nc           socket
# gateways            nc_nodes     transtable_global

Some of the files contain all sort of status information  regard-
ing  the  mesh  network.  For  example, you can view the table of
@@ -164,8 +166,11 @@ abled during run time. Following log_levels are defined:
  2 - Enable messages related to route added / changed / deleted
  4 - Enable messages related to translation table operations
  8 - Enable messages related to bridge loop avoidance
16 - Enable messaged related to DAT, ARP snooping and parsing
31 - Enable all messages
 16 - Enable messages related to DAT, ARP snooping and parsing
 32 - Enable messages related to network coding
 64 - Enable messages related to multicast
128 - Enable messages related to throughput meter
255 - Enable all messages

The debug output can be changed at runtime  using  the  file
/sys/class/net/bat0/mesh/log_level. e.g.
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ config BATMAN_ADV

config BATMAN_ADV_BATMAN_V
	bool "B.A.T.M.A.N. V protocol (experimental)"
	depends on BATMAN_ADV && CFG80211=y || (CFG80211=m && BATMAN_ADV=m)
	depends on BATMAN_ADV && !(CFG80211=m && BATMAN_ADV=y)
	default n
	help
	  This option enables the B.A.T.M.A.N. V protocol, the successor
+3 −3
Original line number Diff line number Diff line
@@ -2486,7 +2486,7 @@ batadv_iv_gw_get_best_gw_node(struct batadv_priv *bat_priv)
	struct batadv_orig_node *orig_node;

	rcu_read_lock();
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.list, list) {
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) {
		orig_node = gw_node->orig_node;
		router = batadv_orig_router_get(orig_node, BATADV_IF_DEFAULT);
		if (!router)
@@ -2674,7 +2674,7 @@ static void batadv_iv_gw_print(struct batadv_priv *bat_priv,
		 "      Gateway      (#/255)           Nexthop [outgoingIF]: advertised uplink bandwidth\n");

	rcu_read_lock();
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.list, list) {
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) {
		/* fails if orig_node has no router */
		if (batadv_iv_gw_write_buffer_text(bat_priv, seq, gw_node) < 0)
			continue;
@@ -2774,7 +2774,7 @@ static void batadv_iv_gw_dump(struct sk_buff *msg, struct netlink_callback *cb,
	int idx = 0;

	rcu_read_lock();
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.list, list) {
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) {
		if (idx++ < idx_skip)
			continue;

+4 −4
Original line number Diff line number Diff line
@@ -750,7 +750,7 @@ batadv_v_gw_get_best_gw_node(struct batadv_priv *bat_priv)
	u32 max_bw = 0, bw;

	rcu_read_lock();
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.list, list) {
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) {
		if (!kref_get_unless_zero(&gw_node->refcount))
			continue;

@@ -787,7 +787,7 @@ static bool batadv_v_gw_is_eligible(struct batadv_priv *bat_priv,
				    struct batadv_orig_node *curr_gw_orig,
				    struct batadv_orig_node *orig_node)
{
	struct batadv_gw_node *curr_gw = NULL, *orig_gw = NULL;
	struct batadv_gw_node *curr_gw, *orig_gw = NULL;
	u32 gw_throughput, orig_throughput, threshold;
	bool ret = false;

@@ -889,7 +889,7 @@ static void batadv_v_gw_print(struct batadv_priv *bat_priv,
		 "      Gateway        ( throughput)           Nexthop [outgoingIF]: advertised uplink bandwidth\n");

	rcu_read_lock();
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.list, list) {
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) {
		/* fails if orig_node has no router */
		if (batadv_v_gw_write_buffer_text(bat_priv, seq, gw_node) < 0)
			continue;
@@ -1009,7 +1009,7 @@ static void batadv_v_gw_dump(struct sk_buff *msg, struct netlink_callback *cb,
	int idx = 0;

	rcu_read_lock();
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.list, list) {
	hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) {
		if (idx++ < idx_skip)
			continue;

+2 −2
Original line number Diff line number Diff line
@@ -401,7 +401,7 @@ static int batadv_v_ogm_metric_update(struct batadv_priv *bat_priv,
				      struct batadv_hard_iface *if_incoming,
				      struct batadv_hard_iface *if_outgoing)
{
	struct batadv_orig_ifinfo *orig_ifinfo = NULL;
	struct batadv_orig_ifinfo *orig_ifinfo;
	struct batadv_neigh_ifinfo *neigh_ifinfo = NULL;
	bool protection_started = false;
	int ret = -EINVAL;
@@ -486,7 +486,7 @@ static bool batadv_v_ogm_route_update(struct batadv_priv *bat_priv,
				      struct batadv_hard_iface *if_outgoing)
{
	struct batadv_neigh_node *router = NULL;
	struct batadv_orig_node *orig_neigh_node = NULL;
	struct batadv_orig_node *orig_neigh_node;
	struct batadv_neigh_node *orig_neigh_router = NULL;
	struct batadv_neigh_ifinfo *router_ifinfo = NULL, *neigh_ifinfo = NULL;
	u32 router_throughput, neigh_throughput;
Loading