[B.A.T.M.A.N.] [PATCH] batman-adv: Fix line over 80 characters

2011-05-08 Thread Sven Eckelmann
160dd1399c4d589c0c5678a759e8ac7a7eefe64e introduced a line over 80 and can not be accepted according to the Linux Coding Style. Signed-off-by: Sven Eckelmann s...@narfation.org --- translation-table.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/translation-table.c

[B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Remove multiline comments from line ending

2011-05-08 Thread Sven Eckelmann
It is slightly irritating that comments after a long line span over multiple lines without any code. It is easier to put them before the actual code and reduce the number of lines which the eye has to read. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch makes batman-adv nearly

[B.A.T.M.A.N.] [PATCH 2/2] batctl: Remove multiline comments from line ending

2011-05-08 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- packet.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/packet.h b/packet.h index c225c3a..eda9965 100644 --- a/packet.h +++ b/packet.h @@ -128,8 +128,7 @@ struct vis_packet { uint8_t entries;/*

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix line over 80 characters

2011-05-08 Thread Marek Lindner
On Sunday 08 May 2011 09:39:55 Sven Eckelmann wrote: 160dd1399c4d589c0c5678a759e8ac7a7eefe64e introduced a line over 80 and can not be accepted according to the Linux Coding Style. Applied in revision 6ffb0a7. Thanks, Marek

Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't include bat_sysfs.h in compat.h

2011-05-08 Thread Marek Lindner
On Saturday 07 May 2011 21:48:03 Sven Eckelmann wrote: bat_sysfs.h is included in compat.h to provide bat_attribute which is used in bat_wrapper_show and bat_wrapper_store. This could create a include loop which prevents that functions or datastructures defined elsewhere cannot be found in

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Remove unused variable r in bat_printk

2011-05-08 Thread Marek Lindner
On Saturday 07 May 2011 21:48:04 Sven Eckelmann wrote: Signed-off-by: Sven Eckelmann s...@narfation.org Applied in revision 7b1ce30. Thanks, Marek

Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Remove multiline comments from line ending

2011-05-08 Thread Marek Lindner
On Sunday 08 May 2011 12:45:45 Sven Eckelmann wrote: It is slightly irritating that comments after a long line span over multiple lines without any code. It is easier to put them before the actual code and reduce the number of lines which the eye has to read. Applied in revision 4d910ca.

Re: [B.A.T.M.A.N.] [PATCH 2/2] batctl: Remove multiline comments from line ending

2011-05-08 Thread Marek Lindner
On Sunday 08 May 2011 12:45:46 Sven Eckelmann wrote: Signed-off-by: Sven Eckelmann s...@narfation.org Applied in revision 701e35a. Thanks, Marek

Re: [B.A.T.M.A.N.] Routing improvement taking into account links bit-rate

2011-05-08 Thread Andrew Lunn
Hi Daniele It is not a real Link State routing, the document maybe is not completely clear. Every node before the OGM rebroadcast, attach its current best path toward the originator node. I could do this without adding an hop list, but simply substituting the TQ with PCE. How you tried

Re: [B.A.T.M.A.N.] [PATCHv3] batman-adv: remove duplicate code from function is_bidirectional_neigh()

2011-05-08 Thread Marek Lindner
On Saturday 07 May 2011 22:45:19 Sven Eckelmann wrote: From: Daniele Furlan daniele.fur...@gmail.com In function is_bidirectional_neigh the code that find out the one hop neighbor is duplicated. Applied in revision fea56a5. Thanks, Marek

Re: [B.A.T.M.A.N.] Routing improvement taking into account links bit-rate

2011-05-08 Thread Marek Lindner
Hi, * The concept of attaching all hops and their information to the OGM brings us dangerously close to the problems other routing protocols suffer from (especially Link State): The more a node is away from the source the more its information are outdated. Imagine a 10 hop path - how

Re: [B.A.T.M.A.N.] Routing improvement taking into account links bit-rate

2011-05-08 Thread Daniele Furlan
2011/5/8 Andrew Lunn and...@lunn.ch: Hi Daniele It is not a real Link State routing, the document maybe is not completely clear.  Every node before the OGM rebroadcast, attach its current best path toward the originator node.  I could do this without adding an hop list, but simply

Re: [B.A.T.M.A.N.] Routing improvement taking into account links bit-rate

2011-05-08 Thread Daniele Furlan
2011/5/8 Marek Lindner lindner_ma...@yahoo.de: Hi, * The concept of attaching all hops and their information to the OGM brings us dangerously close to the problems other routing protocols suffer from (especially Link State): The more a node is away from the source the more its

[B.A.T.M.A.N.] pull request: batman-adv 2011-05-08

2011-05-08 Thread Sven Eckelmann
Hi, I would like to propose following patches for net-next-2.6/2.6.40. They include minor cleanups of comments, a big rename patch s/hna/tt/, but also a remove some duplicated code. The spinlock which protected the list of possible interfaces for batman-adv was completely replaced by rtnl_lock

[B.A.T.M.A.N.] [PATCH 2/8] batman-adv: multi vlan support for bridge loop detection

2011-05-08 Thread Sven Eckelmann
From: Marek Lindner lindner_ma...@yahoo.de The bridge loop detection for batman-adv allows the bat0 interface to be bridged into an ethernet segment which other batman-adv nodes are connected to. In order to also allow multiple VLANs on top of the bat0 interface to be bridged into the ethernet

[B.A.T.M.A.N.] [PATCH 3/8] batman-adv: Remove unnecessary hardif_list_lock

2011-05-08 Thread Sven Eckelmann
hardif_list_lock is unneccessary because we already ensure that no multiple admin operations can take place through rtnl_lock. hardif_list_lock only adds additional overhead and complexity. Critical functions now check whether they are called with rtnl_lock using ASSERT_RTNL. It indirectly fixes

[B.A.T.M.A.N.] [PATCH 4/8] batman-adv: Avoid deadlock between rtnl_lock and s_active

2011-05-08 Thread Sven Eckelmann
The hard_if_event is called by the notifier with rtnl_lock and tries to remove sysfs entries when a NETDEV_UNREGISTER event is received. This will automatically take the s_active lock. The s_active lock is also used when a new interface is added to a meshif through sysfs. In that situation we

[B.A.T.M.A.N.] [PATCH 5/8] batman-adv: Fix refcount imbalance in find_router

2011-05-08 Thread Sven Eckelmann
From: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/routing.c | 14 +- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/net/batman-adv/routing.c

[B.A.T.M.A.N.] [PATCH 8/8] batman-adv: remove duplicate code from function is_bidirectional_neigh()

2011-05-08 Thread Sven Eckelmann
From: Daniele Furlan daniele.fur...@gmail.com In function is_bidirectional_neigh the code that find out the one hop neighbor is duplicated. Signed-off-by: Daniele Furlan daniele.fur...@gmail.com Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/routing.c | 74

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: move neigh_node-if_incoming-if_status check in find_router()

2011-05-08 Thread Antonio Quartulli
On gio, mag 05, 2011 at 02:20:10 +0200, Marek Lindner wrote: On Thursday 05 May 2011 10:21:42 Antonio Quartulli wrote: return_router: + if (router router-if_incoming-if_status != IF_ACTIVE) + router = NULL; + rcu_read_unlock(); return router;

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: add wrapper function to throw uevent in userspace

2011-05-08 Thread Antonio Quartulli
On gio, mag 05, 2011 at 03:34:24 +0200, Andrew Lunn wrote: + uevent_env[0] = kmalloc(strlen(BATTYPE=) + + strlen(uev_type_str[type]) + 1, + GFP_ATOMIC); + if (!uevent_env[0]) + goto out; + + sprintf(uevent_env[0],

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: add wrapper function to throw uevent in userspace

2011-05-08 Thread Andrew Lunn
I definitely agree. I thin that using a define like #define UEV_TYPE_VAR BATTYPE= would be more elegant. In this case I can avoid to use snprintf. Do you agree on this? Yes, that is safer. + if (ret) + bat_dbg(DBG_BATMAN, bat_priv, Impossible to send +

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: add wrapper function to throw uevent in userspace

2011-05-08 Thread Antonio Quartulli
On dom, mag 08, 2011 at 10:11:48 +0200, Andrew Lunn wrote: I definitely agree. I thin that using a define like #define UEV_TYPE_VAR BATTYPE= would be more elegant. In this case I can avoid to use snprintf. Do you agree on this? Yes, that is safer. + if (ret) +

Re: [B.A.T.M.A.N.] [PATCH 3/3] batman-adv: improved gateway tq-based selection

2011-05-08 Thread Antonio Quartulli
On gio, mag 05, 2011 at 03:46:49 +0200, Andrew Lunn wrote: On Thu, May 05, 2011 at 09:13:09AM +0200, Antonio Quartulli wrote: + /* If old_gw != NULL then this packet is unicast. +* So, at this point it can only be a renewal packet (because it is the +* only dhcp client message

Re: [B.A.T.M.A.N.] pull request: batman-adv 2011-05-08

2011-05-08 Thread David Miller
From: Sven Eckelmann s...@narfation.org Date: Sun, 8 May 2011 17:24:36 +0200 Hi, I would like to propose following patches for net-next-2.6/2.6.40. They include minor cleanups of comments, a big rename patch s/hna/tt/, but also a remove some duplicated code. The spinlock which protected