Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41951
b: refs/heads/master
c: f973b91
h: refs/heads/master
i:
  41949: 692c9a0
  41947: 2923516
  41943: b6a4a88
  41935: a7698ca
  41919: 0fe4f61
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Dec 3, 2006
1 parent 67d038a commit 81d7c51
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e50da01d0ce7ef0ba3ed6cfabd62f327da0aca6
refs/heads/master: f973b913e18ab5a4795738ddf8a8666ac306ee12
18 changes: 13 additions & 5 deletions trunk/net/sched/sch_hfsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,11 +957,7 @@ hfsc_purge_queue(struct Qdisc *sch, struct hfsc_class *cl)
unsigned int len = cl->qdisc->q.qlen;

qdisc_reset(cl->qdisc);
if (len > 0) {
update_vf(cl, 0, 0);
set_passive(cl);
sch->q.qlen -= len;
}
qdisc_tree_decrease_qlen(cl->qdisc, len);
}

static void
Expand Down Expand Up @@ -1295,6 +1291,17 @@ hfsc_class_leaf(struct Qdisc *sch, unsigned long arg)
return NULL;
}

static void
hfsc_qlen_notify(struct Qdisc *sch, unsigned long arg)
{
struct hfsc_class *cl = (struct hfsc_class *)arg;

if (cl->qdisc->q.qlen == 0) {
update_vf(cl, 0, 0);
set_passive(cl);
}
}

static unsigned long
hfsc_get_class(struct Qdisc *sch, u32 classid)
{
Expand Down Expand Up @@ -1779,6 +1786,7 @@ static struct Qdisc_class_ops hfsc_class_ops = {
.delete = hfsc_delete_class,
.graft = hfsc_graft_class,
.leaf = hfsc_class_leaf,
.qlen_notify = hfsc_qlen_notify,
.get = hfsc_get_class,
.put = hfsc_put_class,
.bind_tcf = hfsc_bind_tcf,
Expand Down

0 comments on commit 81d7c51

Please sign in to comment.