Skip to contentSkip to conversation

Routing cache design question

DISCUSSION Oleg A Arkhangelsky 1 participant 1 message May 16, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

Currently I'm studying routing cache on relatively old, pre- 3.6 kernel. I can't understand why in some situations we don't just invalidate routing cache with new genid, but perform explicit full cleanup of all entries? Yes, I understand that this is absolutely necessary when we unregister network device, otherwise kernel will spin inside netdev_wait_allrefs() till rt_check_expire() kill all entries referencing this device. That's too long.

But why is this behavior necessary after, for example, device MTU change, or physical link up/down (NETDEV_CHANGE) event?

Thank you!

--
wbr, Oleg.

"Anarchy is about taking complete responsibility for yourself." Alan Moore.