14 Mar, 2013
1 commit
-
To be able to decode a network coded packet, a node must already know
one of the two coded packets. This is done by buffering skbs before
transmission and buffering packets sniffed with promiscuous mode from
other hosts.Packets are kept in a buffer similar to the one with forward-skbs: A
hash table, where each entry, which corresponds to a src-dst pair, has a
linked list packets.Signed-off-by: Martin Hundebøll
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli
28 Feb, 2013
1 commit
-
I'm not sure why, but the hlist for each entry iterators were conceived
list_for_each_entry(pos, head, member)
The hlist ones were greedy and wanted an extra parameter:
hlist_for_each_entry(tpos, pos, head, member)
Why did they need an extra pos parameter? I'm not quite sure. Not only
they don't really need it, it also prevents the iterator from looking
exactly like the list iterator, which is unfortunate.Besides the semantic patch, there was some manual work required:
- Fix up the actual hlist iterators in linux/list.h
- Fix up the declaration of other iterators based on the hlist ones.
- A very small amount of places were using the 'node' parameter, this
was modified to use 'obj->member' instead.
- Coccinelle didn't handle the hlist_for_each_entry_safe iterator
properly, so those had to be fixed up manually.The semantic patch which is mostly the work of Peter Senna Tschudin is here:
@@
iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;type T;
expression a,c,d,e;
identifier b;
statement S;
@@-T b;
[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
[akpm@linux-foundation.org: checkpatch fixes]
[akpm@linux-foundation.org: fix warnings]
[akpm@linux-foudnation.org: redo intrusive kvm changes]
Tested-by: Peter Senna Tschudin
Acked-by: Paul E. McKenney
Signed-off-by: Sasha Levin
Cc: Wu Fengguang
Cc: Marcelo Tosatti
Cc: Gleb Natapov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Jan, 2013
2 commits
-
Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner -
A delayed_work struct does not need to be initialized each
every time before being enqueued. Therefore the
INIT_DELAYED_WORK() macro should be used during the
initialization process only.Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner
12 Jan, 2013
1 commit
-
Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner
30 Nov, 2012
1 commit
-
The ETH_P_BATMAN ethertype is now defined kernel-wide. Use it instead
of the private BATADV_ETH_P_BATMAN define.Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner
21 Nov, 2012
1 commit
-
By adding batadv_send_skb_to_orig() in send.c, we can remove duplicate
code that looks up the next hop and then calls batadv_send_skb_packet().Furthermore, this prepares the upcoming new implementation of
fragmentation, which requires the next hop to route packets.Please note that this doesn't entirely remove the next-hop lookup in
routing.c and unicast.c, since it is used by the current fragmentation
code.Also note that the next-hop info is removed from debug messages in
translation-table.c, since it is looked up elsewhere.Signed-off-by: Martin Hundebøll
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli
08 Nov, 2012
1 commit
-
In case of an ARP message going in or out the soft_iface, it is intercepted and
a special action is performed. In particular the DHT helper functions previously
implemented are used to store all the ARP entries belonging to the network in
order to provide a fast and unicast lookup instead of the classic broadcast
flooding mechanism.
Each node stores the entries it is responsible for (following the DHT rules) in
its soft_iface ARP table. This makes it possible to reuse the kernel data
structures and functions for ARP management.Signed-off-by: Antonio Quartulli
23 Aug, 2012
1 commit
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Antonio Quartulli
02 Jul, 2012
4 commits
-
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann
28 Jun, 2012
2 commits
-
Reported-by: Martin Hundebøll
Signed-off-by: Sven Eckelmann -
Signed-off-by: Sven Eckelmann
25 Jun, 2012
3 commits
-
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.Signed-off-by: Sven Eckelmann
-
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.Signed-off-by: Sven Eckelmann
-
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.Signed-off-by: Sven Eckelmann
21 Jun, 2012
4 commits
-
batman-adv doesn't follow the style for multiline comments that David S. Miller
prefers. All comments should be reformatted to follow this consistent style to
make the code slightly more readable.Signed-off-by: Sven Eckelmann
-
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.Reported-by: David Miller
Signed-off-by: Sven Eckelmann -
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.Reported-by: David Miller
Signed-off-by: Sven Eckelmann -
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.Reported-by: David Miller
Signed-off-by: Sven Eckelmann
19 Jun, 2012
2 commits
-
Prior to this patch the translation table code made assumptions about how
the routing protocol works and where its buffers are stored (to directly
modify them).
Each protocol now calls the tt code with the relevant pointers, thereby
abstracting the code.Signed-off-by: Marek Lindner
Acked-by: Antonio Quartulli
Signed-off-by: Sven Eckelmann -
In the code we neever need to atomically check and set the bat_priv->tt_crc
field value. It is simply set and read once in different pieces of the code.
Therefore this field can be safely be converted from atomic_t to uint16_t.Reported-by: Al Viro
Signed-off-by: Antonio Quartulli
Signed-off-by: Sven Eckelmann
14 May, 2012
1 commit
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Antonio Quartulli
11 May, 2012
1 commit
-
Signed-off-by: Marek Lindner
Acked-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli
18 Apr, 2012
2 commits
-
Instead of using sizeof(struct ethhdr) it is strongly recommended to use the
kernel macro ETH_HLEN. This patch substitute each occurrence of the former
expressione with the latter one.Signed-off-by: Antonio Quartulli
-
Using BATMAN_OGM_LEN leaves one with the impression that this is
the full packet size which is not the case. Therefore the variable
is renamed.Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli
11 Mar, 2012
2 commits
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner -
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
17 Feb, 2012
3 commits
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner -
Signed-off-by: Marek Lindner
-
All batman-adv packets have a common 3 byte header. It can be used to share
some code between different code paths, but it was never explicit stated that
this header has to be always the same for all packets. Therefore, new code
changes always have the problem that they may accidently introduce regressions
by moving some elements around.A new structure is introduced that contains the common header and makes it
easier visible that these 3 bytes have to be the same for all on-wire packets.Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
08 Sep, 2011
2 commits
-
In the process the batman iv OGM aggregation code could be merged
into the batman iv code base which makes the separate aggregation
files superfluous.Signed-off-by: Marek Lindner
-
The follow-up routing code changes are going to introduce additional
routing packet types which make this distinction necessary.Signed-off-by: Marek Lindner
22 Aug, 2011
1 commit
-
Several typos have been corrected and some sentences have been rephrased
Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner
08 Jul, 2011
1 commit
-
To keep transtable consistency among all the nodes, an originator must
not send not yet announced clients within a full table TT_RESPONSE.
Instead, deleted client have to be kept in the table in order to be sent
within an immediate TT_RESPONSE. In this way all the nodes in the
network will always provide the same response for the same request.All the modification are committed at the next ttvn increment event.
Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner
05 Jul, 2011
2 commits
-
The primary interface OGM has to be broadcasted on all hard-interfaces
even if the primary interface is not the first interface (if_num = 0).
Therefore the code has to compare the originating interface with the
primary interface instead of checking the if_num.Reported-by: Linus Luessing
Signed-off-by: Marek Lindner -
In order to make possible to use the broadcast list for delayed sendings
the "delay" parameter is now provided instead of using 1 as hardcoded
value.Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner
20 Jun, 2011
1 commit
-
With the current client announcement implementation, in case of roaming,
an update is triggered on the new AP serving the client. At that point
the new information is spread around by means of the OGM broadcasting
mechanism. Until this operations is not executed, no node is able to
correctly route traffic towards the client. This obviously causes packet
drops and introduces a delay in the time needed by the client to recover
its connections.A new packet type called ROAMING_ADVERTISEMENT is added to account this
issue.This message is sent in case of roaming from the new AP serving the
client to the old one and will contain the client MAC address. In this
way an out-of-OGM update is immediately committed, so that the old node
can update its global translation table. Traffic reaching this node will
then be redirected to the correct destination utilising the fresher
information. Thus reducing the packet drops and the connection recovery
delay.Signed-off-by: Antonio Quartulli
Signed-off-by: Sven Eckelmann