Message ID | e089df17037a30119909b07d72fb4f15f18325aa.1651800598.git.peilin.ye@bytedance.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: Qdisc backpressure infrastructure | expand |
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index 72102277449e..06229765290b 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c @@ -250,6 +250,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc *sch, } ret = qdisc_enqueue(skb, q->qdisc, to_free); if (ret != NET_XMIT_SUCCESS) { + qdisc_backpressure_overlimit(sch, skb); if (net_xmit_drop_count(ret)) qdisc_qstats_drop(sch); return ret; @@ -306,6 +307,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc *sch) return skb; } + qdisc_backpressure_throttle(sch); qdisc_watchdog_schedule_ns(&q->watchdog, now + max_t(long, -toks, -ptoks));