diff options
author | Andre Guedes <andre.guedes@intel.com> | 2019-04-23 22:44:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-24 05:52:32 +0300 |
commit | 2684d1b75f215bdf521064bcbc0015dfca9156e7 (patch) | |
tree | 87600979f6ddba8e2ac49fb397510f2aa410bce8 /net/sched | |
parent | 5175aafe71bfb3fc6a1254a966b0f60e7a46ebba (diff) | |
download | linux-2684d1b75f215bdf521064bcbc0015dfca9156e7.tar.xz |
net: sched: taprio: Fix taprio_peek()
While traversing taprio's children qdisc list, if the gate is closed for
a given traffic class, we should continue traversing the list since the
remaining qdiscs may have skb ready for transmission.
This patch also takes this opportunity and changes the function to use
the TAPRIO_ALL_GATES_OPEN macro instead of the magic number '-1'.
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>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_taprio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 77cca993710a..0df924f87f3e 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -90,7 +90,7 @@ static struct sk_buff *taprio_peek(struct Qdisc *sch) rcu_read_lock(); entry = rcu_dereference(q->current_entry); - gate_mask = entry ? entry->gate_mask : -1; + gate_mask = entry ? entry->gate_mask : TAPRIO_ALL_GATES_OPEN; rcu_read_unlock(); if (!gate_mask) @@ -112,7 +112,7 @@ static struct sk_buff *taprio_peek(struct Qdisc *sch) tc = netdev_get_prio_tc_map(dev, prio); if (!(gate_mask & BIT(tc))) - return NULL; + continue; return skb; } |