Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: l3mdev: remove get_rtable method

No longer used

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

David Ahern and committed by
David S. Miller
afb460fe ca28b8f2

-42
-21
drivers/net/vrf.c
··· 843 843 return vrf->tb_id; 844 844 } 845 845 846 - static struct rtable *vrf_get_rtable(const struct net_device *dev, 847 - const struct flowi4 *fl4) 848 - { 849 - struct rtable *rth = NULL; 850 - 851 - if (!(fl4->flowi4_flags & FLOWI_FLAG_L3MDEV_SRC)) { 852 - struct net_vrf *vrf = netdev_priv(dev); 853 - 854 - rcu_read_lock(); 855 - 856 - rth = rcu_dereference(vrf->rth); 857 - if (likely(rth)) 858 - dst_hold(&rth->dst); 859 - 860 - rcu_read_unlock(); 861 - } 862 - 863 - return rth; 864 - } 865 - 866 846 static int vrf_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb) 867 847 { 868 848 return 0; ··· 1068 1088 1069 1089 static const struct l3mdev_ops vrf_l3mdev_ops = { 1070 1090 .l3mdev_fib_table = vrf_fib_table, 1071 - .l3mdev_get_rtable = vrf_get_rtable, 1072 1091 .l3mdev_l3_rcv = vrf_l3_rcv, 1073 1092 .l3mdev_l3_out = vrf_l3_out, 1074 1093 #if IS_ENABLED(CONFIG_IPV6)
-21
include/net/l3mdev.h
··· 23 23 * 24 24 * @l3mdev_l3_out: Hook in L3 output path 25 25 * 26 - * @l3mdev_get_rtable: Get cached IPv4 rtable (dst_entry) for device 27 - * 28 26 * @l3mdev_link_scope_lookup: IPv6 lookup for linklocal and mcast destinations 29 27 */ 30 28 ··· 33 35 struct sk_buff * (*l3mdev_l3_out)(struct net_device *dev, 34 36 struct sock *sk, struct sk_buff *skb, 35 37 u16 proto); 36 - 37 - /* IPv4 ops */ 38 - struct rtable * (*l3mdev_get_rtable)(const struct net_device *dev, 39 - const struct flowi4 *fl4); 40 38 41 39 /* IPv6 ops */ 42 40 struct dst_entry * (*l3mdev_link_scope_lookup)(const struct net_device *dev, ··· 112 118 rcu_read_unlock(); 113 119 114 120 return tb_id; 115 - } 116 - 117 - static inline struct rtable *l3mdev_get_rtable(const struct net_device *dev, 118 - const struct flowi4 *fl4) 119 - { 120 - if (netif_is_l3_master(dev) && dev->l3mdev_ops->l3mdev_get_rtable) 121 - return dev->l3mdev_ops->l3mdev_get_rtable(dev, fl4); 122 - 123 - return NULL; 124 121 } 125 122 126 123 static inline bool netif_index_is_l3_master(struct net *net, int ifindex) ··· 224 239 static inline u32 l3mdev_fib_table_by_index(struct net *net, int ifindex) 225 240 { 226 241 return 0; 227 - } 228 - 229 - static inline struct rtable *l3mdev_get_rtable(const struct net_device *dev, 230 - const struct flowi4 *fl4) 231 - { 232 - return NULL; 233 242 } 234 243 235 244 static inline bool netif_index_is_l3_master(struct net *net, int ifindex)