Page MenuHomeFreeBSD

Increment the route table gen count after a modify
ClosedPublic

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

Details

Summary

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

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

rstone created this revision.Jan 19 2018, 9:40 PM

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.

rstone updated this revision to Diff 38315.Jan 22 2018, 4:16 PM

Add comment explaining generation increment

karels accepted this revision.Jan 23 2018, 1:52 AM

Looks good.

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.