Skip to content

Commit afb460f

Browse files
David Aherndavem330
authored andcommitted
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>
1 parent ca28b8f commit afb460f

2 files changed

Lines changed: 0 additions & 42 deletions

File tree

‎drivers/net/vrf.c‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -843,26 +843,6 @@ static u32 vrf_fib_table(const struct net_device *dev)
843843
return vrf->tb_id;
844844
}
845845

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-
866846
static int vrf_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
867847
{
868848
return 0;
@@ -1088,7 +1068,6 @@ static struct dst_entry *vrf_link_scope_lookup(const struct net_device *dev,
10881068

10891069
static const struct l3mdev_ops vrf_l3mdev_ops = {
10901070
.l3mdev_fib_table = vrf_fib_table,
1091-
.l3mdev_get_rtable = vrf_get_rtable,
10921071
.l3mdev_l3_rcv = vrf_l3_rcv,
10931072
.l3mdev_l3_out = vrf_l3_out,
10941073
#if IS_ENABLED(CONFIG_IPV6)

‎include/net/l3mdev.h‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
*
2424
* @l3mdev_l3_out: Hook in L3 output path
2525
*
26-
* @l3mdev_get_rtable: Get cached IPv4 rtable (dst_entry) for device
27-
*
2826
* @l3mdev_link_scope_lookup: IPv6 lookup for linklocal and mcast destinations
2927
*/
3028

@@ -36,10 +34,6 @@ struct l3mdev_ops {
3634
struct sock *sk, struct sk_buff *skb,
3735
u16 proto);
3836

39-
/* IPv4 ops */
40-
struct rtable * (*l3mdev_get_rtable)(const struct net_device *dev,
41-
const struct flowi4 *fl4);
42-
4337
/* IPv6 ops */
4438
struct dst_entry * (*l3mdev_link_scope_lookup)(const struct net_device *dev,
4539
struct flowi6 *fl6);
@@ -120,15 +114,6 @@ static inline u32 l3mdev_fib_table(const struct net_device *dev)
120114
return tb_id;
121115
}
122116

123-
static inline struct rtable *l3mdev_get_rtable(const struct net_device *dev,
124-
const struct flowi4 *fl4)
125-
{
126-
if (netif_is_l3_master(dev) && dev->l3mdev_ops->l3mdev_get_rtable)
127-
return dev->l3mdev_ops->l3mdev_get_rtable(dev, fl4);
128-
129-
return NULL;
130-
}
131-
132117
static inline bool netif_index_is_l3_master(struct net *net, int ifindex)
133118
{
134119
struct net_device *dev;
@@ -241,12 +226,6 @@ static inline u32 l3mdev_fib_table_by_index(struct net *net, int ifindex)
241226
return 0;
242227
}
243228

244-
static inline struct rtable *l3mdev_get_rtable(const struct net_device *dev,
245-
const struct flowi4 *fl4)
246-
{
247-
return NULL;
248-
}
249-
250229
static inline bool netif_index_is_l3_master(struct net *net, int ifindex)
251230
{
252231
return false;

0 commit comments

Comments
 (0)