Thread (22 messages) flat view 22 messages, 2 authors, 2012-02-24

Re: [PATCH 0/4] Fix routing metrics

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: 2012-02-08 07:30:40

On Mon, Feb 06, 2012 at 03:29:16PM -0500, David Miller wrote:
Thinking about this, it seems overkill to check this on every metric
access.

You have an opportunity to validate metrics when the peer is bound to
the route.

This is because any change to the FIB metrics, is in turn a change
to the FIB, which therefore invalidates the entire routing cache.

So you can be sure that a new route cache entry will be created, and
at that creation time you can ensure that we'll respect the updated
FIB metrics if encessary.
Not sure if I get you right here, but that's what this patchset
does. It invalidates the metrics on the peer by incrementing
peer_genid in rt_cache_invalidate() which is invoked on every FIB
change. Then, on slowpath route lookup it checks in rt_init_metrics()
whether the peer_genid changed. If it changed, it exchanges the
invalidated merics with new ones and copies the informations from
the FIB into it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help