From: jamal <hadi@cyberus.ca>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@oss.sgi.com
Subject: Re: patch: policy update by id
Date: Wed, 27 Apr 2005 21:52:20 -0400 [thread overview]
Message-ID: <1114653140.7663.36.camel@localhost.localdomain> (raw)
In-Reply-To: <20050428013014.GA23043@gondor.apana.org.au>
On Thu, 2005-28-04 at 11:30 +1000, Herbert Xu wrote:
> On Thu, Apr 28, 2005 at 11:21:35AM +1000, herbert wrote:
> >
> > I see. In that case you want to change your expression above
> > so that the memcmp is never done if excl is off and the index
> > is non-zero. Otherwise this will result in non-deterministic
> > behaviour as the result will change depending on whether the
> > first hit is an index match or a selector match.
>
> Sorry, the index match needs more work. We need to maintain
> these invariants:
>
> 1) There is only one policy with a given selector.
> 2) There is only one policy with a given index.
>
> So to allow matching by index when updating, we need to deal
> with the possibility of having to delete two existing policies.
> The current code simply can't deal with that.
>
Well, while snooping i was bothered as well. I am not sure i agree with
your #1 above ;->
1) It would seem to me that the priority field is to be used
as a ambiguity resolver (thats what a gazillion other classification
schemes do).
Lets take an example of an add:
If i specify a priority and a selector matches when doing an add, then
the priority being different should allow me to add the rule even if the
selectors match.
Current behavior: We dont allow entering multiple selectors with the
same value even if i specify a different prio.
2) index really oughta be unique across the SPD.
Current behavior: I can add several new rules with the same index.
I realize what i am asking in #2 is the opposite of what i ask for in
#1 - the big unresolved question is: if both selector and index are
going to be keys to manipulating the SPD, then their behavior needs to
be consistent with each other. I really like to see the index being
unique, but the selector being priority disambiguated.
> So if we're going to do this we'll need a bigger patch :)
Lets agree on the principles first ;-> The patch i sent maintains the
status quo.
cheers,
jamal
next prev parent reply other threads:[~2005-04-28 1:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-27 11:54 patch: policy update by id Jamal Hadi Salim
2005-04-27 12:18 ` Patrick McHardy
2005-04-27 12:28 ` Jamal Hadi Salim
2005-04-27 12:52 ` jamal
2005-04-27 12:24 ` jamal
2005-04-27 12:27 ` Jamal Hadi Salim
2005-04-27 23:39 ` Herbert Xu
2005-04-28 1:13 ` jamal
2005-04-28 1:21 ` Herbert Xu
2005-04-28 1:30 ` Herbert Xu
2005-04-28 1:52 ` jamal [this message]
2005-04-28 2:07 ` Herbert Xu
2005-04-28 2:20 ` jamal
2005-04-28 2:22 ` Herbert Xu
2005-04-28 2:29 ` jamal
2005-04-28 2:43 ` David S. Miller
2005-04-28 2:56 ` Herbert Xu
2005-04-28 3:16 ` jamal
2005-04-28 3:20 ` Herbert Xu
2005-04-28 11:43 ` Thomas Graf
2005-04-28 12:09 ` Patrick McHardy
2005-04-28 12:33 ` Thomas Graf
2005-04-28 3:09 ` jamal
2005-04-28 1:44 ` jamal
2005-04-28 1:48 ` Herbert Xu
2005-04-28 1:59 ` jamal
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=1114653140.7663.36.camel@localhost.localdomain \
--to=hadi@cyberus.ca \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).