[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160825195256.5ea52610@halley>
Date: Thu, 25 Aug 2016 19:52:56 +0300
From: Shmulik Ladkani <shmulik.ladkani@...il.com>
To: Hadar Hen Zion <hadarh@...lanox.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Jiri Pirko <jiri@...lanox.com>, Jiri Benc <jbenc@...hat.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Tom Herbert <tom@...bertland.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Amir Vadai <amirva@...lanox.com>, Amir Vadai <amir@...ai.me>
Subject: Re: [PATCH net-next V3 4/4] net/sched: Introduce act_tunnel_key
Hi,
On Thu, 25 Aug 2016 19:13:47 +0300 Hadar Hen Zion <hadarh@...lanox.com> wrote:
> +static int tunnel_key_act(struct sk_buff *skb, const struct tc_action *a,
> + struct tcf_result *res)
> +{
> + struct tcf_tunnel_key *t = to_tunnel_key(a);
> + int action;
> +
> + spin_lock(&t->tcf_lock);
> + tcf_lastuse_update(&t->tcf_tm);
> + bstats_update(&t->tcf_bstats, skb);
> + action = t->tcf_action;
> +
> + switch (t->tcft_action) {
> + case TCA_TUNNEL_KEY_ACT_RELEASE:
> + skb_dst_set_noref(skb, NULL);
> + break;
> + case TCA_TUNNEL_KEY_ACT_SET:
> + skb_dst_set_noref(skb, &t->tcft_enc_metadata->dst);
> + break;
Two additional questions:
- No need to perform a 'skb_dst_drop(skb)' prior the dst set calls?
- Why there's no need to take a reference on tcft_enc_metadata->dst?
Besides that,
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@...il.com>
Thanks!
Powered by blists - more mailing lists