Re: [PATCH net-next v2 2/2] net/sched: act_csum: don't use spinlock in the fast path

2018-01-22 Thread Davide Caratti
hello Cong, On Sun, 2018-01-21 at 12:28 -0800, Cong Wang wrote: > > + params = rcu_dereference(p->params); > > I think you need rtnl_dereference() here, as we don't have RCU read lock here? you are right, thank you for spotting this. I will send v3 series today. regards, -- davide

Re: [PATCH net-next v2 2/2] net/sched: act_csum: don't use spinlock in the fast path

2018-01-21 Thread Cong Wang
On Fri, Jan 19, 2018 at 6:12 AM, Davide Caratti wrote: > static int tcf_csum_dump(struct sk_buff *skb, struct tc_action *a, int bind, > @@ -575,15 +594,18 @@ static int tcf_csum_dump(struct sk_buff *skb, struct > tc_action *a, int bind, > { > unsigned char *b =

[PATCH net-next v2 2/2] net/sched: act_csum: don't use spinlock in the fast path

2018-01-19 Thread Davide Caratti
use RCU instead of spin_{,unlock}_bh() to protect concurrent read/write on act_csum configuration, to reduce the effects of contention in the data path when multiple readers are present. Signed-off-by: Davide Caratti --- include/net/tc_act/tc_csum.h | 16 ++--