[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1433801588.2014273.290219489.63F713EC@webmail.messagingengine.com>
Date: Tue, 09 Jun 2015 00:13:08 +0200
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: David Miller <davem@...emloft.net>
Cc: Shrijeet Mukherjee <shm@...ulusnetworks.com>,
Nicolas Dichtel <nicolas.dichtel@...nd.com>,
David Ahern <dsahern@...il.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Jamal Hadi Salim <hadi@...atatu.com>,
Stephen Hemminger <stephen@...workplumber.org>,
netdev@...r.kernel.org, roopa@...ulusnetworks.com,
andy gospodarek <gospo@...ulusnetworks.com>,
jtoppins@...ulusnetworks.com, nikolay@...ulusnetworks.com
Subject: Re: [RFC net-next 3/3] rcv path changes for vrf traffic
On Tue, Jun 9, 2015, at 00:05, David Miller wrote:
> 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.
I agree, I was not happy with that either.
It is easy to move the rt_table_id to net_device and use the same one
for IPv6.
This would force people to build symmetric routing configurations. I was
striving for
maximum flexibility first but I don't really think this matters here.
Bye,
Hannes
--
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