[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9fa9ffe0-33f2-8421-4547-aaf7452b5c10@mojatatu.com>
Date: Mon, 12 Sep 2016 18:08:01 -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 05:58 PM, Eric Dumazet wrote:
> On Mon, 2016-09-12 at 16:46 -0400, Jamal Hadi Salim wrote:
>> From: Jamal Hadi Salim <jhs@...atatu.com>
>
>> +
>> + /* XXX: if you are going to edit more fields beyond ethernet header
>> + * (example when you add IP header replacement or vlan swap)
>> + * then MAX_EDIT_LEN needs to change appropriately
>> + */
>> + err = skb_ensure_writable(skb, ETH_HLEN);
>> + if (unlikely(err)) /* best policy is to drop on the floor */
>> + action = TC_ACT_SHOT;
>> +
>> + rcu_read_lock();
>> + action = READ_ONCE(d->tcf_action);
>
> You are overwriting @action, while you might have put TC_ACT_SHOT in it
> 3 lines above.
>
> Maybe you meant :
> if (err)
> return TC_ACT_SHOT;
>
Thanks for catching that (leftover from when i used a lock).
Will resubmit.
cheers,
jamal
Powered by blists - more mailing lists