Re: [PATCH net-next] docs: net: document neigh gc_interval and gc_stale_time sysctls

From: Gabriel Goller

Date: Mon Feb 23 2026 - 04:56:53 EST


On 20.02.2026 16:43, Jakub Kicinski wrote:
> On Thu, 19 Feb 2026 17:21:58 +0100 Gabriel Goller wrote:
> > +neigh/default/gc_interval - INTEGER
> > + How often the garbage collector for neighbor entries should run. This
> > + value applies to the entire table, not individual entries.
> > +
> > + Default: 30 seconds
>
> AI suggests that this value is not actually currently used
> in our implementation. I can't find any use either, TBH.
> It's read and can be written but it's seemingly not used for anything.

You're right, I'll remove this section.

> > +neigh/default/gc_stale_time - INTEGER
> > + Determines how long a neighbor entry can remain unused before it is
> > + considered stale and eligible for garbage collection. Entries that have
> > + not been used for longer than this time will be removed by the garbage
> > + collector, unless they have active references, are marked as PERMANENT,
> > + or carry the NTF_EXT_LEARNED or NTF_EXT_VALIDATED flag.
> > +
> > + Default: 60 seconds
>
> AI adds:
>
> Important caveat: This check is only reached when total_entries >= gc_thresh1
> (line 1000-1001). Below that threshold, the periodic GC skips the scan
> entirely.
>
> If true I think we should mention that ?

Yes this is true -- I'll mention this in the description.

Thanks for the review!