From: Andre Guedes <andre.guedes@intel.com>
To: netdev@vger.kernel.org
Cc: vinicius.gomes@intel.com, xiyou.wangcong@gmail.com
Subject: [PATCH net-next v2 5/5] net: sched: taprio: Fix taprio_dequeue()
Date: Tue, 23 Apr 2019 12:44:24 -0700 [thread overview]
Message-ID: <20190423194424.3155-6-andre.guedes@intel.com> (raw)
In-Reply-To: <20190423194424.3155-1-andre.guedes@intel.com>
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>
---
net/sched/sch_taprio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
index 0df924f87f3e..df848a36b222 100644
--- a/net/sched/sch_taprio.c
+++ b/net/sched/sch_taprio.c
@@ -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))
--
2.21.0
next prev parent reply other threads:[~2019-04-23 20:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 19:44 [PATCH net-next v2 0/5] Taprio qdisc fixes Andre Guedes
2019-04-23 19:44 ` [PATCH net-next v2 1/5] net: sched: taprio: Remove pointless variable assigment Andre Guedes
2019-04-23 19:44 ` [PATCH net-next v2 2/5] net: sched: taprio: Refactor taprio_get_start_time() Andre Guedes
2019-04-23 19:44 ` [PATCH net-next v2 3/5] net: sched: taprio: Remove should_restart_cycle() Andre Guedes
2019-04-23 19:44 ` [PATCH net-next v2 4/5] net: sched: taprio: Fix taprio_peek() Andre Guedes
2019-04-23 19:44 ` Andre Guedes [this message]
2019-04-24 2:52 ` [PATCH net-next v2 0/5] Taprio qdisc fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190423194424.3155-6-andre.guedes@intel.com \
--to=andre.guedes@intel.com \
--cc=netdev@vger.kernel.org \
--cc=vinicius.gomes@intel.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).