On 4/15/25 2:43 PM, chia-yu.chang@nokia-bell-labs.com wrote:
+static struct sk_buff *dualpi2_qdisc_dequeue(struct Qdisc *sch) +{
- struct dualpi2_sched_data *q = qdisc_priv(sch);
- struct sk_buff *skb;
- int credit_change;
- u64 now;
- now = ktime_get_ns();
- while ((skb = dequeue_packet(sch, q, &credit_change, now))) {
if (!q->drop_early && must_drop(sch, q, skb)) {
drop_and_retry(q, skb, sch,
SKB_DROP_REASON_QDISC_CONGESTED);
continue;
}
if (skb_in_l_queue(skb) && do_step_aqm(q, skb, now)) {
qdisc_qstats_drop(q->l_queue);
drop_and_retry(q, skb, sch,
SKB_DROP_REASON_DUALPI2_STEP_DROP);
continue;
}
q->c_protection.credit += credit_change;
qdisc_bstats_update(sch, skb);
break;
- }
- /* We cannot call qdisc_tree_reduce_backlog() if our qlen is 0,
* or HTB crashes.
*/
- if (q->deferred_drops.cnt && qdisc_qlen(sch)) {
Since commit cd23e77e6568abfac6354dd3f69d5b154e60e342 the qdisc_qlen() check is not needed anymore.
/P