netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	"Eric Dumazet" <eric.dumazet@gmail.com>,
	"Martin KaFai Lau" <kafai@fb.com>,
	"David Ahern" <dsahern@kernel.org>,
	"Wei Wang" <weiwan@google.com>,
	"Maciej Żenczykowski" <maze@google.com>
Subject: Re: [PATCH net-next] ipv6: use DST_NOCOUNT in ip6_rt_pcpu_alloc()
Date: Fri, 8 May 2020 08:39:10 -0600	[thread overview]
Message-ID: <362c2030-6e7f-512d-4285-d904b4a433b6@gmail.com> (raw)
In-Reply-To: <20200508143414.42022-1-edumazet@google.com>

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@google.com>
> Cc: Martin KaFai Lau <kafai@fb.com>
> Cc: David Ahern <dsahern@kernel.org>
> Cc: Wei Wang <weiwan@google.com>
> Cc: Maciej Żenczykowski <maze@google.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.

  reply	other threads:[~2020-05-08 14:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 14:34 [PATCH net-next] ipv6: use DST_NOCOUNT in ip6_rt_pcpu_alloc() Eric Dumazet
2020-05-08 14:39 ` David Ahern [this message]
2020-05-08 14:43   ` Eric Dumazet
2020-05-08 15:03     ` David Ahern
2020-05-08 15:13       ` Eric Dumazet
2020-05-08 16:31 ` Wei Wang
2020-05-09  5:34 ` Jakub Kicinski

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=362c2030-6e7f-512d-4285-d904b4a433b6@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kafai@fb.com \
    --cc=maze@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=weiwan@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).