[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+d+NSk5VooFn=AHoby5JOJ3=D1oJ1GSKCzp3ZPM1zaLw@mail.gmail.com>
Date: Thu, 18 Apr 2024 11:45:16 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: "Li, James Zheng" <James.Z.Li@...l.com>, Zheng Li <lizheng043@...il.com>,
"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 Thu, Apr 18, 2024 at 11:33 AM Paolo Abeni <pabeni@...hat.com> wrote:
>
> 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?
This seems fine, thanks.
It is unfortunate ip command does not seem to display these
neighbours, for some reason.
(I am about to send a series of three patches to remove RTNL from "ip
neighbour show")
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists