Sven Eckelmann | 25 May 08:55
Favicon

[PATCH] batman-adv: Use batctl indentation of bat_packettype

The style of the indentation was changed in
206af118414355e867e725ea83bc3a2989db5a40

Signed-off-by: Sven Eckelmann <sven@...>
---
 packet.h |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/packet.h b/packet.h
index 205879e..c90219c 100644
--- a/packet.h
+++ b/packet.h
@@ -23,14 +23,14 @@
 #define ETH_P_BATMAN  0x4305	/* unofficial/not registered Ethertype */

 enum bat_packettype {
-	BAT_IV_OGM       = 0x01,
-	BAT_ICMP         = 0x02,
-	BAT_UNICAST      = 0x03,
-	BAT_BCAST        = 0x04,
-	BAT_VIS          = 0x05,
+	BAT_IV_OGM	 = 0x01,
+	BAT_ICMP	 = 0x02,
+	BAT_UNICAST	 = 0x03,
+	BAT_BCAST	 = 0x04,
+	BAT_VIS		 = 0x05,
 	BAT_UNICAST_FRAG = 0x06,
-	BAT_TT_QUERY     = 0x07,
-	BAT_ROAM_ADV     = 0x08
+	BAT_TT_QUERY	 = 0x07,
(Continue reading)

Antonio Quartulli | 25 May 00:00
Gravatar

[PATCHv2] batman-adv: beautify tt_global_add() argument list

Instead of adding a new bool argument each time it is needed, it is better (and
simpler) to pass an 8bit flag argument which contains all the needed flags

Signed-off-by: Antonio Quartulli <ordex@...>
---

changes in v2:
- rebased on top of the last patches for code restyling

 routing.c           |    4 ++--
 translation-table.c |   24 +++++++++---------------
 translation-table.h |    4 ++--
 3 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/routing.c b/routing.c
index c3160be..1260253 100644
--- a/routing.c
+++ b/routing.c
@@ -697,8 +697,8 @@ int batadv_recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if)
 		   roam_adv_packet->src, roam_adv_packet->client);

 	batadv_tt_global_add(bat_priv, orig_node, roam_adv_packet->client,
-			     atomic_read(&orig_node->last_ttvn) + 1, true,
-			     false);
+			     TT_CLIENT_ROAM,
+			     atomic_read(&orig_node->last_ttvn) + 1);

 	/* Roaming phase starts: I have new information but the ttvn has not
 	 * been incremented yet. This flag will make me check all the incoming
diff --git a/translation-table.c b/translation-table.c
(Continue reading)

Antonio Quartulli | 25 May 00:00
Gravatar

[PATCHv3] batman-adv: clear ADD+DEL (and viceversa) events in the same orig-interval

During an OGM-interval (time between two different OGM sendings) the same client
could roam away and then roam back to us. In this case the node would add two
events to the events list (that is going to be sent appended to the next OGM). A
DEL one and an ADD one. Obviously they will only increase the overhead (either in
the air and on the receiver side) and eventually trigger wrong states/events
without producing any real effect.

For this reason we can safely delete any ADD event with its related DEL one.

Signed-off-by: Antonio Quartulli <ordex@...>
---

changes in v3:
- rebased on top of the last patches for code restyling

 translation-table.c |   40 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 37 insertions(+), 3 deletions(-)

diff --git a/translation-table.c b/translation-table.c
index cb1d3a8..2c8266a 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -156,7 +156,9 @@ batadv_tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry)
 static void batadv_tt_local_event(struct bat_priv *bat_priv,
 				  const uint8_t *addr, uint8_t flags)
 {
-	struct tt_change_node *tt_change_node;
+	struct tt_change_node *tt_change_node, *entry, *safe;
+	bool event_removed = false;
+	bool del_op_requested, del_op_entry;
(Continue reading)

Sven Eckelmann | 19 May 09:37
Favicon

[PATCH] batman-adv: Avoid gcc inline problems with vararg functions

gcc doesn't support the inlining of functions using vararg. Sparse fails to
build the source when having such functions marked using the keyword "inline".

This problem was introduced in 3b896e321c49e3cbbfd540f537c007db883c3900

Signed-off-by: Sven Eckelmann <sven@...>
---
 main.h |   20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/main.h b/main.h
index 977de45..4721c86 100644
--- a/main.h
+++ b/main.h
@@ -196,6 +196,17 @@ static inline void batadv_vdbg(int type, struct bat_priv *bat_priv,
 		batadv_debug_log(bat_priv, fmt, args);
 }

+__printf(3, 4)
+static inline void batadv_dbg(int type, struct bat_priv *bat_priv,
+			       const char *fmt, ...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+	batadv_vdbg(type, bat_priv, fmt, args);
+	va_end(args);
+}
+
 #else /* !CONFIG_BATMAN_ADV_DEBUG */
(Continue reading)

Sven Eckelmann | 17 May 17:18
Favicon

[PATCH] batman-adv: Revert Distributed ARP Table

David S. Miller did not like the idea of batman-adv modifying and reading the
ARP table and refused to pull this feature. It has to be rewritten after an
acceptable solution was found.

This reverts following commits:
 * batman-adv: add UNICAST_4ADDR packet type
 * batman-adv: add a new log level for DAT debugging
 * batman-adv: Distributed ARP Table - create DHT helper functions
 * batman-adv: Distributed ARP Table - add ARP parsing functions
 * batman-adv: Distributed ARP Table - add snooping functions for ARP messages
 * batman-adv: Distributed ARP Table - increase default soft_iface ARP table timeout
 * batman-adv: Distributed ARP Table - add compile option

Signed-off-by: Sven Eckelmann <sven@...>
---
This patch is for next... I repeat: this patch is for the branch next

 Makefile                |    2 -
 Makefile.kbuild         |    1 -
 README                  |    3 +-
 README.external         |    1 -
 bat_sysfs.c             |    2 +-
 distributed-arp-table.c |  605 -----------------------------------------------
 distributed-arp-table.h |  140 -----------
 gen-compat-autoconf.sh  |    1 -
 hard-interface.c        |    3 -
 main.c                  |    2 -
 main.h                  |   15 +-
 originator.c            |    2 -
 packet.h                |   30 +--
(Continue reading)

Sven Eckelmann | 16 May 19:38
Favicon

Remaining cleanup/prefixing patches

Hi,

it seems that just too many changes were done and now all were committed in 
the order or the version that I send to the mailinglist. Therefore, I would 
ask to ignore all my remaining patches and wait for the the complete list of 
patches not yet committed. I will send them to this mailing list in some 
hours.

Thanks,
	Sven
Martin Hundebøll | 16 May 00:06

[PATCH] batman-adv: Correctly check return value from debugfs_create_dir

The setup code in batadv_socket_setup() and debug_log_setup() wrongly
assumes that debugfs_create_file() returns !0 on error. Since it
actually returns a pointer on success[1], the following check should
be inverted.

Also, use the return value from the two setup functions in
batadv_debugfs_add_meshif().

[1] http://www.fsl.cs.sunysb.edu/kernel-api/re464.html

Signed-off-by: Martin Hundebøll <martin@...>
---
 bat_debugfs.c |   11 +++++++----
 icmp_socket.c |    4 ++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/bat_debugfs.c b/bat_debugfs.c
index cd636db..bd9325d 100644
--- a/bat_debugfs.c
+++ b/bat_debugfs.c
@@ -193,13 +193,13 @@ static int debug_log_setup(struct bat_priv *bat_priv)

 	d = debugfs_create_file("log", S_IFREG | S_IRUSR,
 				bat_priv->debug_dir, bat_priv, &log_fops);
-	if (d)
+	if (!d)
 		goto err;

 	return 0;

(Continue reading)

Jochen Jägers | 14 May 17:53
Picon

Some problems with batman-adv

Hello,

i try to set up a ad-hoc-mesh network with batman-adv.

There are three test-nodes with following configuration:

Nvidia Tegra 2 Dual Core ARM-Cortex A9 Processor with Linux 2.6.36.2
USB-Wifi Dongle with Ralink 5370 Chipset
Ralink rt5370sta driver kernel module
batman-adv 2012.1.0 (also tried with 2012.0.0)

I've set up the ad-hoc network with WPA-Encryption. This is working
fine. I can access all nodes if i configure the ra0 (ralink wifi)
interface with static ip addresses. I've done this for testing purpose
only. Normally only the bat0 interface has an ip address.

After wireless connection is established I activate the batman-adv
interface.

Example from first node:
modprobe batman-adv
batctl if add ra0                                                   
ifconfig bat0 up                                                      
ifconfig bat0 192.168.50.1 netmask 255.255.255.0
ifconfig bat0 mtu 1472

After booting up all nodes "batctl o" returns:
# batctl o
[B.A.T.M.A.N. adv 2012.1.0, MainIF/MAC: ra0/80:1f:02:38:7a:bf (bat0)]
  Originator      last-seen (#/255)           Nexthop [outgoingIF]:
(Continue reading)

Antonio Quartulli | 14 May 09:44
Gravatar

[PATCH] batman-adv: beautify tt_global_add() argument list

Instead of adding a new bool argument each time it is needed, it is better (and
simpler) to pass an 8bit flag argument which contains all the needed flags

Signed-off-by: Antonio Quartulli <ordex@...>
---
 routing.c           |    2 +-
 translation-table.c |   19 +++++++------------
 translation-table.h |    3 +--
 3 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/routing.c b/routing.c
index e4d13dc..6c50b1d 100644
--- a/routing.c
+++ b/routing.c
@@ -686,7 +686,7 @@ int recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if)
 		roam_adv_packet->src, roam_adv_packet->client);

 	tt_global_add(bat_priv, orig_node, roam_adv_packet->client,
-		      atomic_read(&orig_node->last_ttvn) + 1, true, false);
+		      TT_CLIENT_ROAM, atomic_read(&orig_node->last_ttvn) + 1);

 	/* Roaming phase starts: I have new information but the ttvn has not
 	 * been incremented yet. This flag will make me check all the incoming
diff --git a/translation-table.c b/translation-table.c
index c134a29..e5b6f25 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -647,24 +647,22 @@ static void tt_global_add_orig_entry(struct tt_global_entry *tt_global_entry,

 /* caller must hold orig_node refcount */
(Continue reading)

Antonio Quartulli | 14 May 09:32
Gravatar

[PATCH] batman-adv: clear ADD+DEL (and viceversa) events in the same orig-interval

During an OGM-interval (time between two different OGM sendings) the same client
could roam away and then roam back to us. In this case the node would add two
events to the events list (that is going to be sent appended to the next OGM). A
DEL one and an ADD one. Obviously they will only increase the overhead (either in
the air and on the receiver side) and eventually trigger wrong states/events
without producing any real effect.

For this reason we can safely delete any ADD event with its related DEL one.

Signed-off-by: Antonio Quartulli <ordex@...>
---
 translation-table.c |   41 ++++++++++++++++++++++++++++++++++++++---
 1 file changed, 38 insertions(+), 3 deletions(-)

diff --git a/translation-table.c b/translation-table.c
index 2ecf3a2..c134a29 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -154,7 +154,9 @@ static void tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry)
 static void tt_local_event(struct bat_priv *bat_priv, const uint8_t *addr,
 			   uint8_t flags)
 {
-	struct tt_change_node *tt_change_node;
+	struct tt_change_node *tt_change_node, *entry, *safe;
+	bool event_removed = false;
+	bool del_op_requested, del_op_entry;

 	tt_change_node = kmalloc(sizeof(*tt_change_node), GFP_ATOMIC);

@@ -164,13 +166,46 @@ static void tt_local_event(struct bat_priv *bat_priv, const uint8_t *addr,
(Continue reading)

Antonio Quartulli | 14 May 09:17
Gravatar

pull request: batman-adv 2012-05-14

Hello David,

here is our last set of changes intended for net-next/linux-3.5.
In this patchset there are:

1) several minor cleanups and fixes
2) an optimisation that avoid to linearise the whole packet when not needed
3) an optimisation for client traffic rerouting after a roaming event.

Patches that modify the whole naming schema will be sent later for merging
with linux-3.6.

Thank you,
	Antonio

The following changes since commit f96a8a0b78548c0ec06b0b4b438db6ee895d67e9:

  igb: Add Support for new i210/i211 devices. (2012-05-12 13:17:13 -0700)

are available in the git repository at:

  git://git.open-mesh.org/linux-merge.git tags/batman-adv-for-davem

for you to fetch changes up to 521251f2f5fa16747cc21e71580e404af855d140:

  batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists (2012-05-14 09:05:08 +0200)

----------------------------------------------------------------
Included changes:

(Continue reading)


Gmane