Subject: Re: [PATCH net-next] ipv4/fib: send RTM_DELROUTE notify when flush fib

From: Benjamin Poirier <[email-masked]>
Date: Tue, 8 Aug 2023 14:59:00 -0400

On 2023-08-07 19:44 -0600, David Ahern wrote:
> On 8/2/23 3:10 AM, Thomas Haller wrote:
> > On Fri, 2023-07-28 at 09:42 -0600, David Ahern wrote:
> >> On 7/28/23 7:01 AM, Nicolas Dichtel wrote:
> >>
> >>> Managing a cache with this is not so obvious 😉
> >>
> >>
> >> FRR works well with Linux at this point, 
> > 
> > Interesting. Do you have a bit more information?
> > 
> >> and libnl's caching was updated
> >> ad fixed by folks from Cumulus Networks so it should be a good too.
> > 
> > 
> > Which "libnl" do you mean?
> 
> yes. https://github.com/thom311/libnl.git
> 
> > 
> > Route caching in libnl3 upstream is very broken (which I am to blame
> > for, as I am the maintainer).
> > 
> 
> as someone who sent in patches it worked for all of Cumulus' uses cases
> around 2018-2019 time frame. Can't speak for the status today.
> 

Nowadays Cumulus still relies on an OOT kernel patch almost identical to
Hangbin's.

Looking through an old ticket on the subject, I can see you had indeed
prepared patches to make Cumulus' libnl-using application (switchd)
delete route entries from the libnl cache based on link down events.
Ultimately, those changes were left on the table for two reasons:
1) This would've been the first time for Cumulus that the libnl cache
would be modified by the application instead of in response to netlink
events. Roopa was concerned that there might be race conditions.
2) There was an expectation at the time that Cumulus would move to
switchdev, which would've made switchd and libnl unnecessary.

I brought up the removal of this OOT kernel patch again a few months ago
but there was not enough interest internally. In fact, I was just asked
to add *more* notifications for a similar case, sigh.