Hi,

On Thu, 25 Aug 2016 19:13:47 +0300 Hadar Hen Zion <had...@mellanox.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.ladk...@gmail.com>

Thanks!

Reply via email to