From: Eric Dumazet <eric.dumazet@gmail.com>
To: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
Mahesh Bandewar <maheshb@google.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Subject: [PATCH net-next 1/4] ipv6: get rid of net->ipv6.rt6_stats->fib_rt_uncache
Date: Thu, 10 Feb 2022 13:42:28 -0800 [thread overview]
Message-ID: <20220210214231.2420942-2-eric.dumazet@gmail.com> (raw)
In-Reply-To: <20220210214231.2420942-1-eric.dumazet@gmail.com>
From: Eric Dumazet <edumazet@google.com>
This counter has never been visible, there is little point
trying to maintain it.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
include/net/ip6_fib.h | 3 +--
net/ipv6/route.c | 4 ----
net/ipv6/xfrm6_policy.c | 1 -
3 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 40ae8f1b18e502cece9f11b3a60c9cc30c2e1a5e..32c83bb688798b5c12f8aeea1c66debe866689d8 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -367,9 +367,8 @@ struct rt6_statistics {
__u32 fib_rt_cache; /* cached rt entries in exception table */
__u32 fib_discarded_routes; /* total number of routes delete */
- /* The following stats are not protected by any lock */
+ /* The following stat is not protected by any lock */
atomic_t fib_rt_alloc; /* total number of routes alloced */
- atomic_t fib_rt_uncache; /* rt entries in uncached list */
};
#define RTN_TL_ROOT 0x0001
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f4884cda13b92e72d041680cbabfee2e07ec0f10..53acd1568ebcceb1a1697579ed505cefc7a35a65 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -149,11 +149,9 @@ void rt6_uncached_list_del(struct rt6_info *rt)
{
if (!list_empty(&rt->rt6i_uncached)) {
struct uncached_list *ul = rt->rt6i_uncached_list;
- struct net *net = dev_net(rt->dst.dev);
spin_lock_bh(&ul->lock);
list_del(&rt->rt6i_uncached);
- atomic_dec(&net->ipv6.rt6_stats->fib_rt_uncache);
spin_unlock_bh(&ul->lock);
}
}
@@ -2244,7 +2242,6 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
* if caller sets RT6_LOOKUP_F_DST_NOREF flag.
*/
rt6_uncached_list_add(rt);
- atomic_inc(&net->ipv6.rt6_stats->fib_rt_uncache);
rcu_read_unlock();
return rt;
@@ -3287,7 +3284,6 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
* do proper release of the net_device
*/
rt6_uncached_list_add(rt);
- atomic_inc(&net->ipv6.rt6_stats->fib_rt_uncache);
dst = xfrm_lookup(net, &rt->dst, flowi6_to_flowi(fl6), NULL, 0);
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index fad687ee6dd81af9ee3591eb2333cfed8ceae8ce..55bb2cbae13ddc236e420fae37cd42bbad14d1b2 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -92,7 +92,6 @@ static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
xdst->u.rt6.rt6i_src = rt->rt6i_src;
INIT_LIST_HEAD(&xdst->u.rt6.rt6i_uncached);
rt6_uncached_list_add(&xdst->u.rt6);
- atomic_inc(&dev_net(dev)->ipv6.rt6_stats->fib_rt_uncache);
return 0;
}
--
2.35.1.265.g69c8d7142f-goog
next prev parent reply other threads:[~2022-02-10 21:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 21:42 [PATCH net-next 0/4] ipv6: remove addrconf reliance on loopback Eric Dumazet
2022-02-10 21:42 ` Eric Dumazet [this message]
2022-02-10 21:42 ` [PATCH net-next 2/4] ipv6: give an IPv6 dev to blackhole_netdev Eric Dumazet
2022-02-13 18:05 ` Ido Schimmel
2022-02-13 18:12 ` Eric Dumazet
2022-02-10 21:42 ` [PATCH net-next 3/4] ipv6: add (struct uncached_list)->quarantine list Eric Dumazet
2022-02-10 21:42 ` [PATCH net-next 4/4] ipv4: " Eric Dumazet
2022-02-11 12:00 ` [PATCH net-next 0/4] ipv6: remove addrconf reliance on loopback patchwork-bot+netdevbpf
2022-02-11 23:57 ` Jakub Kicinski
2022-02-12 2:38 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220210214231.2420942-2-eric.dumazet@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=maheshb@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox