22 May, 2013

1 commit

  • On errors in batadv_mesh_init(), bat_counters will be freed in both
    batadv_mesh_free() and batadv_softif_init_late(). This patch fixes this
    by returning earlier from batadv_softif_init_late() in case of errors in
    batadv_mesh_init() and by setting bat_counters to NULL after freeing.

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

    Martin Hundebøll
     

23 Apr, 2013

1 commit

  • batadv_mesh_free() schedules some RCU callbacks which need the bat_priv struct
    to do their jobs, while free_netdev(), which is called immediately after, is
    destroying the private data.

    Put an rcu_barrier() in the middle so that free_netdev() is invoked only after
    all the callbacks returned.

    This bug has been introduced by ab8f433dd39be94e8617cff2dfe9f7eca162eb15
    ("batman-adv: Move deinitialization of soft-interface to destructor")

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner
    Signed-off-by: David S. Miller

    Antonio Quartulli
     

27 Mar, 2013

5 commits


14 Mar, 2013

4 commits

  • 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 coded.

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

    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 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
     
  • Before adding forward-skbs to the coding buffer, the buffer is searched
    for a potential coding opportunity. If one is found, the two packets are
    network coded and transmitted right away. If not, the forward-skb is
    added to the buffer.

    Network coded packets are transmitted with information about the two
    receivers and the two coded packets. The first receiver is given by the
    MAC header, while the second is given in the payload/bat-header. The
    second receiver uses promiscuous mode to receive the packet and check
    the second destination.

    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
     

19 Jan, 2013

2 commits


12 Jan, 2013

3 commits


07 Jan, 2013

1 commit

  • Use strlcpy where possible to ensure the string is \0 terminated.
    Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN
    and custom defines.
    Use snprintf instead of sprint.
    Remove unnecessary inits of ->fw_version
    Remove unnecessary inits of drvinfo struct.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

04 Jan, 2013

1 commit


30 Nov, 2012

1 commit


18 Nov, 2012

1 commit


16 Nov, 2012

1 commit

  • The logic in the BLA mechanism may decide to drop broadcast packets
    because the node may still be in the setup phase. For this reason,
    further broadcast processing like the early client detection mechanism
    must be done only after the BLA check.

    This patches moves the invocation to BLA before any other broadcast
    processing.

    This was introduced 30cfd02b60e1cb16f5effb0a01f826c5bb7e4c59
    ("batman-adv: detect not yet announced clients")

    Reported-by: Glen Page
    Signed-off-by: Simon Wunderlich
    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner

    Antonio Quartulli
     

15 Nov, 2012

1 commit

  • tt_poss_change is a node-wide flag which tells whether the node is in a roaming
    state (a client recently moved to/away from it) in order to let it apply special
    re-routing rules. However this flag does not give a clear idea of the current
    state because it is not possible to understand *which client* is actually
    involved in the roaming. For this reason a better approach has been chosen:
    instead of using a node-wide variable, the roaming state is now given by a
    per-tt_entry ROAM flag which, in case of packet coming through the node, tells
    the node whether the real destination is in roaming state or not.

    With this flag change, batadv_check_unicast_ttvn() has also been rearranged in
    order to better fit the new re-routing logic and to be much more readable.

    Signed-off-by: Antonio Quartulli

    Antonio Quartulli
     

08 Nov, 2012

4 commits

  • Added additional counters for D.A.T.

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

    Martin Hundebøll
     
  • This patch adds a runtime switch that enables the user to turn the DAT feature
    on or off at runtime

    Signed-off-by: Antonio Quartulli

    Antonio Quartulli
     
  • 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

    Antonio Quartulli
     
  • The current unicast packet type does not contain the orig source address. This
    patches add a new unicast packet (called UNICAST_4ADDR) which provides two new
    fields: the originator source address and the subtype (the type of the data
    contained in the packet payload). The former is useful to identify the node
    which injected the packet into the network and the latter is useful to avoid
    creating new unicast packet types in the future: a macro defining a new subtype
    will be enough.

    Signed-off-by: Antonio Quartulli

    Antonio Quartulli
     

29 Oct, 2012

2 commits

  • We have seen this to break networks when used with bridge loop
    avoidance. As we can't see any benefit from sending these ancient frames
    via our mesh, we just drop them.

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Antonio Quartulli

    Simon Wunderlich
     
  • Transmissions over batman-adv devices always start another nested transmission
    over devices attached to the batman-adv interface. These devices usually use
    the ethernet lockdep class for the tx_queue lock which is also set by default
    for all batman-adv devices. Lockdep will detect a nested locking attempt of two
    locks with the same class and warn about a possible deadlock.

    This is the default and expected behavior and should not alarm the locking
    correctness prove mechanism. Therefore, the locks for all netdevice specific tx
    queues get a special batman-adv lock class to avoid a false positive for each
    transmission.

    Reported-by: Linus Luessing
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     

29 Sep, 2012

1 commit

  • Conflicts:
    drivers/net/team/team.c
    drivers/net/usb/qmi_wwan.c
    net/batman-adv/bat_iv_ogm.c
    net/ipv4/fib_frontend.c
    net/ipv4/route.c
    net/l2tp/l2tp_netlink.c

    The team, fib_frontend, route, and l2tp_netlink conflicts were simply
    overlapping changes.

    qmi_wwan and bat_iv_ogm were of the "use HEAD" variety.

    With help from Antonio Quartulli.

    Signed-off-by: David S. Miller

    David S. Miller
     

24 Sep, 2012

1 commit


23 Aug, 2012

4 commits


11 Jul, 2012

1 commit

  • Conflicts:
    net/batman-adv/bridge_loop_avoidance.c
    net/batman-adv/bridge_loop_avoidance.h
    net/batman-adv/soft-interface.c
    net/mac80211/mlme.c

    With merge help from Antonio Quartulli (batman-adv) and
    Stephen Rothwell (drivers/net/usb/qmi_wwan.c).

    The net/mac80211/mlme.c conflict seemed easy enough, accounting for a
    conversion to some new tracing macros.

    Signed-off-by: David S. Miller

    David S. Miller
     

06 Jul, 2012

1 commit

  • If the gateway functionality is used, some broadcast packets (DHCP
    requests) may be transmitted as unicast packets. As the bridge loop
    avoidance code now only considers the payload Ethernet destination,
    it may drop the DHCP request for clients which are claimed by other
    backbone gateways, because it falsely infers from the broadcast address
    that the right backbone gateway should havehandled the broadcast.

    Fix this by checking and delegating the batman-adv packet type used
    for transmission.

    Reported-by: Guido Iribarren
    Signed-off-by: Simon Wunderlich

    Simon Wunderlich
     

02 Jul, 2012

4 commits