diff mbox

[2/2] IPv6: Warn users when route/max_entries is reached.

Message ID 1289243629-20789-2-git-send-email-greearb@candelatech.com
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

Ben Greear Nov. 8, 2010, 7:13 p.m. UTC
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 a275c6e... 348b34c... M	net/ipv6/route.c
 net/ipv6/route.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

Comments

Ben Greear Nov. 8, 2010, 9:09 p.m. UTC | #1
On 11/08/2010 11:13 AM, Ben Greear wrote:
> Signed-off-by: Ben Greear<greearb@candelatech.com>
> ---
> :100644 100644 a275c6e... 348b34c... M	net/ipv6/route.c
>   net/ipv6/route.c |    6 +++++-
>   1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index a275c6e..348b34c 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -1060,8 +1060,12 @@ static int ip6_dst_gc(struct dst_ops *ops)
>   	unsigned long rt_last_gc = net->ipv6.ip6_rt_last_gc;
>
>   	if (time_after(rt_last_gc + rt_min_interval, now)&&
> -	    atomic_read(&ops->entries)<= rt_max_size)
> +	    atomic_read(&ops->entries)<= rt_max_size) {
> +		if (net_ratelimit())
> +			pr_warning("IPv6:  Maximum number of routes reached,"
> +				   " consider increasing route/max_size.\n");
>   		goto out;
> +	}
>
>   	net->ipv6.ip6_rt_gc_expire++;
>   	fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net);

Please don't apply this.  I mis-read this code and that warning
is useless at best in this place.

Thanks,
Ben
David Miller Nov. 8, 2010, 9:22 p.m. UTC | #2
From: Ben Greear <greearb@candelatech.com>
Date: Mon, 08 Nov 2010 13:09:29 -0800

> On 11/08/2010 11:13 AM, Ben Greear wrote:
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
 ...
> Please don't apply this.  I mis-read this code and that warning
> is useless at best in this place.

Ok.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a275c6e..348b34c 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1060,8 +1060,12 @@  static int ip6_dst_gc(struct dst_ops *ops)
 	unsigned long rt_last_gc = net->ipv6.ip6_rt_last_gc;
 
 	if (time_after(rt_last_gc + rt_min_interval, now) &&
-	    atomic_read(&ops->entries) <= rt_max_size)
+	    atomic_read(&ops->entries) <= rt_max_size) {
+		if (net_ratelimit())
+			pr_warning("IPv6:  Maximum number of routes reached,"
+				   " consider increasing route/max_size.\n");
 		goto out;
+	}
 
 	net->ipv6.ip6_rt_gc_expire++;
 	fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net);