aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_hfsc.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-03 01:47:37 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:16:38 -0400
commit4bdf39911e7a887c4499161422423cbaf16684e8 (patch)
tree3bf1ac8b4ee1e2682d7aff722d41175a694d41dc /net/sched/sch_hfsc.c
parent876d48aabf30e4981653f1a0a7ae1e262b8c8b6f (diff)
[NET_SCHED]: Remove unnecessary stats_lock pointers
Remove stats_lock pointers from qdisc-internal structures, in all cases it points to dev->queue_lock. The only case where it is necessary is for top-level qdiscs, where it might also point to dev->ingress_lock in case of the ingress qdisc. Also remove it from actions completely, it always points to the actions internal lock. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r--net/sched/sch_hfsc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 7ccdf63a0cb5..7130a2441b0d 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -122,7 +122,6 @@ struct hfsc_class
122 struct gnet_stats_basic bstats; 122 struct gnet_stats_basic bstats;
123 struct gnet_stats_queue qstats; 123 struct gnet_stats_queue qstats;
124 struct gnet_stats_rate_est rate_est; 124 struct gnet_stats_rate_est rate_est;
125 spinlock_t *stats_lock;
126 unsigned int level; /* class level in hierarchy */ 125 unsigned int level; /* class level in hierarchy */
127 struct tcf_proto *filter_list; /* filter list */ 126 struct tcf_proto *filter_list; /* filter list */
128 unsigned int filter_cnt; /* filter count */ 127 unsigned int filter_cnt; /* filter count */
@@ -1056,7 +1055,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
1056 1055
1057 if (tca[TCA_RATE-1]) 1056 if (tca[TCA_RATE-1])
1058 gen_replace_estimator(&cl->bstats, &cl->rate_est, 1057 gen_replace_estimator(&cl->bstats, &cl->rate_est,
1059 cl->stats_lock, tca[TCA_RATE-1]); 1058 &sch->dev->queue_lock,
1059 tca[TCA_RATE-1]);
1060 return 0; 1060 return 0;
1061 } 1061 }
1062 1062
@@ -1096,7 +1096,6 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
1096 cl->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid); 1096 cl->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid);
1097 if (cl->qdisc == NULL) 1097 if (cl->qdisc == NULL)
1098 cl->qdisc = &noop_qdisc; 1098 cl->qdisc = &noop_qdisc;
1099 cl->stats_lock = &sch->dev->queue_lock;
1100 INIT_LIST_HEAD(&cl->children); 1099 INIT_LIST_HEAD(&cl->children);
1101 cl->vt_tree = RB_ROOT; 1100 cl->vt_tree = RB_ROOT;
1102 cl->cf_tree = RB_ROOT; 1101 cl->cf_tree = RB_ROOT;
@@ -1112,7 +1111,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
1112 1111
1113 if (tca[TCA_RATE-1]) 1112 if (tca[TCA_RATE-1])
1114 gen_new_estimator(&cl->bstats, &cl->rate_est, 1113 gen_new_estimator(&cl->bstats, &cl->rate_est,
1115 cl->stats_lock, tca[TCA_RATE-1]); 1114 &sch->dev->queue_lock, tca[TCA_RATE-1]);
1116 *arg = (unsigned long)cl; 1115 *arg = (unsigned long)cl;
1117 return 0; 1116 return 0;
1118} 1117}
@@ -1440,8 +1439,6 @@ hfsc_init_qdisc(struct Qdisc *sch, struct rtattr *opt)
1440 return -EINVAL; 1439 return -EINVAL;
1441 qopt = RTA_DATA(opt); 1440 qopt = RTA_DATA(opt);
1442 1441
1443 sch->stats_lock = &sch->dev->queue_lock;
1444
1445 q->defcls = qopt->defcls; 1442 q->defcls = qopt->defcls;
1446 for (i = 0; i < HFSC_HSIZE; i++) 1443 for (i = 0; i < HFSC_HSIZE; i++)
1447 INIT_LIST_HEAD(&q->clhash[i]); 1444 INIT_LIST_HEAD(&q->clhash[i]);
@@ -1456,7 +1453,6 @@ hfsc_init_qdisc(struct Qdisc *sch, struct rtattr *opt)
1456 sch->handle); 1453 sch->handle);
1457 if (q->root.qdisc == NULL) 1454 if (q->root.qdisc == NULL)
1458 q->root.qdisc = &noop_qdisc; 1455 q->root.qdisc = &noop_qdisc;
1459 q->root.stats_lock = &sch->dev->queue_lock;
1460 INIT_LIST_HEAD(&q->root.children); 1456 INIT_LIST_HEAD(&q->root.children);
1461 q->root.vt_tree = RB_ROOT; 1457 q->root.vt_tree = RB_ROOT;
1462 q->root.cf_tree = RB_ROOT; 1458 q->root.cf_tree = RB_ROOT;