|
@@ -145,6 +145,7 @@ struct sfq_sched_data {
|
|
int perturb_period;
|
|
int perturb_period;
|
|
unsigned int quantum; /* Allotment per round: MUST BE >= MTU */
|
|
unsigned int quantum; /* Allotment per round: MUST BE >= MTU */
|
|
struct timer_list perturb_timer;
|
|
struct timer_list perturb_timer;
|
|
|
|
+ struct Qdisc *sch;
|
|
};
|
|
};
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -604,10 +605,10 @@ drop:
|
|
qdisc_tree_reduce_backlog(sch, dropped, drop_len);
|
|
qdisc_tree_reduce_backlog(sch, dropped, drop_len);
|
|
}
|
|
}
|
|
|
|
|
|
-static void sfq_perturbation(unsigned long arg)
|
|
|
|
|
|
+static void sfq_perturbation(struct timer_list *t)
|
|
{
|
|
{
|
|
- struct Qdisc *sch = (struct Qdisc *)arg;
|
|
|
|
- struct sfq_sched_data *q = qdisc_priv(sch);
|
|
|
|
|
|
+ struct sfq_sched_data *q = from_timer(q, t, perturb_timer);
|
|
|
|
+ struct Qdisc *sch = q->sch;
|
|
spinlock_t *root_lock = qdisc_lock(qdisc_root_sleeping(sch));
|
|
spinlock_t *root_lock = qdisc_lock(qdisc_root_sleeping(sch));
|
|
|
|
|
|
spin_lock(root_lock);
|
|
spin_lock(root_lock);
|
|
@@ -722,8 +723,7 @@ static int sfq_init(struct Qdisc *sch, struct nlattr *opt)
|
|
int i;
|
|
int i;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- setup_deferrable_timer(&q->perturb_timer, sfq_perturbation,
|
|
|
|
- (unsigned long)sch);
|
|
|
|
|
|
+ timer_setup(&q->perturb_timer, sfq_perturbation, TIMER_DEFERRABLE);
|
|
|
|
|
|
err = tcf_block_get(&q->block, &q->filter_list, sch);
|
|
err = tcf_block_get(&q->block, &q->filter_list, sch);
|
|
if (err)
|
|
if (err)
|