• Luis Carlos Cobo's avatar
    mac80211: mesh path table implementation · eb2b9311
    Luis Carlos Cobo authored
    The mesh path table associates destinations with the next hop to reach them. The
    table is a hash of linked lists protected by rcu mechanisms. Every mesh path
    contains a lock to protect the mesh path state.
    
    Each outgoing mesh frame requires a look up into this table. Therefore, the
    table it has been designed so it is not necessary to hold any lock to find the
    appropriate next hop.
    
    If the path is determined to be active within a rcu context we can safely
    dereference mpath->next_hop->addr, since it holds a reference to the sta
    next_hop. After a mesh path has been set active for the first time it next_hop
    must always point to a valid sta.  If this is not possible the mpath must be
    deleted or replaced in a RCU safe fashion.
    Signed-off-by: default avatarLuis Carlos Cobo <luisca@cozybit.com>
    Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    eb2b9311
mesh_pathtbl.c 13.4 KB