diff options
author | Thomas Graf <tgraf@suug.ch> | 2008-11-07 22:56:00 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-07 22:56:00 -0800 |
commit | f400923735ecbb67cbe4a3606c9479f694754f51 (patch) | |
tree | bfe96ecb2860837bf858ceb180c489c931ed74d9 /include | |
parent | 505d4f73dda9e20d59da05008f1f5eb432613e71 (diff) | |
download | blackbird-op-linux-f400923735ecbb67cbe4a3606c9479f694754f51.tar.gz blackbird-op-linux-f400923735ecbb67cbe4a3606c9479f694754f51.zip |
pkt_sched: Control group classifier
The classifier should cover the most common use case and will work
without any special configuration.
The principle of the classifier is to directly access the
task_struct via get_current(). In order for this to work,
classification requests from softirqs must be ignored. This is
not a problem because the vast majority of packets in softirq
context are not assigned to a task anyway. For this to work, a
mechanism is needed to trace softirq context.
This repost goes back to the method of relying on the number of
nested bh disable calls for the sake of not adding too much
complexity and the option to come up with something more reliable
if actually needed.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cgroup_subsys.h | 6 | ||||
-rw-r--r-- | include/linux/pkt_cls.h | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index 9c22396e8b50..9c8d31bacf46 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h @@ -54,3 +54,9 @@ SUBSYS(freezer) #endif /* */ + +#ifdef CONFIG_NET_CLS_CGROUP +SUBSYS(net_cls) +#endif + +/* */ diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index 7cf7824df778..e6aa8482ad7a 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h @@ -394,6 +394,20 @@ enum #define TCA_BASIC_MAX (__TCA_BASIC_MAX - 1) + +/* Cgroup classifier */ + +enum +{ + TCA_CGROUP_UNSPEC, + TCA_CGROUP_ACT, + TCA_CGROUP_POLICE, + TCA_CGROUP_EMATCHES, + __TCA_CGROUP_MAX, +}; + +#define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1) + /* Extended Matches */ struct tcf_ematch_tree_hdr |