Commit 6e734c82 authored by Andre Guedes's avatar Andre Guedes Committed by David S. Miller

net: sched: taprio: Fix taprio_dequeue()

In case we don't have 'guard' or 'budget' to transmit the skb, we should
continue traversing the qdisc list since the remaining guard/budget
might be enough to transmit a skb from other children qdiscs.

Fixes: 5a781ccb (“tc: Add support for configuring the taprio scheduler”)
Signed-off-by: default avatarAndre Guedes <andre.guedes@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2684d1b7
...@@ -188,12 +188,12 @@ static struct sk_buff *taprio_dequeue(struct Qdisc *sch) ...@@ -188,12 +188,12 @@ static struct sk_buff *taprio_dequeue(struct Qdisc *sch)
*/ */
if (gate_mask != TAPRIO_ALL_GATES_OPEN && if (gate_mask != TAPRIO_ALL_GATES_OPEN &&
ktime_after(guard, entry->close_time)) ktime_after(guard, entry->close_time))
return NULL; continue;
/* ... and no budget. */ /* ... and no budget. */
if (gate_mask != TAPRIO_ALL_GATES_OPEN && if (gate_mask != TAPRIO_ALL_GATES_OPEN &&
atomic_sub_return(len, &entry->budget) < 0) atomic_sub_return(len, &entry->budget) < 0)
return NULL; continue;
skb = child->ops->dequeue(child); skb = child->ops->dequeue(child);
if (unlikely(!skb)) if (unlikely(!skb))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment