From: "Timo Teräs" <timo.teras@iki.fi>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/4] xfrm: cache bundles instead of policies for outgoing flows
Date: Tue, 06 Apr 2010 15:55:13 +0300 [thread overview]
Message-ID: <4BBB2F31.7090806@iki.fi> (raw)
In-Reply-To: <20100406124014.GA24412@gondor.apana.org.au>
Herbert Xu wrote:
> On Mon, Apr 05, 2010 at 10:00:22AM +0300, Timo Teras wrote:
>> @@ -623,33 +618,11 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
>> + hlist_for_each_entry_continue(policy, entry, bydst)
>> + atomic_inc(&policy->genid);
>
> Do we still need this since we're invalidating the whole flow
> cache?
>
> The current code is necessary since otherwise the bundles won't
> get freed. But with your new code, this is essentially doing
> nothing, no?
You are right. I completely missed the flushing there. It was
just systematic conversion of deleting the bundles to incrementing
the genid.
Which also makes me think of another issue. The resolver does
not get notice if the genid was outdated. So it might end up
the old policies from bundle after xfrm_policy_insert(). I think
we should explicitly call ops->delete() in flow_cache_lookup if
the flow genid was outdated. (I remember actually doing this,
but also removing it when I was hunting my the one hlist related
corruption bug.)
next prev parent reply other threads:[~2010-04-06 12:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 7:00 [PATCH 0/4] caching bundles, iteration 4 Timo Teras
2010-04-05 7:00 ` [PATCH 1/4] flow: virtualize flow cache entry methods Timo Teras
2010-04-05 8:33 ` Herbert Xu
2010-04-05 8:36 ` Timo Teräs
2010-04-05 8:44 ` Herbert Xu
2010-04-05 8:49 ` Herbert Xu
2010-04-05 8:53 ` Timo Teräs
2010-04-05 9:12 ` Herbert Xu
2010-04-05 17:01 ` Timo Teras
2010-04-06 12:34 ` Herbert Xu
2010-04-06 13:26 ` Timo Teräs
2010-04-07 9:15 ` David Miller
2010-04-05 7:00 ` [PATCH 2/4] xfrm: cache bundles instead of policies for outgoing flows Timo Teras
2010-04-06 12:40 ` Herbert Xu
2010-04-06 12:55 ` Timo Teräs [this message]
2010-04-06 13:11 ` Herbert Xu
2010-04-05 7:00 ` [PATCH 3/4] xfrm: remove policy garbage collection Timo Teras
2010-04-05 7:00 ` [PATCH 4/4] flow: delayed deletion of flow cache entries Timo Teras
-- strict thread matches above, loose matches on Subject: below --
2010-04-07 10:30 [PATCH 0/4] caching bundles, iteration 5 Timo Teras
2010-04-07 10:30 ` [PATCH 2/4] xfrm: cache bundles instead of policies for outgoing flows Timo Teras
2010-04-01 12:52 [PATCH 0/4] caching bundles, iteration 3 Timo Teras
2010-04-01 12:52 ` [PATCH 2/4] xfrm: cache bundles instead of policies for outgoing flows Timo Teras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BBB2F31.7090806@iki.fi \
--to=timo.teras@iki.fi \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.