• Timo Teräs's avatar
    flow: virtualize flow cache entry methods · fe1a5f03
    Timo Teräs authored
    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: default avatarTimo Teras <timo.teras@iki.fi>
    Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    fe1a5f03
flow.c 9.1 KB