On 7/4/18 8:29 PM, David Miller wrote: > From: Ido Schimmel <ido...@mellanox.com> > Date: Thu, 5 Jul 2018 00:10:41 +0300 > >> We can have the IPv4/IPv6 code only generate a REPLACE / DELETE >> notification for routes that are actually used for forwarding and >> relieve listeners from the need to implement this logic themselves. I >> think this should work. > > Whilst this could reduce the duplication, I worry that in the long > term that this might end up being error prone. >
Duplication of data and duplication of logic is not ideal. Especially in this case where the duplication of both is only to handle one case - duplicate routes where only the first is programmed. I suspect it will have to be dealt with at some point (e.g., scaling to a million routes), but right now there are more important factors to deal with - like the rtnl_lock. Something to keep in mind for the future.