[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3f487ef495da476e5b0564dbb024dca54e8bee10.camel@redhat.com>
Date: Thu, 18 Apr 2024 11:33:46 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: "Li, James Zheng" <James.Z.Li@...l.com>, Eric Dumazet
<edumazet@...gle.com>, Zheng Li <lizheng043@...il.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "bpf@...r.kernel.org"
<bpf@...r.kernel.org>, "davem@...emloft.net" <davem@...emloft.net>,
"jmorris@...ei.org"
<jmorris@...ei.org>, "kuba@...nel.org" <kuba@...nel.org>
Subject: Re: [PATCH] neighbour: guarantee the localhost connections be
established successfully even the ARP table is full
On Tue, 2024-04-16 at 10:36 +0000, Li, James Zheng wrote:
> On Tuesday, April 16, 2024 6:02 PM Eric Dumazet <edumazet@...gle.com> wrote:
> > Hmmm...
>
> > Loopback IPv4 can hold 2^24 different addresses, that is 16384 * 1024
>
> There is only one Loopback neigh "0.0.0.0 dev lo lladdr 00:00:00:00:00:00 NOARP"
> existing even you have configured 2^24 different addresses on the loopback device.
Eric, I think James is right, in __ipv4_neigh_lookup_noref():
if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))
key = INADDR_ANY;
return ___neigh_lookup_noref(&arp_tbl, neigh_key_eq32, arp_hashfn, &key, dev);
So there should be at most one neigh entry over the loopback device.
The patch looks safe to me, am I missing something?
Thanks,
Paolo
Powered by blists - more mailing lists