Re: [PATCH RFC 1/2] flow: virtualize get and entry deletion methods

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: =?ISO-8859-1?Q?Timo_Ter=E4s?=
Date: Monday, March 29, 2010 - 2:00 am

Herbert Xu wrote:

No, just having the flush call is not enough to guarantee
liveliness. The flushing happens in delayed work, and the flows
might be in use before the flush has been finished or even
started.

I was also hoping to move the "delayed" deletion part to
flow cache core so the code would be shared with policies and
bundles.

As stated before, we don't really need lock for the 'dead' check.
It's only written once, and actually read without lock in some
other places too. And all the other places that do take the lock,
release it right away making the resulting dead check result
"old" anyway. 

Looks to me that the whole policy locking is not up-to-date
anymore. Apparently the only place that actually needs it is
the migration code (which just happens to be broke anyway since
bundle creation does not take read lock). But it could be
relatively easily changed to replace policy with new
templates... and the whole policy stuff converted to RCU.

However, now that I've almost done the code ready. I'm thinking
if this is such a good idea or not. I was hoping to have bundles
always in the flow cache, but it's not sufficient. In case we
have socket bound policy that results in a bundle, we might need
create bundles outside the flow cache.

It turns out the generic flow cache might not be so easily
done that could host bundles and policies. Or at least the
shared code would not be as much as hoped for. Given that it
makes also sense to store other objects for outgoing stuff
(we might need reference to multiple policies if matching
a sub and main policy), it might be a consideration to make
the flow cache specialized to contain those objects. Or do
we have other possible users for the flow cache?

- Timo
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC 0/2] caching bundles instead of policies, Timo Teras, (Thu Mar 25, 2:24 am)
Re: [PATCH RFC 1/2] flow: virtualize get and entry deletio ..., =?ISO-8859-1?Q?Timo_ ..., (Thu Mar 25, 11:17 pm)
Re: [PATCH RFC 1/2] flow: virtualize get and entry deletio ..., =?ISO-8859-1?Q?Timo_ ..., (Mon Mar 29, 2:00 am)
Re: [PATCH RFC 1/2] flow: virtualize get and entry deletio ..., =?ISO-8859-1?Q?Timo_ ..., (Mon Mar 29, 3:07 am)
Re: [PATCH RFC 1/2] flow: virtualize get and entry deletio ..., =?ISO-8859-1?Q?Timo_ ..., (Mon Mar 29, 3:36 am)
Re: [PATCH RFC 1/2] flow: virtualize get and entry deletio ..., =?ISO-8859-1?Q?Timo_ ..., (Mon Mar 29, 4:23 am)
Re: [PATCH RFC 1/2] flow: virtualize get and entry deletio ..., =?ISO-8859-1?Q?Timo_ ..., (Mon Mar 29, 4:39 am)
Re: [PATCH RFC 1/2] flow: virtualize get and entry deletio ..., =?ISO-8859-1?Q?Timo_ ..., (Mon Mar 29, 5:03 am)
Re: [PATCH RFC 1/2] flow: virtualize get and entry deletio ..., =?ISO-8859-1?Q?Timo_ ..., (Mon Mar 29, 5:20 am)
Re: [PATCH RFC 1/2] flow: virtualize get and entry deletio ..., =?ISO-8859-1?Q?Timo_ ..., (Mon Mar 29, 5:33 am)