[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1473717514.18970.80.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Mon, 12 Sep 2016 14:58:34 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jamal Hadi Salim <jhs@...atatu.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 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;
Powered by blists - more mailing lists