]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/net/vrf.h
net: Replace vrf_master_ifindex{, _rcu} with l3mdev equivalents
[mirror_ubuntu-artful-kernel.git] / include / net / vrf.h
index 593e6094ddd40c19d21ece418b038a8de5d54d93..874a6c9e42171291e374825be441a64e2a26b00c 100644 (file)
@@ -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_vrf(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)
 {
@@ -125,7 +94,7 @@ static inline u32 vrf_dev_table_rtnl(const struct net_device *dev)
        return tb_id;
 }
 
-/* caller has already checked netif_is_vrf(dev) */
+/* caller has already checked netif_is_l3_master(dev) */
 static inline struct rtable *vrf_dev_get_rth(const struct net_device *dev)
 {
        struct rtable *rth = ERR_PTR(-ENETUNREACH);
@@ -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;