From: Dzianis Kahanovich <mahatma@bspu.unibel.by>
To: netdev@vger.kernel.org
Subject: [PATCH 2.6.23+] ingress classify to [nf]mark
Date: Thu, 10 Jan 2008 17:05:13 -0200 [thread overview]
Message-ID: <47866C69.3080904@bspu.unibel.by> (raw)
To "classid x:y" = "mark=mark&x|y" ("classid :y" = "-j MARK --set-mark y", etc).
--- linux-2.6.23-gentoo-r2/net/sched/Kconfig
+++ linux-2.6.23-gentoo-r2.fixed/net/sched/Kconfig
@@ -222,6 +222,16 @@
To compile this code as a module, choose M here: the
module will be called sch_ingress.
+config NET_SCH_INGRESS_TC2MARK
+ bool "ingress classify -> mark"
+ depends on NET_SCH_INGRESS && NET_CLS_ACT
+ ---help---
+ This enables access to "mark" value via "classid"
+ Example: set "tc filter ... flowid|classid 1:2"
+ eq "netfilter mark" mark=mark&1|2
+
+ But classid may be undefined (?) - use "flowid :0".
+
comment "Classification"
config NET_CLS
--- linux-2.6.23-gentoo-r2/net/sched/sch_ingress.c
+++ linux-2.6.23-gentoo-r2.fixed/net/sched/sch_ingress.c
@@ -161,2 +161,5 @@
skb->tc_index = TC_H_MIN(res.classid);
+#ifdef CONFIG_NET_SCH_INGRESS_TC2MARK
+ skb->mark = (skb->mark&(res.classid>>16))|TC_H_MIN(res.classid);
+#endif
default:
--
WBR,
Denis Kaganovich, mahatma@eu.by http://mahatma.bspu.unibel.by
next reply other threads:[~2008-01-10 17:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 19:05 Dzianis Kahanovich [this message]
2008-01-10 17:29 ` [PATCH 2.6.23+] ingress classify to [nf]mark 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
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=47866C69.3080904@bspu.unibel.by \
--to=mahatma@bspu.unibel.by \
--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).