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: Fri, 11 Jan 2008 09:59:01 -0500 [thread overview]
Message-ID: <1200063541.4483.42.camel@localhost> (raw)
In-Reply-To: <4787A663.4030204@bspu.unibel.by>
On Fri, 2008-11-01 at 15:24 -0200, Dzianis Kahanovich wrote:
> jamal wrote:
> > tc qdisc add dev XXX ingress
> > tc filter add dev XXX parent ffff: protocol ip prio 5 \
> > u32 blah bleh \
> > flowid 1:12 action ipt -j mark --set-mark 13
>
> Yes, I do so. But there are simple:
> ---
> if [[ $[TC_INDEX2MARK] == 0 ]] ; then
> c=${c//action ipt -j MARK --set-mark /flowid :}
> fi
> $c
> ---
I didnt quiet understand what you have above. Does your script above
read the flowid and sets the MARK to some dynamic value based on flowid?
if thats what you are doing - it sounds sensible and much more clever
than what is posted. And it doesnt require any kernel patch.
> Simpliest:
> --- linux-2.6.23-gentoo-r2/net/sched/sch_ingress.c
> +++ linux-2.6.23-gentoo-r2.fixed/net/sched/sch_ingress.c
> @@ -222,6 +222,16 @@
> - skb->tc_index = TC_H_MIN(res.classid);
> + skb->tc_index = TC_H_MIN(mark=res.classid);
Just write a metaset action and you can have all sorts of policies on
what tc_index, mark etc you want. It is something thats needed in any
case.
When we did tc_index it made sense then because it was for "tc" to use
some default policy. Enforcing policies in the kernel is not the best
thing to do; as an example you want to specify the polciy for mark to
be: classid major>>16|minor. I am sure you have good reasons; however,
for the next person who wants to set it it major>>8|minor for their own
good reason, theres conflict.
My offer to help you is still open.
cheers,
jamal
next prev parent reply other threads:[~2008-01-11 14:59 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 [this message]
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
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=1200063541.4483.42.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).