• John Fastabend's avatar
    net: sched: cls_basic use RCU · 9888faef
    John Fastabend authored
    Enable basic classifier for RCU.
    
    Dereferencing tp->root may look a bit strange here but it is needed
    by my accounting because it is allocated at init time and needs to
    be kfree'd at destroy time. However because it may be referenced in
    the classify() path we must wait an RCU grace period before free'ing
    it. We use kfree_rcu() and rcu_ APIs to enforce this. This pattern
    is used in all the classifiers.
    
    Also the hgenerator can be incremented without concern because it
    is always incremented under RTNL.
    Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
    Acked-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9888faef
cls_basic.c 6.87 KB