]> git.baikalelectronics.ru Git - kernel.git/commit
flow: virtualize flow cache entry methods
authorTimo Teräs <timo.teras@iki.fi>
Wed, 7 Apr 2010 00:30:04 +0000 (00:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Apr 2010 10:43:18 +0000 (03:43 -0700)
commit913f573b0c27302fa25c470900fc3ad47e60140c
treec74392cef02c1529b00df6c5d0b8f4239fe091c3
parent52335e9c108aa235cdc17cf0c19e9664f6e21f18
flow: virtualize flow cache entry methods

This allows to validate the cached object before returning it.
It also allows to destruct object properly, if the last reference
was held in flow cache. This is also a prepartion for caching
bundles in the flow cache.

In return for virtualizing the methods, we save on:
- not having to regenerate the whole flow cache on policy removal:
  each flow matching a killed policy gets refreshed as the getter
  function notices it smartly.
- we do not have to call flow_cache_flush from policy gc, since the
  flow cache now properly deletes the object if it had any references

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/flow.h
include/net/xfrm.h
net/core/flow.c
net/xfrm/xfrm_policy.c