[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.10.1312130948220.2431@ja.home.ssi.bg>
Date: Fri, 13 Dec 2013 09:53:52 +0200 (EET)
From: Julian Anastasov <ja@....bg>
To: Tom Herbert <therbert@...gle.com>
cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] net: Cache route in IP tunnels
Hello,
On Wed, 11 Dec 2013, Tom Herbert wrote:
> +static inline void
> +tunnel_dst_set(struct ip_tunnel *t, struct dst_entry *dst)
> +{
> + struct dst_entry *old_dst;
> +
> + spin_lock(&t->dst_lock);
> + old_dst = rcu_dereference_raw(t->dst_cache);
> + rcu_assign_pointer(t->dst_cache, dst);
> + dst_release(old_dst);
> + spin_unlock(&t->dst_lock);
It seems the func is also called by ip_tunnel_update(),
do we need _bh locks in such case?
> +}
> +
> +static inline void
> +tunnel_dst_reset(struct ip_tunnel *t)
> +{
> + tunnel_dst_set(t, NULL);
> +}
> +
...
> @@ -696,6 +750,7 @@ static void ip_tunnel_update(struct ip_tunnel_net *itn,
> if (set_mtu)
> dev->mtu = mtu;
> }
> + tunnel_dst_reset(t);
> netdev_state_change(dev);
> }
Regards
--
Julian Anastasov <ja@....bg>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists