You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
pkt_sched: Add peek emulation for non-work-conserving qdiscs.
This patch adds qdisc_peek_dequeued() wrapper to emulate peek method with qdisc->dequeue() and storing "peeked" skb in qdisc->gso_skb until dequeuing. This is mainly for compatibility reasons not to break some strange configs because peeking is expected for non-work-conserving parent qdiscs to query work-conserving child qdiscs. This implementation requires using qdisc_dequeue_peeked() wrapper instead of directly calling qdisc->dequeue() for all qdiscs ever querried with qdisc->ops->peek() or qdisc_peek_dequeued(). Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
03c05f0d4b
commit
77be155cba
+2
-1
@@ -192,7 +192,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch)
|
||||
toks -= L2T(q, len);
|
||||
|
||||
if ((toks|ptoks) >= 0) {
|
||||
skb = q->qdisc->dequeue(q->qdisc);
|
||||
skb = qdisc_dequeue_peeked(q->qdisc);
|
||||
if (unlikely(!skb))
|
||||
return NULL;
|
||||
|
||||
@@ -467,6 +467,7 @@ static struct Qdisc_ops tbf_qdisc_ops __read_mostly = {
|
||||
.priv_size = sizeof(struct tbf_sched_data),
|
||||
.enqueue = tbf_enqueue,
|
||||
.dequeue = tbf_dequeue,
|
||||
.peek = qdisc_peek_dequeued,
|
||||
.requeue = tbf_requeue,
|
||||
.drop = tbf_drop,
|
||||
.init = tbf_init,
|
||||
|
||||
Reference in New Issue
Block a user