Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/bonding/bond_main.c drivers/net/via-velocity.c drivers/net/wireless/iwlwifi/iwl-agn.c
This commit is contained in:
@@ -328,13 +328,16 @@ config NET_CLS_FLOW
|
||||
module will be called cls_flow.
|
||||
|
||||
config NET_CLS_CGROUP
|
||||
bool "Control Group Classifier"
|
||||
tristate "Control Group Classifier"
|
||||
select NET_CLS
|
||||
depends on CGROUPS
|
||||
---help---
|
||||
Say Y here if you want to classify packets based on the control
|
||||
cgroup of their process.
|
||||
|
||||
To compile this code as a module, choose M here: the
|
||||
module will be called cls_cgroup.
|
||||
|
||||
config NET_EMATCH
|
||||
bool "Extended Matches"
|
||||
select NET_CLS
|
||||
|
@@ -24,6 +24,25 @@ struct cgroup_cls_state
|
||||
u32 classid;
|
||||
};
|
||||
|
||||
static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss,
|
||||
struct cgroup *cgrp);
|
||||
static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
|
||||
static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp);
|
||||
|
||||
struct cgroup_subsys net_cls_subsys = {
|
||||
.name = "net_cls",
|
||||
.create = cgrp_create,
|
||||
.destroy = cgrp_destroy,
|
||||
.populate = cgrp_populate,
|
||||
#ifdef CONFIG_NET_CLS_CGROUP
|
||||
.subsys_id = net_cls_subsys_id,
|
||||
#else
|
||||
#define net_cls_subsys_id net_cls_subsys.subsys_id
|
||||
#endif
|
||||
.module = THIS_MODULE,
|
||||
};
|
||||
|
||||
|
||||
static inline struct cgroup_cls_state *cgrp_cls_state(struct cgroup *cgrp)
|
||||
{
|
||||
return container_of(cgroup_subsys_state(cgrp, net_cls_subsys_id),
|
||||
@@ -79,14 +98,6 @@ static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
|
||||
return cgroup_add_files(cgrp, ss, ss_files, ARRAY_SIZE(ss_files));
|
||||
}
|
||||
|
||||
struct cgroup_subsys net_cls_subsys = {
|
||||
.name = "net_cls",
|
||||
.create = cgrp_create,
|
||||
.destroy = cgrp_destroy,
|
||||
.populate = cgrp_populate,
|
||||
.subsys_id = net_cls_subsys_id,
|
||||
};
|
||||
|
||||
struct cls_cgroup_head
|
||||
{
|
||||
u32 handle;
|
||||
@@ -277,12 +288,19 @@ static struct tcf_proto_ops cls_cgroup_ops __read_mostly = {
|
||||
|
||||
static int __init init_cgroup_cls(void)
|
||||
{
|
||||
return register_tcf_proto_ops(&cls_cgroup_ops);
|
||||
int ret = register_tcf_proto_ops(&cls_cgroup_ops);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = cgroup_load_subsys(&net_cls_subsys);
|
||||
if (ret)
|
||||
unregister_tcf_proto_ops(&cls_cgroup_ops);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit exit_cgroup_cls(void)
|
||||
{
|
||||
unregister_tcf_proto_ops(&cls_cgroup_ops);
|
||||
cgroup_unload_subsys(&net_cls_subsys);
|
||||
}
|
||||
|
||||
module_init(init_cgroup_cls);
|
||||
|
Reference in New Issue
Block a user