Skip to content

Commit 2d4feb2

Browse files
Eric Dumazetdavem330
authored andcommitted
ipv6: get rid of net->ipv6.rt6_stats->fib_rt_uncache
This counter has never been visible, there is little point trying to maintain it. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 926eae6 commit 2d4feb2

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

include/net/ip6_fib.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,8 @@ struct rt6_statistics {
367367
__u32 fib_rt_cache; /* cached rt entries in exception table */
368368
__u32 fib_discarded_routes; /* total number of routes delete */
369369

370-
/* The following stats are not protected by any lock */
370+
/* The following stat is not protected by any lock */
371371
atomic_t fib_rt_alloc; /* total number of routes alloced */
372-
atomic_t fib_rt_uncache; /* rt entries in uncached list */
373372
};
374373

375374
#define RTN_TL_ROOT 0x0001

net/ipv6/route.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,9 @@ void rt6_uncached_list_del(struct rt6_info *rt)
149149
{
150150
if (!list_empty(&rt->rt6i_uncached)) {
151151
struct uncached_list *ul = rt->rt6i_uncached_list;
152-
struct net *net = dev_net(rt->dst.dev);
153152

154153
spin_lock_bh(&ul->lock);
155154
list_del(&rt->rt6i_uncached);
156-
atomic_dec(&net->ipv6.rt6_stats->fib_rt_uncache);
157155
spin_unlock_bh(&ul->lock);
158156
}
159157
}
@@ -2244,7 +2242,6 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
22442242
* if caller sets RT6_LOOKUP_F_DST_NOREF flag.
22452243
*/
22462244
rt6_uncached_list_add(rt);
2247-
atomic_inc(&net->ipv6.rt6_stats->fib_rt_uncache);
22482245
rcu_read_unlock();
22492246

22502247
return rt;
@@ -3287,7 +3284,6 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
32873284
* do proper release of the net_device
32883285
*/
32893286
rt6_uncached_list_add(rt);
3290-
atomic_inc(&net->ipv6.rt6_stats->fib_rt_uncache);
32913287

32923288
dst = xfrm_lookup(net, &rt->dst, flowi6_to_flowi(fl6), NULL, 0);
32933289

net/ipv6/xfrm6_policy.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
9292
xdst->u.rt6.rt6i_src = rt->rt6i_src;
9393
INIT_LIST_HEAD(&xdst->u.rt6.rt6i_uncached);
9494
rt6_uncached_list_add(&xdst->u.rt6);
95-
atomic_inc(&dev_net(dev)->ipv6.rt6_stats->fib_rt_uncache);
9695

9796
return 0;
9897
}

0 commit comments

Comments
 (0)