Page MenuHomeFreeBSD

Increment the route table gen count after a modify

Authored by rstone on Jan 19 2018, 9:40 PM.



Increment the route table generation count after modifying a
route. This signals back to TCP connections that they need to
update their L2 caches as the gateway for their route may have
changed. This is a heavier hammer than is needed, strictly
speaking, but route changes will be unlikely enough that the
performance effects of invalidating all connection route caches
should be negligible.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Why is this necessary, or desirable? If a route that is cached is modified, that doesn't invalidate it. It should still be the best route if it was before.

I just realized that this is necessary when the L3 gateway changes. The L3 cache doesn't need to be invalidated, but L2 does. A comment to this effect would be helpful.

Add comment explaining generation increment

This revision is now accepted and ready to land.Jan 23 2018, 1:52 AM
This revision was automatically updated to reflect the committed changes.