net: sched: taprio: Fix taprio_dequeue()
authorAndre Guedes <andre.guedes@intel.com>
Tue, 23 Apr 2019 19:44:24 +0000 (12:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Apr 2019 02:52:32 +0000 (19:52 -0700)
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: 5a781ccbd19e (“tc: Add support for configuring the taprio scheduler”)
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_taprio.c

index 0df924f87f3eb5dde67d38bdd0db15a4df6fd571..df848a36b222e6920d341aab56ba3b6ab1ba9142 100644 (file)
@@ -188,12 +188,12 @@ static struct sk_buff *taprio_dequeue(struct Qdisc *sch)
                 */
                if (gate_mask != TAPRIO_ALL_GATES_OPEN &&
                    ktime_after(guard, entry->close_time))
-                       return NULL;
+                       continue;
 
                /* ... and no budget. */
                if (gate_mask != TAPRIO_ALL_GATES_OPEN &&
                    atomic_sub_return(len, &entry->budget) < 0)
-                       return NULL;
+                       continue;
 
                skb = child->ops->dequeue(child);
                if (unlikely(!skb))