Commit c19d893f authored by Zhengchao Shao's avatar Zhengchao Shao Committed by Paolo Abeni
Browse files

net: sched: delete duplicate cleanup of backlog and qlen



qdisc_reset() is clearing qdisc->q.qlen and qdisc->qstats.backlog
_after_ calling qdisc->ops->reset. There is no need to clear them
again in the specific reset function.

Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20220824005231.345727-1-shaozhengchao@huawei.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent ff763011
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1137,7 +1137,6 @@ static inline void __qdisc_reset_queue(struct qdisc_skb_head *qh)
static inline void qdisc_reset_queue(struct Qdisc *sch)
{
	__qdisc_reset_queue(&sch->q);
	sch->qstats.backlog = 0;
}

static inline struct Qdisc *qdisc_replace(struct Qdisc *sch, struct Qdisc *new,
+0 −1
Original line number Diff line number Diff line
@@ -577,7 +577,6 @@ static void atm_tc_reset(struct Qdisc *sch)
	pr_debug("atm_tc_reset(sch %p,[qdisc %p])\n", sch, p);
	list_for_each_entry(flow, &p->flows, list)
		qdisc_reset(flow->q);
	sch->q.qlen = 0;
}

static void atm_tc_destroy(struct Qdisc *sch)
+0 −1
Original line number Diff line number Diff line
@@ -975,7 +975,6 @@ cbq_reset(struct Qdisc *sch)
			cl->cpriority = cl->priority;
		}
	}
	sch->q.qlen = 0;
}


+0 −2
Original line number Diff line number Diff line
@@ -315,8 +315,6 @@ static void choke_reset(struct Qdisc *sch)
		rtnl_qdisc_drop(skb, sch);
	}

	sch->q.qlen = 0;
	sch->qstats.backlog = 0;
	if (q->tab)
		memset(q->tab, 0, (q->tab_mask + 1) * sizeof(struct sk_buff *));
	q->head = q->tail = 0;
+0 −2
Original line number Diff line number Diff line
@@ -441,8 +441,6 @@ static void drr_reset_qdisc(struct Qdisc *sch)
			qdisc_reset(cl->qdisc);
		}
	}
	sch->qstats.backlog = 0;
	sch->q.qlen = 0;
}

static void drr_destroy_qdisc(struct Qdisc *sch)
Loading