> Look, Catherine, please try being a little bit more autonomous.
>
> Take the batman-adv distribution, look at the list of main authors, and
> drop them a friendly note. I'm sure they'll be glad to chat with you.
I already sent them the mail using Cc. But I am still missing the company name that you seem to know.
> Please do not contact me any further on this subject. And please do not
> copy the mailing lists with your reply.
First you want to get paid for your information and now you stop without sending me your price model?
Sincerely, I am,
Catherine Lowenstein
Juliusz Chroboczek <jch(a)pps.jussieu.fr> wrote:
> >> Sorry, I know the people but I don't know the details about their
> >> business. Why don't you get in touch with the people on the BATMAN
> >> list instead?
>
> > I told you that I searched for the company but only found the community
> > site open-mesh.org that doesn't seem to be related to any company. You
> > said that you know about their commercial development/company.
>
> Yeah, they told me about it over beer.
>
> > Why don't you want to give me contact information of these people when
> > you know the people behind the company?
>
> Of course, I could spend some time searching for it for you. Are you
> willing to pay me a consulting fee for my time?
Depends on the price. I am not against paying for it, but I cannot just agree to this without knowing the exact terms of this contract.
Sincerely, I am,
Catherine Lowenstein
Juliusz wrote:
> Sorry, I know the people but I don't know the details about their
> business. Why don't you get in touch with the people on the BATMAN list
> instead?
I told you that I searched for the company but only found the community site open-mesh.org that doesn't seem to be related to any company. You said that you know about their commercial development/company. So I tried to contact you to get more information where I can find the contact information of the BATMAN company.
Why don't you want to give me contact information of these people when you know the people behind the company?
Sincerely, I am,
Catherine Lowenstein
Hello there again,
I have observed a problem since updating to 2012.2 and enabled BLAII
I'm compiling logs to understand what's happening, but as always,
reading logs only gets me more lost :(
So here i am again begging for help
the setup is the same I described in yesterday's attachment, but
what's not pictured is an ethernet cable between colmena-casa and
f8d11504758.
f8d11504758 is the only router that connects to the internet (through
WAN cable), and it's also the only one that has dnsmasq running and
gw_mode=server.
All the other nodes have gw_mode=client
All of the nodes have bridge_loop_avoidance=1
(even though there are no other utp connections, so it could in fact
be enabled only on colmena-casa and f8d11504758)
with this setup, dhcp requests from the mesh sometimes get "lost",
either they don't reach f8d11504758 or the reply doesn't get out
this didn't happen with batman 2012.1 , setup as indicated by the BLAI
wiki page (batctl if add br-lan)
furthermore, with batman 2012.2 , BLAII activated, but gw_mode=off in
all nodes, DHCP also works fine.
So, a few questions arise:
is it a problem to activate bridge_loop_avoidance=1 in all nodes,
regardless of the fact that they "need" it or not? (that is, it is
activated on nodes that don't have any ethernet cables connected and
couldn't possibly create a bridge loop)
would it make a difference, if I add br-lan to bat0 (batctl if add
br-lan) the way I used to do with batman 2012.1 ?
any other thoughts or ideas?
thanks as always!
Gui
The current bitarray library assumes that the windows are always
BATADV_TQ_LOCAL_WINDOW_SIZE long. If we want to reuse the same library in other
contexts we need to make it general enough. This patch enables such the bitarray
library to handle windows of any size.
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
---
bat_iv_ogm.c | 9 ++++++---
bitarray.c | 31 ++++++++++++++++---------------
bitarray.h | 11 ++++++-----
routing.c | 9 ++++++---
4 files changed, 34 insertions(+), 26 deletions(-)
diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c
index e877af8..f8e4c0e 100644
--- a/bat_iv_ogm.c
+++ b/bat_iv_ogm.c
@@ -910,6 +910,7 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
int set_mark, ret = -1;
uint32_t seqno = ntohl(batadv_ogm_packet->seqno);
uint8_t *neigh_addr;
+ int win_size = BATADV_TQ_LOCAL_WINDOW_SIZE;
orig_node = batadv_get_orig_node(bat_priv, batadv_ogm_packet->orig);
if (!orig_node)
@@ -930,7 +931,7 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
is_duplicate |= batadv_test_bit(tmp_neigh_node->real_bits,
orig_node->last_real_seqno,
- seqno);
+ seqno, win_size);
neigh_addr = tmp_neigh_node->addr;
if (batadv_compare_eth(neigh_addr, ethhdr->h_source) &&
@@ -942,7 +943,8 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
/* if the window moved, set the update flag. */
need_update |= batadv_bit_get_packet(bat_priv,
tmp_neigh_node->real_bits,
- seq_diff, set_mark);
+ seq_diff, set_mark,
+ win_size);
tmp_neigh_node->real_packet_count =
bitmap_weight(tmp_neigh_node->real_bits,
@@ -1093,7 +1095,8 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr,
word = &(orig_neigh_node->bcast_own[offset]);
bit_pos = if_incoming_seqno - 2;
bit_pos -= ntohl(batadv_ogm_packet->seqno);
- batadv_set_bit(word, bit_pos);
+ batadv_set_bit(word, bit_pos,
+ BATADV_TQ_LOCAL_WINDOW_SIZE);
weight = &orig_neigh_node->bcast_own_sum[if_num];
*weight = bitmap_weight(word,
BATADV_TQ_LOCAL_WINDOW_SIZE);
diff --git a/bitarray.c b/bitarray.c
index aea174c..b46a81e 100644
--- a/bitarray.c
+++ b/bitarray.c
@@ -23,12 +23,13 @@
#include <linux/bitops.h>
/* shift the packet array by n places. */
-static void batadv_bitmap_shift_left(unsigned long *seq_bits, int32_t n)
+static void batadv_bitmap_shift_left(unsigned long *seq_bits, int32_t n,
+ int size)
{
- if (n <= 0 || n >= BATADV_TQ_LOCAL_WINDOW_SIZE)
+ if (n <= 0 || n >= size)
return;
- bitmap_shift_left(seq_bits, seq_bits, n, BATADV_TQ_LOCAL_WINDOW_SIZE);
+ bitmap_shift_left(seq_bits, seq_bits, n, size);
}
@@ -39,39 +40,39 @@ static void batadv_bitmap_shift_left(unsigned long *seq_bits, int32_t n)
* 0 if the window was not moved/shifted.
*/
int batadv_bit_get_packet(void *priv, unsigned long *seq_bits,
- int32_t seq_num_diff, int set_mark)
+ int32_t seq_num_diff, int set_mark, int size)
{
struct batadv_priv *bat_priv = priv;
/* sequence number is slightly older. We already got a sequence number
* higher than this one, so we just mark it.
*/
- if (seq_num_diff <= 0 && seq_num_diff > -BATADV_TQ_LOCAL_WINDOW_SIZE) {
+ if (seq_num_diff <= 0 && seq_num_diff > -size) {
if (set_mark)
- batadv_set_bit(seq_bits, -seq_num_diff);
+ batadv_set_bit(seq_bits, -seq_num_diff, size);
return 0;
}
/* sequence number is slightly newer, so we shift the window and
* set the mark if required
*/
- if (seq_num_diff > 0 && seq_num_diff < BATADV_TQ_LOCAL_WINDOW_SIZE) {
- batadv_bitmap_shift_left(seq_bits, seq_num_diff);
+ if (seq_num_diff > 0 && seq_num_diff < size) {
+ batadv_bitmap_shift_left(seq_bits, seq_num_diff, size);
if (set_mark)
- batadv_set_bit(seq_bits, 0);
+ batadv_set_bit(seq_bits, 0, size);
return 1;
}
/* sequence number is much newer, probably missed a lot of packets */
- if (seq_num_diff >= BATADV_TQ_LOCAL_WINDOW_SIZE &&
+ if (seq_num_diff >= size &&
seq_num_diff < BATADV_EXPECTED_SEQNO_RANGE) {
batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
"We missed a lot of packets (%i) !\n",
seq_num_diff - 1);
- bitmap_zero(seq_bits, BATADV_TQ_LOCAL_WINDOW_SIZE);
+ bitmap_zero(seq_bits, size);
if (set_mark)
- batadv_set_bit(seq_bits, 0);
+ batadv_set_bit(seq_bits, 0, size);
return 1;
}
@@ -80,15 +81,15 @@ int batadv_bit_get_packet(void *priv, unsigned long *seq_bits,
* packet should be dropped without calling this function if the
* seqno window is protected.
*/
- if (seq_num_diff <= -BATADV_TQ_LOCAL_WINDOW_SIZE ||
+ if (seq_num_diff <= -size ||
seq_num_diff >= BATADV_EXPECTED_SEQNO_RANGE) {
batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
"Other host probably restarted!\n");
- bitmap_zero(seq_bits, BATADV_TQ_LOCAL_WINDOW_SIZE);
+ bitmap_zero(seq_bits, size);
if (set_mark)
- batadv_set_bit(seq_bits, 0);
+ batadv_set_bit(seq_bits, 0, size);
return 1;
}
diff --git a/bitarray.h b/bitarray.h
index a081ce1..830d5bd 100644
--- a/bitarray.h
+++ b/bitarray.h
@@ -24,22 +24,23 @@
* and curr_seqno is within range of last_seqno
*/
static inline int batadv_test_bit(const unsigned long *seq_bits,
- uint32_t last_seqno, uint32_t curr_seqno)
+ uint32_t last_seqno, uint32_t curr_seqno,
+ int size)
{
int32_t diff;
diff = last_seqno - curr_seqno;
- if (diff < 0 || diff >= BATADV_TQ_LOCAL_WINDOW_SIZE)
+ if (diff < 0 || diff >= size)
return 0;
else
return test_bit(diff, seq_bits);
}
/* turn corresponding bit on, so we can remember that we got the packet */
-static inline void batadv_set_bit(unsigned long *seq_bits, int32_t n)
+static inline void batadv_set_bit(unsigned long *seq_bits, int32_t n, int size)
{
/* if too old, just drop it */
- if (n < 0 || n >= BATADV_TQ_LOCAL_WINDOW_SIZE)
+ if (n < 0 || n >= size)
return;
set_bit(n, seq_bits); /* turn the position on */
@@ -49,6 +50,6 @@ static inline void batadv_set_bit(unsigned long *seq_bits, int32_t n)
* new, 0 if old
*/
int batadv_bit_get_packet(void *priv, unsigned long *seq_bits,
- int32_t seq_num_diff, int set_mark);
+ int32_t seq_num_diff, int set_mark, int size);
#endif /* _NET_BATMAN_ADV_BITARRAY_H_ */
diff --git a/routing.c b/routing.c
index bc2b88b..ec68df0 100644
--- a/routing.c
+++ b/routing.c
@@ -53,7 +53,8 @@ void batadv_slide_own_bcast_window(struct batadv_hard_iface *hard_iface)
word_index = hard_iface->if_num * BATADV_NUM_WORDS;
word = &(orig_node->bcast_own[word_index]);
- batadv_bit_get_packet(bat_priv, word, 1, 0);
+ batadv_bit_get_packet(bat_priv, word, 1, 0,
+ BATADV_TQ_LOCAL_WINDOW_SIZE);
w = &orig_node->bcast_own_sum[hard_iface->if_num];
*w = bitmap_weight(word, BATADV_TQ_LOCAL_WINDOW_SIZE);
spin_unlock_bh(&orig_node->ogm_cnt_lock);
@@ -1118,7 +1119,8 @@ int batadv_recv_bcast_packet(struct sk_buff *skb,
/* check whether the packet is a duplicate */
if (batadv_test_bit(orig_node->bcast_bits, orig_node->last_bcast_seqno,
- ntohl(bcast_packet->seqno)))
+ ntohl(bcast_packet->seqno),
+ BATADV_TQ_LOCAL_WINDOW_SIZE))
goto spin_unlock;
seq_diff = ntohl(bcast_packet->seqno) - orig_node->last_bcast_seqno;
@@ -1131,7 +1133,8 @@ int batadv_recv_bcast_packet(struct sk_buff *skb,
/* mark broadcast in flood history, update window position
* if required.
*/
- if (batadv_bit_get_packet(bat_priv, orig_node->bcast_bits, seq_diff, 1))
+ if (batadv_bit_get_packet(bat_priv, orig_node->bcast_bits, seq_diff, 1,
+ BATADV_TQ_LOCAL_WINDOW_SIZE))
orig_node->last_bcast_seqno = ntohl(bcast_packet->seqno);
spin_unlock_bh(&orig_node->bcast_seqno_lock);
--
1.7.9.4
If this call fails, some of the orig_nodes spaces may have been
resized for the increased number of interface, and some may not.
If we would just continue with the larger number of interfaces,
this would lead to access to not allocated memory later.
We better check the return code, and don't add the interface if
no memory is available. OTOH, keeping some of the orig_nodes
with too much memory allocated should hurt no one (except for
a few too many bytes allocated).
Signed-off-by: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
---
hard-interface.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hard-interface.c b/hard-interface.c
index 282bf6e..2d7f4f2 100644
--- a/hard-interface.c
+++ b/hard-interface.c
@@ -313,7 +313,12 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
hard_iface->if_num = bat_priv->num_ifaces;
bat_priv->num_ifaces++;
hard_iface->if_status = BATADV_IF_INACTIVE;
- batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces);
+ ret = batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces);
+ if (ret < 0) {
+ bat_priv->bat_algo_ops->bat_iface_disable(hard_iface);
+ bat_priv->num_ifaces--;
+ goto err_dev;
+ }
hard_iface->batman_adv_ptype.type = ethertype;
hard_iface->batman_adv_ptype.func = batadv_batman_skb_recv;
--
1.7.10
the word millisecond is misspelled in several comments. This patch fixes it.
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
---
main.h | 8 ++++----
vis.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/main.h b/main.h
index 6dca9c4..0c6903c 100644
--- a/main.h
+++ b/main.h
@@ -41,13 +41,13 @@
* -> TODO: check influence on BATADV_TQ_LOCAL_WINDOW_SIZE
*/
#define BATADV_PURGE_TIMEOUT 200000 /* 200 seconds */
-#define BATADV_TT_LOCAL_TIMEOUT 3600000 /* in miliseconds */
-#define BATADV_TT_CLIENT_ROAM_TIMEOUT 600000 /* in miliseconds */
+#define BATADV_TT_LOCAL_TIMEOUT 3600000 /* in milliseconds */
+#define BATADV_TT_CLIENT_ROAM_TIMEOUT 600000 /* in milliseconds */
/* sliding packet range of received originator messages in sequence numbers
* (should be a multiple of our word size)
*/
#define BATADV_TQ_LOCAL_WINDOW_SIZE 64
-/* miliseconds we have to keep pending tt_req */
+/* milliseconds we have to keep pending tt_req */
#define BATADV_TT_REQUEST_TIMEOUT 3000
#define BATADV_TQ_GLOBAL_WINDOW_SIZE 5
@@ -59,7 +59,7 @@
#define BATADV_TT_OGM_APPEND_MAX 3
/* Time in which a client can roam at most ROAMING_MAX_COUNT times in
- * miliseconds
+ * milliseconds
*/
#define BATADV_ROAMING_MAX_TIME 20000
#define BATADV_ROAMING_MAX_COUNT 5
diff --git a/vis.h b/vis.h
index 84e716e..873282f 100644
--- a/vis.h
+++ b/vis.h
@@ -20,7 +20,7 @@
#ifndef _NET_BATMAN_ADV_VIS_H_
#define _NET_BATMAN_ADV_VIS_H_
-/* timeout of vis packets in miliseconds */
+/* timeout of vis packets in milliseconds */
#define BATADV_VIS_TIMEOUT 200000
int batadv_vis_seq_print_text(struct seq_file *seq, void *offset);
--
1.7.9.4
Hello people,
this is the fourth version of the Speedy Join patchset below
Changes history:
v1 -> v2:
- indentation and style has been fixed taking into consideration Sven's
suggestions
- Old patch 4 has been removed. TT flags do not really need to be carry along
with the tt_entry in a roaming_adv packet. (at least this is not needed for
the purpose of this feature). A roaming client will be marked as ROAM on
the new mesh node and therefore it will be already purged if nobody claims it
v2 -> v3:
- patch 1 and 2 have been merged in 1/3. Changes were all related to the new
refcounting mechanism. ..orig_entry_find() function has been improved as well
as ..orig_entry_add() (it does internally check if the orig_entry already
exists or not) and ..has_orig() (now it does use ..orig_entry_find()).
- patch 2/3 has been modified to take into consideration the change above
- temp timeout changed to an absolute value instead of being computed as product
of the local orig_interval times a constant factor.
v3 -> v4:
- fixed some minor style issues
- renamed batadv_orig_list_entry_free_ref() to
batadv_tt_orig_list_entry_free_ref()
- improved comment in patch 2/3
Thank you,
Antonio
Antonio Quartulli (3):
batman-adv: add reference counting for type batadv_tt_orig_list_entry
batman-adv: detect not yet announced clients
batman-adv: change interface_rx to get orig node
main.h | 1 +
packet.h | 1 +
routing.c | 10 +--
soft-interface.c | 6 +-
soft-interface.h | 5 +-
translation-table.c | 194 +++++++++++++++++++++++++++++++++++++--------------
translation-table.h | 4 +-
types.h | 2 +
8 files changed, 163 insertions(+), 60 deletions(-)
--
1.7.9.4
As much as I'm happy to see LWN links sprinkled through the kernel by the
dozen, this one in particular reflects a very old state of reality; the
associated comment is now incorrect. So just delete it.
Signed-off-by: Jonathan Corbet <corbet(a)lwn.net>
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 083a299..c91f35b 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -57,9 +57,6 @@ static int __init batman_init(void)
recv_handler_init();
bat_iv_init();
-
- /* the name should not be longer than 10 chars - see
- * http://lwn.net/Articles/23634/ */
bat_event_workqueue = create_singlethread_workqueue("bat_events");
if (!bat_event_workqueue)