[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77bca669-9113-3977-ad3c-478091422ff8@mojatatu.com>
Date: Mon, 12 Sep 2016 18:14:50 -0400
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
xiyou.wangcong@...il.com, daniel@...earbox.net,
john.r.fastabend@...el.com
Subject: Re: [PATCH v4 net-next 1/1] net_sched: Introduce skbmod action
On 16-09-12 06:01 PM, Eric Dumazet wrote:
> On Mon, 2016-09-12 at 16:46 -0400, Jamal Hadi Salim wrote:
>
>> +
>> +static int tcf_skbmod_dump(struct sk_buff *skb, struct tc_action *a,
>> + int bind, int ref)
>> +{
>> + struct tcf_skbmod *d = to_skbmod(a);
>> + unsigned char *b = skb_tail_pointer(skb);
>> + struct tcf_skbmod_params *p = rtnl_dereference(d->skbmod_p);
>> + struct tc_skbmod opt = {
>> + .index = d->tcf_index,
>> + .refcnt = d->tcf_refcnt - ref,
>> + .bindcnt = d->tcf_bindcnt - bind,
>> + .action = d->tcf_action,
>> + };
>> + struct tcf_t t;
>> +
>> + rcu_read_lock();
>
> You do not need rcu read lock protection here, RTNL is enough.
I noticed some very weird issues when I took that out.
Running sufficiently large amount of traffic (ping -f is sufficient)
I saw that when i did a dump it took anywhere between 6-15 seconds.
With the read_lock in place response was immediate.
I can go back and run things to verify - but it was very odd.
cheers,
jamal
Powered by blists - more mailing lists