Re: [B.A.T.M.A.N.] [RFC] batman-adv: postpone sysfs removal when unregistering

2012-12-13 Thread Antonio Quartulli
On Wed, Dec 12, 2012 at 11:41:59AM +0100, Simon Wunderlich wrote: This patch needs rework for two reasons: * we still need to defer the softif as well, otherwise we keep the deadlock for the softif * work struct and delayed_work are mixed up here if you think to the fact that you are

Re: [B.A.T.M.A.N.] [RFC] batman-adv: postpone OGM preparation to sending time

2012-12-13 Thread Antonio Quartulli
On Tue, Dec 11, 2012 at 10:57:24PM +0100, Antonio Quartulli wrote: [...] /* when do we schedule a ogm packet to be sent */ static unsigned long batadv_iv_ogm_fwd_send_time(void) { - return jiffies + msecs_to_jiffies(random32() % (BATADV_JITTER / 2)); + return jiffies +

[B.A.T.M.A.N.] [PATCHv2 0/7] CATWOMAN: Network coding in batman-adv

2012-12-13 Thread Martin Hundebøll
I hereby bring you network coding in batman-adv. (Changed according to Antonios latest review). This allows a relay to send two packets (to two destinations) in a single transmission. Tests[1] have shown an increase in throughput up to 1.6 under the right circumstances. For this to work, you will

[B.A.T.M.A.N.] [PATCHv2 2/7] batman-adv: Add the initial code for network coding.

2012-12-13 Thread Martin Hundebøll
Network coding exploits the 802.11 shared medium to allow multiple packets to be sent in a single transmission. In brief, a relay can XOR two packets, and send the coded packet to two destinations. The receivers can decode one of the original packets by XOR'ing the coded packet with the other

[B.A.T.M.A.N.] [PATCHv2 4/7] batman-adv: Buffer unicast packets before forward.

2012-12-13 Thread Martin Hundebøll
Two be able to network code two packets, one packet must be buffered until the next is available. This is done in a coding buffer, which is essentially a hash table with lists of packets. Each entry in the hash table corresponds to a specific src-dst pair, which has a linked list of packets that

[B.A.T.M.A.N.] [PATCHv2 7/7] batman-adv: Receive coded packets and decode them.

2012-12-13 Thread Martin Hundebøll
When receiving a network coded packet, the decoding buffer is searched for a packet to use for decoding. The source, destination, and crc32 from the coded packet is used to identify the wanted packet. The decoded packet is passed to the usual unicast receiver function, as had it never been network

[B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: Save overheard and tx packets for decoding.

2012-12-13 Thread Martin Hundebøll
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