unsigned long flags;
u32 DPs;
u32 def;
- u8 initd;
};
static inline int gred_wred_mode(struct gred_sched *table)
struct gred_sched *t= qdisc_priv(sch);
unsigned long qavg = 0;
int i=0;
- u16 dp;
-
- if (!t->initd && skb_queue_len(&sch->q) < (sch->dev->tx_queue_len ? : 1)) {
- D2PRINTK("NO GRED Queues setup yet! Enqueued anyway\n");
- goto do_enqueue;
- }
-
- dp = tc_index_to_dp(skb);
+ u16 dp = tc_index_to_dp(skb);
if (dp >= t->DPs || (q = t->tab[dp]) == NULL) {
dp = t->def;
if (q->backlog + skb->len <= q->limit) {
q->backlog += skb->len;
-do_enqueue:
return qdisc_enqueue_tail(skb, sch);
}
}
}
- table->initd = 0;
-
return 0;
}
goto errout_locked;
}
- table->initd = 1;
-
if (gred_rio_mode(table)) {
gred_disable_wred_mode(table);
if (gred_wred_mode_check(sch))