On Thu, Aug 25, 2016 at 8:48 PM, Eric Dumazet <[email protected]> wrote:
> On Thu, 2016-08-25 at 19:13 +0300, Hadar Hen Zion wrote:
>> From: Amir Vadai <[email protected]>
>> +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;
>> + default:
>> + WARN_ONCE(1, "Bad tunnel_key action.\n");
>> + break;
>> + }
>> +
>> + spin_unlock(&t->tcf_lock);
>> + return action;
> Please find a better way than using a spinlock in this hot path.
> Maybe looking at
> 2ee22a90c7afac265bb6f7abea610b938195e2b8 net_sched: act_mirred: remove
> spinlock in fast path
[...]
okay, thanks for the heads up, will look there