From: jamal <hadi@cyberus.ca>
To: mahatma@eu.by
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2.6.23+] ingress classify to [nf]mark
Date: Wed, 16 Jan 2008 07:45:09 -0500 [thread overview]
Message-ID: <1200487509.4457.33.camel@localhost> (raw)
In-Reply-To: <478BE021.1070408@bspu.unibel.by>
On Mon, 2008-14-01 at 20:20 -0200, Dzianis Kahanovich wrote:
> jamal wrote:
[..]
> > Did that make sense?
>
> After current "#endif" - may be.
I am afraid that would be counter to expected behavior.
Default is meant to apply when no value has been defined. Mark of 0 for
example doesnt mean "default". Let me demonstrate with the ifdefs again
with some arbitrary example:
-----------------
#ifdef CONFIG_NET_CLS_ACT
..classify ...
.. action 1 sets mark to 0x11111
.. action 2 checks some state and conditionally let action 3 execute
.. action 3 sets mark to 0
if OK is returned set tc_index based on classid
#else // no actions compiled
..classify
.... jamal suggests: set default mark and tc_index for ingress here
#endif
// mahatma wants to set default for mark and tcindex here
// so it works for both actions and none-action code
------------------------
Lets look at the case of actions compiled in:
I have defined my policies (in user space) so that the mark can be set
to either 0 or 0x1111 depending on some runtime state.
Your default (kernel) code is now going to overide my policy - which is
bad. Even in the case of OK being returned, it is wrong to set tc_index;
unfortunately, we dont have an action that can set tc_index today; if we
did, we would need to remove that setting.
You other intent was to set the value of mark based on the value of
classid. You _can do that today already_ with no changes via a policy in
user space. You suggested to do an ifdef so you wont have to type in the
line which says how to mark, and i said that was a bad idea (we need
less ifdefs not more).
For the case of no actions compiled in:
nothing can write into the values of either tcindex or mark after
classification (on ingress), so it is ok to override. If you did this
for egress as well, that would be wrong because it is expected that some
qdiscs may set or utilize these metadatum.
I am not sure if it made more sense this time?
> What "result" are with:
> 1) no filters?
> 2) 1 filter only, with "action continue"?
Please refer to above verbosity and see if it all makes better sense.
cheers,
jamal
next prev parent reply other threads:[~2008-01-16 12:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 19:05 [PATCH 2.6.23+] ingress classify to [nf]mark Dzianis Kahanovich
2008-01-10 17:29 ` Patrick McHardy
2008-01-11 17:37 ` Dzianis Kahanovich
2008-01-10 21:39 ` jamal
2008-01-11 17:24 ` Dzianis Kahanovich
2008-01-11 14:59 ` jamal
2008-01-11 20:42 ` Dzianis Kahanovich
2008-01-12 3:03 ` jamal
2008-01-12 17:56 ` Dzianis Kahanovich
2008-01-13 19:44 ` jamal
2008-01-14 15:40 ` Dzianis Kahanovich
2008-01-14 12:56 ` jamal
2008-01-14 22:20 ` Dzianis Kahanovich
2008-01-16 12:45 ` jamal [this message]
2008-01-23 0:14 ` Dzianis Kahanovich
2008-01-23 16:42 ` Dzianis Kahanovich
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=1200487509.4457.33.camel@localhost \
--to=hadi@cyberus.ca \
--cc=mahatma@eu.by \
--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 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).