[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1508331782.2559.5.camel@redhat.com>
Date: Wed, 18 Oct 2017 15:03:02 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Wei Wang <weiwan@...gle.com>, Eric Dumazet <edumazet@...gle.com>,
Martin KaFai Lau <kafai@...com>,
Xin Long <lucien.xin@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Hannes Frederic Sowa <hannes@...essinduktion.org>
Subject: Re: [PATCH net-next 3/3] ipv6: obsolete cached dst when removing
them from fib tree
On Tue, 2017-10-17 at 13:48 -0700, Wei Wang wrote:
> On Tue, Oct 17, 2017 at 1:02 PM, Paolo Abeni <pabeni@...hat.com> wrote:
> > Meanwhile others sockets may grab more references to (and use) the same
> > aged-out dst.
> >
>
> I don't think other sockets could grab more reference to this dst
> because this dst should already be removed from the fib6 tree.
With the current net-next code, the dst is not removed from the fib
tree while someone else is holding it and dst_check() does not fail
after that the cached dst is aged out. If a socket cache grab a
reference to the CACHE dst, it will not release it untill the next
sernum change, regardless of the dst aging.
> > The commit 1e2ea8ad37be ("ipv6: set dst.obsolete when a cached route
> > has expired") was the solution to the above issue prior to the recent
> > refactor.
> >
>
> I don't really understand how this commit is solving the above issue.
> This commit still only ages out cached route if &rt->dst.__refcnt ==
> 1. So if socket is holding refcnt to this dst and dst_check() is not
> getting called, this cached route still won't get deleted.
Setting obsolete to DST_OBSOLETE_KILL forced whoever was holding the
dst reference to drop it on the next dst_check(), so that refcnt could
go down.
Cheers,
Paolo
Powered by blists - more mailing lists