17 May, 2013

1 commit

  • rcu_barrier() only waits for the currently scheduled rcu functions
    to finish - it won't wait for any function scheduled via another
    call_rcu() within an rcu scheduled function.

    Unfortunately our batadv_tt_orig_list_entry_free_ref() does just that,
    via a batadv_orig_node_free_ref() call, leading to our rcu_barrier()
    call potentially missing such a batadv_orig_node_free_ref().

    This patch fixes this issue by calling the batadv_orig_node_free_rcu()
    directly from the rcu callback, removing the unnecessary, additional
    call_rcu() layer here.

    Signed-off-by: Linus Lüssing
    Signed-off-by: Marek Lindner
    Acked-by: Antonio Quartulli

    Linus Lüssing
     

23 Apr, 2013

1 commit

  • Conflicts:
    drivers/net/ethernet/emulex/benet/be_main.c
    drivers/net/ethernet/intel/igb/igb_main.c
    drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
    include/net/scm.h
    net/batman-adv/routing.c
    net/ipv4/tcp_input.c

    The e{uid,gid} --> {uid,gid} credentials fix conflicted with the
    cleanup in net-next to now pass cred structs around.

    The be2net driver had a bug fix in 'net' that overlapped with the VLAN
    interface changes by Patrick McHardy in net-next.

    An IGB conflict existed because in 'net' the build_skb() support was
    reverted, and in 'net-next' there was a comment style fix within that
    code.

    Several batman-adv conflicts were resolved by making sure that all
    calls to batadv_is_my_mac() are changed to have a new bat_priv first
    argument.

    Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO
    rewrite in 'net-next', mostly overlapping changes.

    Thanks to Stephen Rothwell and Antonio Quartulli for help with several
    of these merge resolutions.

    Signed-off-by: David S. Miller

    David S. Miller
     

18 Apr, 2013

1 commit


14 Mar, 2013

2 commits


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

    Sasha Levin
     

29 Jan, 2013

1 commit

  • The last-seen field has to be printed for all the local
    entries but the one marked with the no-purge flag

    Introduced by 15727323d9f8864b2d41930940acc38de987045a
    ("batman-adv: don't print the last_seen time for bat0 TT local entry")

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

    Antonio Quartulli
     

19 Jan, 2013

2 commits


12 Jan, 2013

6 commits


21 Nov, 2012

2 commits

  • 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

    Martin Hundebøll
     
  • The transtable_global debug file can show multiple entries for a single client
    when multiple gateways exist. The chosen gateway isn't marked in the list and
    therefore the user cannot easily debug the situation when there is a problem
    with the currently used gateway.

    The best gateway is now marked with "*" and secondary gateways are marked with
    "+".

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     

18 Nov, 2012

1 commit


16 Nov, 2012

3 commits

  • The "early client detection" mechanism must not add clients belonging
    to other backbone nodes. Such clients must be reached by directly
    using the LAN instead of the mesh.

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

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

    Antonio Quartulli
     
  • When a TT response with the full table is sent, the client flags
    should be sent as well. This patch fix the flags assignment when
    populating the tt_response to send back

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

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

    Antonio Quartulli
     
  • Flags carried by a change_entry have to be always copied into the
    client entry as they may contain important attributes (e.g.
    TT_CLIENT_WIFI).

    For instance, a client added by means of the "early detection
    mechanism" has no flag set at the beginning, so they must be updated once the
    proper ADD event is received.

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

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

    Antonio Quartulli
     

15 Nov, 2012

5 commits

  • Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     
  • This patch allows clients to roam multiple times within the same
    originator-interval.

    To enable this new feature two key aspects that have been introduced:
    1) packets are always directed to the node that was originally
    serving the roamed client which will then re-route the data
    to the correct destination at any point in time;
    2) the client flags handling mechanism has been properly modified
    in order to allow multiple roamings withinin the same orig-int.
    Therefore flags are now set properly even in this scenario.

    Signed-off-by: Antonio Quartulli

    Antonio Quartulli
     
  • batadv_tt_global_del_struct() function is not properly named.
    Having a more meaningful name which reflects the current behavior helps other
    developers to easily understand what it does.

    A parameter has also been renamed in order to let the function header better fit
    the 80-chars line-width

    Signed-off-by: Antonio Quartulli

    Antonio Quartulli
     
  • Signed-off-by: Antonio Quartulli

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

1 commit

  • The ethernet header is 14 bytes long. Therefore, the data after it is not 4
    byte aligned and may cause problems on systems without unaligned data access.
    Reserving NET_IP_ALIGN more byes can fix the misalignment of the ethernet
    header.

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     

29 Oct, 2012

5 commits


23 Aug, 2012

4 commits

  • With the current TT mechanism a new client joining the network is not
    immediately able to communicate with other hosts because its MAC address has not
    been announced yet. This situation holds until the first OGM containing its
    joining event will be spread over the mesh network.

    This behaviour can be acceptable in networks where the originator interval is a
    small value (e.g. 1sec) but if that value is set to an higher time (e.g. 5secs)
    the client could suffer from several malfunctions like DHCP client timeouts,
    etc.

    This patch adds an early detection mechanism that makes nodes in the network
    able to recognise "not yet announced clients" by means of the broadcast packets
    they emitted on connection (e.g. ARP or DHCP request). The added client will
    then be confirmed upon receiving the OGM claiming it or purged if such OGM
    is not received within a fixed amount of time.

    Signed-off-by: Antonio Quartulli

    Antonio Quartulli
     
  • Signed-off-by: Sven Eckelmann
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     
  • The structure batadv_priv grows everytime a new feature is introduced. It gets
    hard to find the parts of the struct that belongs to a specific feature. This
    becomes even harder by the fact that not every feature uses a prefix in the
    member name.

    The variables for bridge loop avoidence, gateway handling, translation table
    and visualization server are moved into separate structs that are included in
    the bat_priv main struct.

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     
  • The batadv_tt_orig_list_entry structure didn't have any refcounting mechanism so
    far. This patch introduces it and makes the structure being usable in much more
    complex context.

    Signed-off-by: Antonio Quartulli

    Antonio Quartulli
     

09 Aug, 2012

1 commit


02 Jul, 2012

3 commits