The following commit has been merged in the next branch:
commit ab16078808bf32b473d65055d7788793307f8cc1
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Mon Nov 14 10:21:49 2011 +0100
batctl: Start new development cycle
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/main.h b/main.h
index 8cc91f1..e5a3e01 100644
--- a/main.h
+++ b/main.h
@@ -20,7 +20,7 @@
*/
#ifndef SOURCE_VERSION
-#define SOURCE_VERSION "2011.4.0"
+#define SOURCE_VERSION "2012.0.0"
#endif
#define SOCKET_PATH_FMT "%s/batman_adv/%s/socket"
--
batctl
The following commit has been merged in the next branch:
commit b42bb08d07964db71fc30217403bd3a49ce1ba76
Merge: c103efd9af4ca23f75d77ff10fb7af5a95ece3c3 dcac0a5750eb3c69eec84e0741df481451909480
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Mon Nov 14 10:03:00 2011 +0100
Merge commit 'v2011.4.0'
Conflicts:
README
diff --combined README
index 5ba56b5,c50cc0a..b4fdc8d
--- a/README
+++ b/README
@@@ -1,4 -1,4 +1,4 @@@
- [state: 30-09-2011]
+ [state: 13-11-2011]
BATMAN-ADV
----------
@@@ -18,7 -18,7 +18,7 @@@ Batman advanced was implemented as a Li
duce the overhead to a minimum. It does not depend on any (other)
network driver, and can be used on wifi as well as ethernet lan,
vpn, etc ... (anything with ethernet-style layer 2). It compiles
- against and should work with Linux 2.6.29 - 3.1. Supporting
+ against and should work with Linux 2.6.29 - 3.2. Supporting
older versions is not planned, but it's probably easy to backport
it. If you work on a backport, feel free to contact us. :-)
@@@ -206,7 -206,7 +206,7 @@@ option "B.A.T.M.A.N. debugging". When c
kernel tree it is necessary to edit the file Makefile.kbuild and
uncomment the line
-#EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG
+#ccflags-y += -DCONFIG_BATMAN_ADV_DEBUG
Those additional debug messages can be accessed using a special
file in debugfs
@@@ -218,15 -218,16 +218,16 @@@ abled during run time. Following log_l
0 - All debug output disabled
1 - Enable messages related to routing / flooding / broadcasting
- 2 - Enable route or tt entry added / changed / deleted
- 3 - Enable all messages
+ 2 - Enable messages related to route added / changed / deleted
+ 4 - Enable messages related to translation table operations
+ 7 - Enable all messages
The debug output can be changed at runtime using the file
/sys/class/net/bat0/mesh/log_level. e.g.
# echo 2 > /sys/class/net/bat0/mesh/log_level
- will enable debug messages for when routes or TTs change.
+ will enable debug messages for when routes change.
BATCTL
--
batman-adv
The following commit has been merged in the next branch:
commit f37d6d6ebef43b29c2a27ad44b75c260126edfef
Author: Marek Lindner <lindner_marek(a)yahoo.de>
Date: Sun Oct 30 22:10:08 2011 +0100
batman-adv: report compat_version in version field in case of version mismatch
Reported-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Marek Lindner <lindner_marek(a)yahoo.de>
diff --git a/icmp_socket.c b/icmp_socket.c
index ac3520e..defd692 100644
--- a/icmp_socket.c
+++ b/icmp_socket.c
@@ -217,7 +217,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
if (icmp_packet->version != COMPAT_VERSION) {
icmp_packet->msg_type = PARAMETER_PROBLEM;
- icmp_packet->ttl = COMPAT_VERSION;
+ icmp_packet->version = COMPAT_VERSION;
bat_socket_add_packet(socket_client, icmp_packet, packet_len);
goto free_skb;
}
--
batman-adv
The following commit has been merged in the next branch:
commit c103efd9af4ca23f75d77ff10fb7af5a95ece3c3
Author: Simon Wunderlich <simon.wunderlich(a)s2003.tu-chemnitz.de>
Date: Mon Nov 7 13:57:48 2011 +0100
batman-adv: use unregister_netdevice() when softif_create fails
When entering softif_create(), the rtnl lock has already been acquired
by store_mesh_iface().
(store_mesh_iface() -> hardif_enable_interface() -> softif_create)
In case of an error, we should therefore call unregister_netdevice()
instead of unregister_netdev().
unregister_netdev() tries to acquire the rtnl lock itself and deadlocks
in this situation. unregister_netdevice() assumes that the rtnl lock
is already been held.
Signed-off-by: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
diff --git a/soft-interface.c b/soft-interface.c
index 45297c8..987c75a 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -874,7 +874,7 @@ unreg_debugfs:
unreg_sysfs:
sysfs_del_meshif(soft_iface);
unreg_soft_iface:
- unregister_netdev(soft_iface);
+ unregister_netdevice(soft_iface);
return NULL;
free_soft_iface:
--
batman-adv
The following commit has been merged in the next branch:
commit 3e0b5d118b789865596abb6e03c4c24297b9a804
Author: Antonio Quartulli <ordex(a)autistici.org>
Date: Mon Nov 7 16:47:01 2011 +0100
batman-adv: generalise tt_local_reset_flags()
The tt_local_reset_flags() is actually used for one use case only. It is not
generalised enough to be used indifferent situations. This patch make it general
enough in order to let other code use it whenever a flag set is requested over
the whole hash table (passed as parameter). The function is now called
tt_set_flags()
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
diff --git a/translation-table.c b/translation-table.c
index 76134bc..f6bbd64 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -1695,19 +1695,19 @@ void tt_free(struct bat_priv *bat_priv)
kfree(bat_priv->tt_buff);
}
-/* This function will reset the specified flags from all the entries in
- * the given hash table and will increment num_local_tt for each involved
- * entry */
-static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
+/* This function will enable or disable the specified flags for all the entries
+ * in the given hash table and returns the number of modified entries */
+static uint16_t tt_set_flags(struct hashtable_t *hash, uint16_t flags,
+ bool enable)
{
uint32_t i;
- struct hashtable_t *hash = bat_priv->tt_local_hash;
+ uint16_t changed_num = 0;
struct hlist_head *head;
struct hlist_node *node;
struct tt_common_entry *tt_common_entry;
if (!hash)
- return;
+ goto out;
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];
@@ -1715,14 +1715,21 @@ static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
rcu_read_lock();
hlist_for_each_entry_rcu(tt_common_entry, node,
head, hash_entry) {
- if (!(tt_common_entry->flags & flags))
- continue;
- tt_common_entry->flags &= ~flags;
- atomic_inc(&bat_priv->num_local_tt);
+ if (enable) {
+ if ((tt_common_entry->flags & flags) == flags)
+ continue;
+ tt_common_entry->flags |= flags;
+ } else {
+ if (!(tt_common_entry->flags & flags))
+ continue;
+ tt_common_entry->flags &= ~flags;
+ }
+ changed_num++;
}
rcu_read_unlock();
}
-
+out:
+ return changed_num;
}
/* Purge out all the tt local entries marked with TT_CLIENT_PENDING */
@@ -1766,7 +1773,11 @@ static void tt_local_purge_pending_clients(struct bat_priv *bat_priv)
void tt_commit_changes(struct bat_priv *bat_priv)
{
- tt_local_reset_flags(bat_priv, TT_CLIENT_NEW);
+ uint16_t changed_num = tt_set_flags(bat_priv->tt_local_hash,
+ TT_CLIENT_NEW, false);
+ /* all the reset entries have now to be effectively counted as local
+ * entries */
+ atomic_add(changed_num, &bat_priv->num_local_tt);
tt_local_purge_pending_clients(bat_priv);
/* Increment the TTVN only once per OGM interval */
--
batman-adv