[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ3xEMjg8+EA8SwNyT-u_R7he9toRqcDuS5mBzGZuGbUfOE9YA@mail.gmail.com>
Date: Fri, 26 Aug 2016 09:16:21 +0300
From: Or Gerlitz <gerlitz.or@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Hadar Hen Zion <hadarh@...lanox.com>,
"David S. Miller" <davem@...emloft.net>,
Linux Netdev List <netdev@...r.kernel.org>,
Jiri Pirko <jiri@...lanox.com>, Jiri Benc <jbenc@...hat.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Shmulik Ladkani <shmulik.ladkani@...il.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
On Thu, Aug 25, 2016 at 8:48 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Thu, 2016-08-25 at 19:13 +0300, Hadar Hen Zion wrote:
>> From: Amir Vadai <amir@...ai.me>
>> +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
Powered by blists - more mailing lists