Commit 68e813aa authored by David Ahern's avatar David Ahern Committed by David S. Miller

net/ipv4: Remove fib table id from rtable

Remove rt_table_id from rtable. It was added for getroute to return the
table id that was hit in the lookup. With the changes for fibmatch the
table id can be extracted from the fib_info returned in the fib_result
so it no longer needs to be in rtable directly.
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 45b3a376
...@@ -736,7 +736,6 @@ static int vrf_rtable_create(struct net_device *dev) ...@@ -736,7 +736,6 @@ static int vrf_rtable_create(struct net_device *dev)
return -ENOMEM; return -ENOMEM;
rth->dst.output = vrf_output; rth->dst.output = vrf_output;
rth->rt_table_id = vrf->tb_id;
rcu_assign_pointer(vrf->rth, rth); rcu_assign_pointer(vrf->rth, rth);
......
...@@ -65,8 +65,6 @@ struct rtable { ...@@ -65,8 +65,6 @@ struct rtable {
/* Miscellaneous cached information */ /* Miscellaneous cached information */
u32 rt_pmtu; u32 rt_pmtu;
u32 rt_table_id;
struct list_head rt_uncached; struct list_head rt_uncached;
struct uncached_list *rt_uncached_list; struct uncached_list *rt_uncached_list;
}; };
......
...@@ -1509,7 +1509,6 @@ struct rtable *rt_dst_alloc(struct net_device *dev, ...@@ -1509,7 +1509,6 @@ struct rtable *rt_dst_alloc(struct net_device *dev,
rt->rt_pmtu = 0; rt->rt_pmtu = 0;
rt->rt_gateway = 0; rt->rt_gateway = 0;
rt->rt_uses_gateway = 0; rt->rt_uses_gateway = 0;
rt->rt_table_id = 0;
INIT_LIST_HEAD(&rt->rt_uncached); INIT_LIST_HEAD(&rt->rt_uncached);
rt->dst.output = ip_output; rt->dst.output = ip_output;
...@@ -1727,8 +1726,6 @@ static int __mkroute_input(struct sk_buff *skb, ...@@ -1727,8 +1726,6 @@ static int __mkroute_input(struct sk_buff *skb,
} }
rth->rt_is_input = 1; rth->rt_is_input = 1;
if (res->table)
rth->rt_table_id = res->table->tb_id;
RT_CACHE_STAT_INC(in_slow_tot); RT_CACHE_STAT_INC(in_slow_tot);
rth->dst.input = ip_forward; rth->dst.input = ip_forward;
...@@ -2001,8 +1998,6 @@ out: return err; ...@@ -2001,8 +1998,6 @@ out: return err;
rth->dst.tclassid = itag; rth->dst.tclassid = itag;
#endif #endif
rth->rt_is_input = 1; rth->rt_is_input = 1;
if (res->table)
rth->rt_table_id = res->table->tb_id;
RT_CACHE_STAT_INC(in_slow_tot); RT_CACHE_STAT_INC(in_slow_tot);
if (res->type == RTN_UNREACHABLE) { if (res->type == RTN_UNREACHABLE) {
...@@ -2231,8 +2226,6 @@ static struct rtable *__mkroute_output(const struct fib_result *res, ...@@ -2231,8 +2226,6 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
return ERR_PTR(-ENOBUFS); return ERR_PTR(-ENOBUFS);
rth->rt_iif = orig_oif; rth->rt_iif = orig_oif;
if (res->table)
rth->rt_table_id = res->table->tb_id;
RT_CACHE_STAT_INC(out_slow_tot); RT_CACHE_STAT_INC(out_slow_tot);
...@@ -2762,7 +2755,7 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, ...@@ -2762,7 +2755,7 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
rt->rt_flags |= RTCF_NOTIFY; rt->rt_flags |= RTCF_NOTIFY;
if (rtm->rtm_flags & RTM_F_LOOKUP_TABLE) if (rtm->rtm_flags & RTM_F_LOOKUP_TABLE)
table_id = rt->rt_table_id; table_id = res.table ? res.table->tb_id : 0;
if (rtm->rtm_flags & RTM_F_FIB_MATCH) { if (rtm->rtm_flags & RTM_F_FIB_MATCH) {
if (!res.fi) { if (!res.fi) {
......
...@@ -100,7 +100,6 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev, ...@@ -100,7 +100,6 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
xdst->u.rt.rt_gateway = rt->rt_gateway; xdst->u.rt.rt_gateway = rt->rt_gateway;
xdst->u.rt.rt_uses_gateway = rt->rt_uses_gateway; xdst->u.rt.rt_uses_gateway = rt->rt_uses_gateway;
xdst->u.rt.rt_pmtu = rt->rt_pmtu; xdst->u.rt.rt_pmtu = rt->rt_pmtu;
xdst->u.rt.rt_table_id = rt->rt_table_id;
INIT_LIST_HEAD(&xdst->u.rt.rt_uncached); INIT_LIST_HEAD(&xdst->u.rt.rt_uncached);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment