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

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

Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:
- minimal fixes to the packet layout to avoid the __packed attribute when not
  needed
- new packet type called UNICAST_4ADDR: in this packet it is possible to find
  both source and destination node (in the classic UNICAST header only the
  destination field exists).
- a new feature: Distributed ARP Table (D.A.T.). It aims to reduce ARP lookups
  latency by means of a simil-DHT approach.
parents b20b6d97 9affec6b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -203,7 +203,8 @@ 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
15 - enable all messages
16 - Enable messaged related to DAT, ARP snooping and parsing
31 - Enable all messages

The debug output can be changed at runtime  using  the  file
/sys/class/net/bat0/mesh/log_level. e.g.
+10 −0
Original line number Diff line number Diff line
@@ -25,6 +25,16 @@ config BATMAN_ADV_BLA
	  more than one mesh node in the same LAN, you can safely remove
	  this feature and save some space.

config BATMAN_ADV_DAT
	bool "Distributed ARP Table"
	depends on BATMAN_ADV && INET
	default n
	help
	  This option enables DAT (Distributed ARP Table), a DHT based
	  mechanism that increases ARP reliability on sparse wireless
	  mesh networks. If you think that your network does not need
	  this option you can safely remove it and save some space.

config BATMAN_ADV_DEBUG
	bool "B.A.T.M.A.N. debugging"
	depends on BATMAN_ADV
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ batman-adv-y += bat_iv_ogm.o
batman-adv-y += bitarray.o
batman-adv-$(CONFIG_BATMAN_ADV_BLA) += bridge_loop_avoidance.o
batman-adv-y += debugfs.o
batman-adv-$(CONFIG_BATMAN_ADV_DAT) += distributed-arp-table.o
batman-adv-y += gateway_client.o
batman-adv-y += gateway_common.o
batman-adv-y += hard-interface.o
+5 −3
Original line number Diff line number Diff line
@@ -411,9 +411,11 @@ static void batadv_iv_ogm_aggregate_new(const unsigned char *packet_buff,

	if ((atomic_read(&bat_priv->aggregated_ogms)) &&
	    (packet_len < BATADV_MAX_AGGREGATION_BYTES))
		skb_size = BATADV_MAX_AGGREGATION_BYTES + ETH_HLEN;
		skb_size = BATADV_MAX_AGGREGATION_BYTES;
	else
		skb_size = packet_len + ETH_HLEN;
		skb_size = packet_len;

	skb_size += ETH_HLEN + NET_IP_ALIGN;

	forw_packet_aggr->skb = dev_alloc_skb(skb_size);
	if (!forw_packet_aggr->skb) {
@@ -422,7 +424,7 @@ static void batadv_iv_ogm_aggregate_new(const unsigned char *packet_buff,
		kfree(forw_packet_aggr);
		goto out;
	}
	skb_reserve(forw_packet_aggr->skb, ETH_HLEN);
	skb_reserve(forw_packet_aggr->skb, ETH_HLEN + NET_IP_ALIGN);

	INIT_HLIST_NODE(&forw_packet_aggr->list);

+20 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include "vis.h"
#include "icmp_socket.h"
#include "bridge_loop_avoidance.h"
#include "distributed-arp-table.h"

static struct dentry *batadv_debugfs;

@@ -280,6 +281,19 @@ static int batadv_bla_backbone_table_open(struct inode *inode,

#endif

#ifdef CONFIG_BATMAN_ADV_DAT
/**
 * batadv_dat_cache_open - Prepare file handler for reads from dat_chache
 * @inode: inode which was opened
 * @file: file handle to be initialized
 */
static int batadv_dat_cache_open(struct inode *inode, struct file *file)
{
	struct net_device *net_dev = (struct net_device *)inode->i_private;
	return single_open(file, batadv_dat_cache_seq_print_text, net_dev);
}
#endif

static int batadv_transtable_local_open(struct inode *inode, struct file *file)
{
	struct net_device *net_dev = (struct net_device *)inode->i_private;
@@ -319,6 +333,9 @@ static BATADV_DEBUGINFO(bla_claim_table, S_IRUGO, batadv_bla_claim_table_open);
static BATADV_DEBUGINFO(bla_backbone_table, S_IRUGO,
			batadv_bla_backbone_table_open);
#endif
#ifdef CONFIG_BATMAN_ADV_DAT
static BATADV_DEBUGINFO(dat_cache, S_IRUGO, batadv_dat_cache_open);
#endif
static BATADV_DEBUGINFO(transtable_local, S_IRUGO,
			batadv_transtable_local_open);
static BATADV_DEBUGINFO(vis_data, S_IRUGO, batadv_vis_data_open);
@@ -330,6 +347,9 @@ static struct batadv_debuginfo *batadv_mesh_debuginfos[] = {
#ifdef CONFIG_BATMAN_ADV_BLA
	&batadv_debuginfo_bla_claim_table,
	&batadv_debuginfo_bla_backbone_table,
#endif
#ifdef CONFIG_BATMAN_ADV_DAT
	&batadv_debuginfo_dat_cache,
#endif
	&batadv_debuginfo_transtable_local,
	&batadv_debuginfo_vis_data,
Loading