From: Thomas Graf <tgraf@suug.ch>
To: jamal <hadi@cyberus.ca>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@oss.sgi.com
Subject: Re: [PKT_SCHED]: Allow using nfmark as key in U32 classifier.
Date: Wed, 29 Dec 2004 13:48:42 +0100 [thread overview]
Message-ID: <20041229124842.GI32419@postel.suug.ch> (raw)
In-Reply-To: <1104282811.1090.314.camel@jzny.localdomain>
* jamal <1104282811.1090.314.camel@jzny.localdomain> 2004-12-28 20:13
> no problem ;-> I think the effort is the same as in doing it the other
> way - only result is more sophisticated. I havent investigated the other
> classifiers - u32 tends to be more complex, so solving it on u32 solves
> all the others typically.
OK, I've changed my mind after some thinking. It's little bit more work
but it's worth it. The ematch TLV contains an array of ematches, every
ematch contains the logic relation to the next (2 bits) and a flag to
invert the meaning (1 bit). A special ematch containing an index exists
to implement precdence.
A AND (B1 OR B2) AND C AND D
------->-PUSH-------
-->-- / -->-- \ -->--
/ \ / / \ \ / \
+-------+-------+-------+-------+-------+--------+
| A AND | B AND | C AND | D END | B1 OR | B2 END |
+-------+-------+-------+-------+-------+--------+
\ /
--------<-POP---------
A simple check that a jump index is never smaller than the current
index (excluding backward jumps via stack) catches endless loop
and avoids the use of a ttl.
> Remember two levels:
> 1) the classifier logical expressions (u32 and rsvp for example) - those
> belong to cls api.
>
> if u32 match .. ... AND rsvp ... OR route ...
> evaluation is left to right with some brute logical OR and ANDs via the
> continue and reclassify codes.
>
> 2) This issue is at a the single classifier/filter level, so its fair to
> push that into the classifier logic. an extended match cannot live by
> itself. Its parasitic on a real classifier - so the scope MUST be
> restricted to classifier as a matter of fact.
Absolutely agreed, I did a context switch without prior warning. ;->
> Or you could have:
> match u32 OR
> (ematch meta nfmark .. or string "...")
> match u32 ..
>
> Recall, the opportunity to do more in terms of logical expressions within u32
> exists because we can introduce more interesting keys ...
We could reuse the 8 unused bits after nkeys in tc_u32sel too. iproute2 sets
them to 0 so we can simply use them without anyone noticing.
> I dont know where you and Patrick are with the code but it think it
> would be safe for me to work off 2610-bk1. Tommorow i am working on some
> e1000 stuff - but day after i should be able to touch the action code.
I'm not touching the action bits but Patrick is as far as I know.
next prev parent reply other threads:[~2004-12-29 12:48 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200412270715.iBR7Fffe026855@hera.kernel.org>
2004-12-27 12:16 ` [PKT_SCHED]: Allow using nfmark as key in U32 classifier Thomas Graf
2004-12-28 13:20 ` jamal
2004-12-28 13:40 ` Thomas Graf
2004-12-28 13:59 ` jamal
2004-12-28 14:50 ` Thomas Graf
2004-12-28 15:55 ` jamal
2004-12-28 16:11 ` Thomas Graf
2004-12-28 16:36 ` jamal
2004-12-28 16:51 ` jamal
2004-12-28 19:26 ` Thomas Graf
2004-12-28 21:14 ` jamal
2004-12-28 22:10 ` Thomas Graf
2004-12-28 23:06 ` jamal
2004-12-28 23:19 ` Thomas Graf
2004-12-28 23:39 ` jamal
2004-12-29 0:09 ` Thomas Graf
2004-12-29 1:13 ` jamal
2004-12-29 12:48 ` Thomas Graf [this message]
2004-12-29 14:20 ` jamal
2004-12-29 15:01 ` Thomas Graf
2004-12-29 15:53 ` jamal
2004-12-30 17:43 ` Thomas Graf
2004-12-31 4:58 ` jamal
2004-12-31 11:08 ` Thomas Graf
2004-12-31 14:59 ` jamal
2004-12-31 15:39 ` Thomas Graf
2004-12-31 16:44 ` jamal
2004-12-31 17:32 ` jamal
2004-12-31 18:11 ` Thomas Graf
2004-12-31 18:19 ` Thomas Graf
2004-12-31 20:51 ` jamal
2005-01-01 12:10 ` Thomas Graf
2005-01-01 23:29 ` jamal
2005-01-02 0:06 ` Thomas Graf
2005-01-03 14:36 ` jamal
2005-01-03 15:02 ` Thomas Graf
2005-01-03 15:55 ` jamal
2005-01-03 16:26 ` Thomas Graf
2005-01-01 18:32 ` Thomas Graf
2005-01-01 23:42 ` jamal
2005-01-02 0:13 ` Thomas Graf
2005-01-03 14:39 ` 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=20041229124842.GI32419@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--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).