• Vlad Buslov's avatar
    net: sched: implement tcf_block_refcnt_{get|put}() · 0607e439
    Vlad Buslov authored
    Implement get/put function for blocks that only take/release the reference
    and perform deallocation. These functions are intended to be used by
    unlocked rules update path to always hold reference to block while working
    with it. They use on new fine-grained locking mechanisms introduced in
    previous patches in this set, instead of relying on global protection
    provided by rtnl lock.
    
    Extract code that is common with tcf_block_detach_ext() into common
    function __tcf_block_put().
    
    Extend tcf_block with rcu to allow safe deallocation when it is accessed
    concurrently.
    Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0607e439
sch_generic.h 28 KB