[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a5f381b0-e2bf-05f9-a849-d9d45aa38212@gmail.com>
Date: Fri, 8 May 2020 07:43:30 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Ahern <dsahern@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
"David S . Miller" <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Martin KaFai Lau <kafai@...com>,
David Ahern <dsahern@...nel.org>, Wei Wang <weiwan@...gle.com>,
Maciej Żenczykowski <maze@...gle.com>
Subject: Re: [PATCH net-next] ipv6: use DST_NOCOUNT in ip6_rt_pcpu_alloc()
On 5/8/20 7:39 AM, David Ahern wrote:
> On 5/8/20 8:34 AM, Eric Dumazet wrote:
>> We currently have to adjust ipv6 route gc_thresh/max_size depending
>> on number of cpus on a server, this makes very little sense.
>>
>> If the kernels sets /proc/sys/net/ipv6/route/gc_thresh to 1024
>> and /proc/sys/net/ipv6/route/max_size to 4096, then we better
>> not track the percpu dst that our implementation uses.
>>
>> Only routes not added (directly or indirectly) by the admin
>> should be tracked and limited.
>>
>> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
>> Cc: Martin KaFai Lau <kafai@...com>
>> Cc: David Ahern <dsahern@...nel.org>
>> Cc: Wei Wang <weiwan@...gle.com>
>> Cc: Maciej Żenczykowski <maze@...gle.com>
>> ---
>> net/ipv6/route.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>> index a9072dba00f4fb0b61bce1fc0f44a3a81ba702fa..4292653af533bb641ae8571fffe45b39327d0380 100644
>> --- a/net/ipv6/route.c
>> +++ b/net/ipv6/route.c
>> @@ -1377,7 +1377,7 @@ static struct rt6_info *ip6_rt_pcpu_alloc(const struct fib6_result *res)
>>
>> rcu_read_lock();
>> dev = ip6_rt_get_dev_rcu(res);
>> - pcpu_rt = ip6_dst_alloc(dev_net(dev), dev, flags);
>> + pcpu_rt = ip6_dst_alloc(dev_net(dev), dev, flags | DST_NOCOUNT);
>> rcu_read_unlock();
>> if (!pcpu_rt) {
>> fib6_info_release(f6i);
>>
>
> At this point in IPv6's evolution it seems like it can align more with
> IPv4 and just get rid of the dst limits completely.
>
This patch can be backported without any pains ;)
Getting rid of limits, even for exceptions ?
Powered by blists - more mailing lists