From: Hannes Frederic Sowa <han...@stressinduktion.org> Date: Mon, 08 Jun 2015 21:58:37 +0200
> +static inline u32 ipv4_idev_rt_table(const struct net_device *dev) > +{ > + u32 table_id; > + > + rcu_read_lock(); > + table_id = __in_dev_get_rcu(dev)->rt_table_id; > + rcu_read_unlock(); > + > + return table_id != RT_TABLE_UNSPEC ? table_id : RT_TABLE_LOCAL; > +} It's a real shame you have to do all of this RCU locking and inetdev deref, because in more than half of the call sites the idev is already available. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html