1 Index: linux-2.4.35.4/net/sched/sch_htb.c
2 ===================================================================
3 --- linux-2.4.35.4.orig/net/sched/sch_htb.c 2007-12-15 05:19:39.010644128 +0100
4 +++ linux-2.4.35.4/net/sched/sch_htb.c 2007-12-15 05:20:00.751883092 +0100
7 list_for_each (l,q->hash+i) {
8 struct htb_class *cl = list_entry(l,struct htb_class,hlist);
9 - long diff = PSCHED_TDIFF_SAFE(q->now, cl->t_c, (u32)cl->mbuffer, 0);
10 + long long diff = PSCHED_TDIFF_SAFE(q->now, cl->t_c, (u32)cl->mbuffer, 0);
11 printk(KERN_DEBUG "htb*c%x m=%d t=%ld c=%ld pq=%lu df=%ld ql=%d "
13 cl->classid,cl->cmode,cl->tokens,cl->ctokens,
15 * mode transitions per time unit. The speed gain is about 1/6.
17 static __inline__ enum htb_cmode
18 -htb_class_mode(struct htb_class *cl,long *diff)
19 +htb_class_mode(struct htb_class *cl,long long *diff)
24 * to mode other than HTB_CAN_SEND (see htb_add_to_wait_tree).
27 -htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, long *diff)
28 +htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, long long *diff)
30 enum htb_cmode new_mode = htb_class_mode(cl,diff);
33 static void htb_charge_class(struct htb_sched *q,struct htb_class *cl,
39 enum htb_cmode old_mode;
40 HTB_DBG(5,1,"htb_chrg_cl cl=%X lev=%d len=%d\n",cl->classid,level,bytes);
44 if (diff > cl->mbuffer || diff < 0 || PSCHED_TLESS(q->now, cl->t_c)) {
46 - printk(KERN_ERR "HTB: bad diff in charge, cl=%X diff=%lX now=%Lu then=%Lu j=%lu\n",
47 + printk(KERN_ERR "HTB: bad diff in charge, cl=%X diff=%Ld now=%Lu then=%Lu j=%lu\n",
49 (unsigned long long) q->now,
50 (unsigned long long) cl->t_c,
53 HTB_ACCNT (ctokens,cbuffer,ceil);
55 - HTB_DBG(5,2,"htb_chrg_clp cl=%X diff=%ld tok=%ld ctok=%ld\n",cl->classid,diff,cl->tokens,cl->ctokens);
56 + HTB_DBG(5,2,"htb_chrg_clp cl=%X diff=%Ld tok=%ld ctok=%ld\n",cl->classid,diff,cl->tokens,cl->ctokens);
58 old_mode = cl->cmode; diff = 0;
59 htb_change_class_mode(q,cl,&diff);
61 level,q->wait_pq[level].rb_node,q->row_mask[level]);
62 for (i = 0; i < 500; i++) {
66 rb_node_t *p = q->wait_pq[level].rb_node;
68 while (p->rb_left) p = p->rb_left;
71 if (diff > cl->mbuffer || diff < 0 || PSCHED_TLESS(q->now, cl->t_c)) {
73 - printk(KERN_ERR "HTB: bad diff in events, cl=%X diff=%lX now=%Lu then=%Lu j=%lu\n",
74 + printk(KERN_ERR "HTB: bad diff in events, cl=%X diff=%Ld now=%Lu then=%Lu j=%lu\n",
76 (unsigned long long) q->now,
77 (unsigned long long) cl->t_c,