> > >An optimization that would be nice, and perhaps this was intended to do this,
> > >is to collapse stuff like: > > > > > > 192.168.3 192.168.2.2 UGSc 0 12 veth6 > > > 192.168.3.2 192.168.2.2 UGHS 0 9 veth6 > > > 192.168.3.4 192.168.2.2 UGHS 0 12 veth6 > > > > > >into the single net route. Found the problem. My code took care of the case where the net route was calculated first and if a host route came up for the same subnet with the same hop, it would skip adding the host route. However, if the host route were added first before the net route, it was a problem. To illustrate the problem, the host route to 3.2 is added on FG1 when the net route was calculated for node 'A' at 7.0 . At this point however, the net route for 3.0 hasn't been defined yet coz that'll come later in the route to dst 'AS1'. Experiment testbed/vroutetest. The solution is to consider adding host routes only after all net routes have been added to the DB. Changes to the code weren't trivial this time. Also, when adding host routes, I add the first one as a net route. If subsequent host routes have the same hop, they'll get skipped. Otherwise, a host route with a longer prefix will take precedence. With all these changes, the number of routes in testbed/vroutetest experiment came down from 361 (> NxN) to 162 (< NxN) where NxN is 289 . Mike, let me know if things are alright after rebooting vnodes in your experiment.
Showing with 113 additions and 79 deletions