[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJW6vhKDYb0t-ntjhSd3oNf=QRhoS0viY3goK4jZu4uCw@mail.gmail.com>
Date: Tue, 1 Oct 2024 14:40:33 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, David Ahern <dsahern@...nel.org>,
Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v1 net-next 3/5] ipv4: Namespacify IPv4 address GC.
On Tue, Oct 1, 2024 at 4:50 AM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> Each IPv4 address could have a lifetime, which is useful for DHCP,
> and GC is periodically executed as check_lifetime_work.
>
> check_lifetime() does the actual GC under RTNL.
>
> 1. Acquire RTNL
> 2. Iterate inet_addr_lst
> 3. Remove IPv4 address if expired
> 4. Release RTNL
>
> Namespacifying the GC is required for per-net RTNL, but using the
> per-net hash table will shorten the time on the hash bucket iteration
> under RTNL.
>
> Let's add per-net GC work and use the per-net hash table.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists