* [PATCH net-next] net: add a route cache full diagnostic message
@ 2019-01-16 16:50 Peter Oskolkov
2019-01-17 23:38 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Peter Oskolkov @ 2019-01-16 16:50 UTC (permalink / raw)
To: David Miller, netdev; +Cc: Peter Oskolkov, Peter Oskolkov
In some testing scenarios, dst/route cache can fill up so quickly
that even an explicit GC call occasionally fails to clean it up. This leads
to sporadically failing calls to dst_alloc and "network unreachable" errors
to the user, which is confusing.
This patch adds a diagnostic message to make the cause of the failure
easier to determine.
Signed-off-by: Peter Oskolkov <posk@google.com>
---
net/core/dst.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/core/dst.c b/net/core/dst.c
index 81ccf20e2826..a263309df115 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -98,8 +98,12 @@ void *dst_alloc(struct dst_ops *ops, struct net_device *dev,
struct dst_entry *dst;
if (ops->gc && dst_entries_get_fast(ops) > ops->gc_thresh) {
- if (ops->gc(ops))
+ if (ops->gc(ops)) {
+ printk_ratelimited(KERN_NOTICE "Route cache is full: "
+ "consider increasing sysctl "
+ "net.ipv[4|6].route.max_size.\n");
return NULL;
+ }
}
dst = kmem_cache_alloc(ops->kmem_cachep, GFP_ATOMIC);
--
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: add a route cache full diagnostic message
2019-01-16 16:50 [PATCH net-next] net: add a route cache full diagnostic message Peter Oskolkov
@ 2019-01-17 23:38 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-01-17 23:38 UTC (permalink / raw)
To: posk; +Cc: netdev, posk.devel
From: Peter Oskolkov <posk@google.com>
Date: Wed, 16 Jan 2019 08:50:28 -0800
> In some testing scenarios, dst/route cache can fill up so quickly
> that even an explicit GC call occasionally fails to clean it up. This leads
> to sporadically failing calls to dst_alloc and "network unreachable" errors
> to the user, which is confusing.
>
> This patch adds a diagnostic message to make the cause of the failure
> easier to determine.
>
> Signed-off-by: Peter Oskolkov <posk@google.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-17 23:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-16 16:50 [PATCH net-next] net: add a route cache full diagnostic message Peter Oskolkov
2019-01-17 23:38 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).