diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2015-09-29 20:07:13 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-29 20:40:33 -0700 |
commit | 385add906b6155e8bc64035ad56fb8ccfef925f7 (patch) | |
tree | 558ac72668d0b93938f20a7ba08bb7e14b2ac6ed /include | |
parent | ee15ee5d94f5837260e7fa539ffd1b50952079c4 (diff) |
net: Replace vrf_master_ifindex{, _rcu} with l3mdev equivalents
Replace calls to vrf_master_ifindex_rcu and vrf_master_ifindex with either
l3mdev_master_ifindex_rcu or l3mdev_master_ifindex.
The pattern:
oif = vrf_master_ifindex(dev) ? : dev->ifindex;
is replaced with
oif = l3mdev_fib_oif(dev);
And remove the now unused vrf macros.
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/vrf.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/include/net/vrf.h b/include/net/vrf.h index 34bb3f69def2..874a6c9e4217 100644 --- a/include/net/vrf.h +++ b/include/net/vrf.h @@ -34,37 +34,6 @@ struct net_vrf { #if IS_ENABLED(CONFIG_NET_VRF) -/* called with rcu_read_lock() */ -static inline int vrf_master_ifindex_rcu(const struct net_device *dev) -{ - struct net_vrf_dev *vrf_ptr; - int ifindex = 0; - - if (!dev) - return 0; - - if (netif_is_l3_master(dev)) { - ifindex = dev->ifindex; - } else { - vrf_ptr = rcu_dereference(dev->vrf_ptr); - if (vrf_ptr) - ifindex = vrf_ptr->ifindex; - } - - return ifindex; -} - -static inline int vrf_master_ifindex(const struct net_device *dev) -{ - int ifindex; - - rcu_read_lock(); - ifindex = vrf_master_ifindex_rcu(dev); - rcu_read_unlock(); - - return ifindex; -} - /* called with rcu_read_lock */ static inline u32 vrf_dev_table_rcu(const struct net_device *dev) { @@ -139,16 +108,6 @@ static inline struct rtable *vrf_dev_get_rth(const struct net_device *dev) } #else -static inline int vrf_master_ifindex_rcu(const struct net_device *dev) -{ - return 0; -} - -static inline int vrf_master_ifindex(const struct net_device *dev) -{ - return 0; -} - static inline u32 vrf_dev_table_rcu(const struct net_device *dev) { return 0; |