projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ide: remove write-only ide_pio_data_t.blacklisted
[powerpc.git]
/
net
/
sched
/
sch_hfsc.c
diff --git
a/net/sched/sch_hfsc.c
b/net/sched/sch_hfsc.c
index
6eefa69
..
396deb7
100644
(file)
--- a/
net/sched/sch_hfsc.c
+++ b/
net/sched/sch_hfsc.c
@@
-71,8
+71,6
@@
#include <asm/system.h>
#include <asm/div64.h>
#include <asm/system.h>
#include <asm/div64.h>
-#define HFSC_DEBUG 1
-
/*
* kernel internal service curve representation:
* coordinates are given by 64 bit unsigned integers.
/*
* kernel internal service curve representation:
* coordinates are given by 64 bit unsigned integers.
@@
-211,17
+209,6
@@
do { \
} while (0)
#endif
} while (0)
#endif
-#if HFSC_DEBUG
-#define ASSERT(cond) \
-do { \
- if (unlikely(!(cond))) \
- printk("assertion %s failed at %s:%i (%s)\n", \
- #cond, __FILE__, __LINE__, __FUNCTION__); \
-} while (0)
-#else
-#define ASSERT(cond)
-#endif /* HFSC_DEBUG */
-
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
@@
-284,7
+271,7
@@
static inline struct hfsc_class *
eltree_get_minel(struct hfsc_sched *q)
{
struct rb_node *n;
eltree_get_minel(struct hfsc_sched *q)
{
struct rb_node *n;
-
+
n = rb_first(&q->eligible);
if (n == NULL)
return NULL;
n = rb_first(&q->eligible);
if (n == NULL)
return NULL;
@@
-773,7
+760,7
@@
init_vf(struct hfsc_class *cl, unsigned int len)
/* update the virtual curve */
vt = cl->cl_vt + cl->cl_vtoff;
rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt,
/* update the virtual curve */
vt = cl->cl_vt + cl->cl_vtoff;
rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt,
- cl->cl_total);
+ cl->cl_total);
if (cl->cl_virtual.x == vt) {
cl->cl_virtual.x -= cl->cl_vtoff;
cl->cl_vtoff = 0;
if (cl->cl_virtual.x == vt) {
cl->cl_virtual.x -= cl->cl_vtoff;
cl->cl_vtoff = 0;
@@
-796,10
+783,10
@@
init_vf(struct hfsc_class *cl, unsigned int len)
/* update the ulimit curve */
rtsc_min(&cl->cl_ulimit, &cl->cl_usc, cur_time,
/* update the ulimit curve */
rtsc_min(&cl->cl_ulimit, &cl->cl_usc, cur_time,
- cl->cl_total);
+ cl->cl_total);
/* compute myf */
cl->cl_myf = rtsc_y2x(&cl->cl_ulimit,
/* compute myf */
cl->cl_myf = rtsc_y2x(&cl->cl_ulimit,
- cl->cl_total);
+ cl->cl_total);
cl->cl_myfadj = 0;
}
}
cl->cl_myfadj = 0;
}
}
@@
-853,7
+840,7
@@
update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time)
* update vt and f
*/
cl->cl_vt = rtsc_y2x(&cl->cl_virtual, cl->cl_total)
* update vt and f
*/
cl->cl_vt = rtsc_y2x(&cl->cl_virtual, cl->cl_total)
- - cl->cl_vtoff + cl->cl_vtadj;
+ - cl->cl_vtoff + cl->cl_vtadj;
/*
* if vt of the class is smaller than cvtmin,
/*
* if vt of the class is smaller than cvtmin,
@@
-870,7
+857,7
@@
update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time)
if (cl->cl_flags & HFSC_USC) {
cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit,
if (cl->cl_flags & HFSC_USC) {
cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit,
- cl->cl_total);
+ cl->cl_total);
#if 0
/*
* This code causes classes to stay way under their
#if 0
/*
* This code causes classes to stay way under their
@@
-1001,7
+988,7
@@
hfsc_find_class(u32 classid, struct Qdisc *sch)
static void
hfsc_change_rsc(struct hfsc_class *cl, struct tc_service_curve *rsc,
static void
hfsc_change_rsc(struct hfsc_class *cl, struct tc_service_curve *rsc,
-
u64 cur_time)
+ u64 cur_time)
{
sc2isc(rsc, &cl->cl_rsc);
rtsc_init(&cl->cl_deadline, &cl->cl_rsc, cur_time, cl->cl_cumul);
{
sc2isc(rsc, &cl->cl_rsc);
rtsc_init(&cl->cl_deadline, &cl->cl_rsc, cur_time, cl->cl_cumul);
@@
-1023,7
+1010,7
@@
hfsc_change_fsc(struct hfsc_class *cl, struct tc_service_curve *fsc)
static void
hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc,
static void
hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc,
-
u64 cur_time)
+ u64 cur_time)
{
sc2isc(usc, &cl->cl_usc);
rtsc_init(&cl->cl_ulimit, &cl->cl_usc, cur_time, cl->cl_total);
{
sc2isc(usc, &cl->cl_usc);
rtsc_init(&cl->cl_ulimit, &cl->cl_usc, cur_time, cl->cl_total);
@@
-1032,7
+1019,7
@@
hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc,
static int
hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
static int
hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
-
struct rtattr **tca, unsigned long *arg)
+ struct rtattr **tca, unsigned long *arg)
{
struct hfsc_sched *q = qdisc_priv(sch);
struct hfsc_class *cl = (struct hfsc_class *)*arg;
{
struct hfsc_sched *q = qdisc_priv(sch);
struct hfsc_class *cl = (struct hfsc_class *)*arg;
@@
-1228,9
+1215,9
@@
hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
#ifdef CONFIG_NET_CLS_ACT
switch (result) {
case TC_ACT_QUEUED:
#ifdef CONFIG_NET_CLS_ACT
switch (result) {
case TC_ACT_QUEUED:
- case TC_ACT_STOLEN:
+ case TC_ACT_STOLEN:
*qerr = NET_XMIT_SUCCESS;
*qerr = NET_XMIT_SUCCESS;
- case TC_ACT_SHOT:
+ case TC_ACT_SHOT:
return NULL;
}
#elif defined(CONFIG_NET_CLS_POLICE)
return NULL;
}
#elif defined(CONFIG_NET_CLS_POLICE)
@@
-1259,7
+1246,7
@@
hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
static int
hfsc_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
static int
hfsc_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
-
struct Qdisc **old)
+ struct Qdisc **old)
{
struct hfsc_class *cl = (struct hfsc_class *)arg;
{
struct hfsc_class *cl = (struct hfsc_class *)arg;
@@
-1397,7
+1384,7
@@
hfsc_dump_curves(struct sk_buff *skb, struct hfsc_class *cl)
static int
hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb,
static int
hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb,
-
struct tcmsg *tcm)
+ struct tcmsg *tcm)
{
struct hfsc_class *cl = (struct hfsc_class *)arg;
unsigned char *b = skb->tail;
{
struct hfsc_class *cl = (struct hfsc_class *)arg;
unsigned char *b = skb->tail;
@@
-1492,7
+1479,7
@@
hfsc_schedule_watchdog(struct Qdisc *sch, u64 cur_time)
if (next_time == 0 || next_time > q->root.cl_cfmin)
next_time = q->root.cl_cfmin;
}
if (next_time == 0 || next_time > q->root.cl_cfmin)
next_time = q->root.cl_cfmin;
}
-
ASSERT(next_time !
= 0);
+
WARN_ON(next_time =
= 0);
delay = next_time - cur_time;
delay = PSCHED_US2JIFFIE(delay);
delay = next_time - cur_time;
delay = PSCHED_US2JIFFIE(delay);