aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_netem.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-11-14 04:44:41 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:53:58 -0500
commit20fea08b5fb639c4c175b5c74a2bb346c5c5bc2e (patch)
tree3ffa7e1e82051c6772fc2a01d561e4a5a29bb138 /net/sched/sch_netem.c
parent2a8cc6c89039e0530a3335954253b76ed0f9339a (diff)
[NET]: Move Qdisc_class_ops and Qdisc_ops in appropriate sections.
Qdisc_class_ops are const, and Qdisc_ops are mostly read. Using "const" and "__read_mostly" qualifiers helps to reduce false sharing. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r--net/sched/sch_netem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 9e5e87e81f00..6c344ade33c2 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -544,7 +544,7 @@ rtattr_failure:
544 return -1; 544 return -1;
545} 545}
546 546
547static struct Qdisc_ops tfifo_qdisc_ops = { 547static struct Qdisc_ops tfifo_qdisc_ops __read_mostly = {
548 .id = "tfifo", 548 .id = "tfifo",
549 .priv_size = sizeof(struct fifo_sched_data), 549 .priv_size = sizeof(struct fifo_sched_data),
550 .enqueue = tfifo_enqueue, 550 .enqueue = tfifo_enqueue,
@@ -705,7 +705,7 @@ static struct tcf_proto **netem_find_tcf(struct Qdisc *sch, unsigned long cl)
705 return NULL; 705 return NULL;
706} 706}
707 707
708static struct Qdisc_class_ops netem_class_ops = { 708static const struct Qdisc_class_ops netem_class_ops = {
709 .graft = netem_graft, 709 .graft = netem_graft,
710 .leaf = netem_leaf, 710 .leaf = netem_leaf,
711 .get = netem_get, 711 .get = netem_get,
@@ -717,7 +717,7 @@ static struct Qdisc_class_ops netem_class_ops = {
717 .dump = netem_dump_class, 717 .dump = netem_dump_class,
718}; 718};
719 719
720static struct Qdisc_ops netem_qdisc_ops = { 720static struct Qdisc_ops netem_qdisc_ops __read_mostly = {
721 .id = "netem", 721 .id = "netem",
722 .cl_ops = &netem_class_ops, 722 .cl_ops = &netem_class_ops,
723 .priv_size = sizeof(struct netem_sched_data), 723 .priv_size = sizeof(struct netem_sched_data),