Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Цей коміт міститься в:
@@ -286,9 +286,6 @@ static struct Qdisc *qdisc_match_from_root(struct Qdisc *root, u32 handle)
|
||||
void qdisc_hash_add(struct Qdisc *q, bool invisible)
|
||||
{
|
||||
if ((q->parent != TC_H_ROOT) && !(q->flags & TCQ_F_INGRESS)) {
|
||||
struct Qdisc *root = qdisc_dev(q)->qdisc;
|
||||
|
||||
WARN_ON_ONCE(root == &noop_qdisc);
|
||||
ASSERT_RTNL();
|
||||
hash_add_rcu(qdisc_dev(q)->qdisc_hash, &q->hash, q->handle);
|
||||
if (invisible)
|
||||
|
@@ -572,8 +572,10 @@ static void atm_tc_destroy(struct Qdisc *sch)
|
||||
struct atm_flow_data *flow, *tmp;
|
||||
|
||||
pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p);
|
||||
list_for_each_entry(flow, &p->flows, list)
|
||||
list_for_each_entry(flow, &p->flows, list) {
|
||||
tcf_block_put(flow->block);
|
||||
flow->block = NULL;
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(flow, tmp, &p->flows, list) {
|
||||
if (flow->ref > 1)
|
||||
|
@@ -1431,8 +1431,10 @@ static void cbq_destroy(struct Qdisc *sch)
|
||||
* be bound to classes which have been destroyed already. --TGR '04
|
||||
*/
|
||||
for (h = 0; h < q->clhash.hashsize; h++) {
|
||||
hlist_for_each_entry(cl, &q->clhash.hash[h], common.hnode)
|
||||
hlist_for_each_entry(cl, &q->clhash.hash[h], common.hnode) {
|
||||
tcf_block_put(cl->block);
|
||||
cl->block = NULL;
|
||||
}
|
||||
}
|
||||
for (h = 0; h < q->clhash.hashsize; h++) {
|
||||
hlist_for_each_entry_safe(cl, next, &q->clhash.hash[h],
|
||||
|
@@ -1428,6 +1428,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
|
||||
return err;
|
||||
q->eligible = RB_ROOT;
|
||||
|
||||
err = tcf_block_get(&q->root.block, &q->root.filter_list);
|
||||
if (err)
|
||||
goto err_tcf;
|
||||
|
||||
q->root.cl_common.classid = sch->handle;
|
||||
q->root.refcnt = 1;
|
||||
q->root.sched = q;
|
||||
@@ -1447,6 +1451,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
|
||||
qdisc_watchdog_init(&q->watchdog, sch);
|
||||
|
||||
return 0;
|
||||
|
||||
err_tcf:
|
||||
qdisc_class_hash_destroy(&q->clhash);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1522,8 +1530,10 @@ hfsc_destroy_qdisc(struct Qdisc *sch)
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < q->clhash.hashsize; i++) {
|
||||
hlist_for_each_entry(cl, &q->clhash.hash[i], cl_common.hnode)
|
||||
hlist_for_each_entry(cl, &q->clhash.hash[i], cl_common.hnode) {
|
||||
tcf_block_put(cl->block);
|
||||
cl->block = NULL;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < q->clhash.hashsize; i++) {
|
||||
hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i],
|
||||
|
@@ -1258,8 +1258,10 @@ static void htb_destroy(struct Qdisc *sch)
|
||||
tcf_block_put(q->block);
|
||||
|
||||
for (i = 0; i < q->clhash.hashsize; i++) {
|
||||
hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode)
|
||||
hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) {
|
||||
tcf_block_put(cl->block);
|
||||
cl->block = NULL;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < q->clhash.hashsize; i++) {
|
||||
hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i],
|
||||
|
@@ -437,6 +437,7 @@ congestion_drop:
|
||||
qdisc_drop(head, sch, to_free);
|
||||
|
||||
slot_queue_add(slot, skb);
|
||||
qdisc_tree_reduce_backlog(sch, 0, delta);
|
||||
return NET_XMIT_CN;
|
||||
}
|
||||
|
||||
@@ -468,8 +469,10 @@ enqueue:
|
||||
/* Return Congestion Notification only if we dropped a packet
|
||||
* from this flow.
|
||||
*/
|
||||
if (qlen != slot->qlen)
|
||||
if (qlen != slot->qlen) {
|
||||
qdisc_tree_reduce_backlog(sch, 0, dropped - qdisc_pkt_len(skb));
|
||||
return NET_XMIT_CN;
|
||||
}
|
||||
|
||||
/* As we dropped a packet, better let upper stack know this */
|
||||
qdisc_tree_reduce_backlog(sch, 1, dropped);
|
||||
|
Посилання в новій задачі
Заблокувати користувача