[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150608.150518.424856528462798668.davem@davemloft.net>
Date: Mon, 08 Jun 2015 15:05:18 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: hannes@...essinduktion.org
Cc: shm@...ulusnetworks.com, nicolas.dichtel@...nd.com,
dsahern@...il.com, ebiederm@...ssion.com, hadi@...atatu.com,
stephen@...workplumber.org, netdev@...r.kernel.org,
roopa@...ulusnetworks.com, gospo@...ulusnetworks.com,
jtoppins@...ulusnetworks.com, nikolay@...ulusnetworks.com
Subject: Re: [RFC net-next 3/3] rcv path changes for vrf traffic
From: Hannes Frederic Sowa <hannes@...essinduktion.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists