26 Jan, 2017

1 commit


02 Feb, 2016

1 commit


25 Aug, 2015

1 commit


07 Jun, 2015

1 commit

  • The header files could not be build indepdent from each other. This is
    happened because headers didn't include the files for things they've used.
    This was problematic because the success of a build depended on the
    knowledge about the right order of local includes.

    Also source files were not including everything they've used explicitly.
    Instead they required that transitive includes are always stable. This is
    problematic because some transitive includes are not obvious, depend on
    config settings and may not be stable in the future.

    The order for include blocks are:

    * primary headers (main.h and the *.h file of a *.c file)
    * global linux headers
    * required local headers
    * extra forward declarations for pointers in function/struct declarations

    The only exceptions are linux/bitops.h and linux/if_ether.h in packet.h.
    This header file is shared with userspace applications like batctl and must
    therefore build together with userspace applications. The header
    linux/bitops.h is not part of the uapi headers and linux/if_ether.h
    conflicts with the musl implementation of netinet/if_ether.h. The
    maintainers rejected the use of __KERNEL__ preprocessor checks and thus
    these two headers are only in main.h. All files using packet.h first have
    to include main.h to work correctly.

    Reported-by: Markus Pargmann
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner

    Sven Eckelmann
     

29 May, 2015

1 commit


12 Jan, 2014

2 commits


09 Jan, 2014

1 commit


10 Oct, 2013

1 commit


02 Oct, 2013

1 commit

  • batman-adv saves its table of packet handlers as a global state, so handlers
    must be set up only once (and setting them up a second time will fail).

    The recently-added network coding support tries to set up its handler each time
    a new softif is registered, which obviously fails when more that one softif is
    used (and in consequence, the softif creation fails).

    Fix this by splitting up batadv_nc_init into batadv_nc_init (which is called
    only once) and batadv_nc_mesh_init (which is called for each softif); in
    addition batadv_nc_free is renamed to batadv_nc_mesh_free to keep naming
    consistent.

    Signed-off-by: Matthias Schiffer
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Matthias Schiffer
     

29 May, 2013

1 commit


14 Mar, 2013

4 commits

  • 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

    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 are buffered.

    This patch adds skbs to the buffer just before forwarding them. The
    buffer is traversed every 10 ms, where timed skbs are removed from the
    buffer and transmitted. To allow experiments with the network coding
    scheme, the timeout is tunable through a file in debugfs.

    Signed-off-by: Martin Hundebøll
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Martin Hundebøll
     
  • To use network coding efficiently, a relay must know when neighbor nodes
    are likely to have enough information to be able to decode a network
    coded packet. This is detected by using OGMs from batman-adv to discover
    when one neighbor is in range of another neighbor. The relay check the
    TLL to detect when an OGM is forwarded from one neighbor by another
    neighbor, and thereby knows that the two neighbors are in range and thus
    overhear packets sent by each other.

    This information is saved in the orig_node struct to be used when
    searching for coding opportunities. Two lists are added to the
    orig_node struct: One for neighbors that can hear the orig_node
    (outgoing nc_nodes) and one for neighbors that the orig_node can hear
    (incoming nc_nodes).

    Information about nc_nodes is kept for 10 seconds and is available
    through debugfs in batman_adv/nc_nodes to use when debugging network
    coding.

    Signed-off-by: Martin Hundebøll
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    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 original packet. This will lead to increased
    throughput in topologies where two packets cross one relay.

    In a simple topology with three nodes, it takes four transmissions
    without network coding to get one packet from Node A to Node B and one
    from Node B to Node A:

    1. Node A ---- p1 ---> Node R Node B
    2. Node A Node R Node B

    With network coding, the relay only needs one transmission, which saves
    us one slot of valuable airtime:

    1. Node A ---- p1 ---> Node R Node B
    2. Node A Node R Node B

    The same principle holds for a topology including five nodes. Here the
    packets from Node A and Node B are overheard by Node C and Node D,
    respectively. This allows Node R to send a network coded packet to save
    one transmission:

    Node A Node B

    | \ / |
    | p1 p2 |
    | \ / |
    p1 > Node R < p2
    | |
    | / \ |
    | p1 x p2 p1 x p2 |
    v / \ v
    / \
    Node C < > Node D

    More information is available on the open-mesh.org wiki[1].

    This patch adds the initial code to support network coding in
    batman-adv. It sets up a worker thread to do house keeping and adds a
    sysfs file to enable/disable network coding. The feature is disabled by
    default, as it requires a wifi-driver with working promiscuous mode, and
    also because it adds a small delay at each hop.

    [1] http://www.open-mesh.org/projects/batman-adv/wiki/Catwoman

    Signed-off-by: Martin Hundebøll
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Martin Hundebøll