From: Andre Guedes <andre.guedes@intel.com>
To: netdev@vger.kernel.org
Cc: vinicius.gomes@intel.com
Subject: [PATCH 5/5] net: sched: taprio: Fix taprio_dequeue()
Date: Fri, 19 Apr 2019 17:00:52 -0700 [thread overview]
Message-ID: <20190420000052.4242-6-andre.guedes@intel.com> (raw)
In-Reply-To: <20190420000052.4242-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 110436d11f86..9f361f2b7510 100644
--- a/net/sched/sch_taprio.c
+++ b/net/sched/sch_taprio.c
@@ -180,12 +180,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-20 1:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-20 0:00 [PATCH 0/5] Taprio qdisc fixes Andre Guedes
2019-04-20 0:00 ` [PATCH 1/5] net: sched: taprio: Remove pointless variable assigment Andre Guedes
2019-04-20 0:00 ` [PATCH 2/5] net: sched: taprio: Refactor taprio_get_start_time() Andre Guedes
2019-04-20 0:00 ` [PATCH 3/5] net: sched: taprio: Fix null pointer deref bug Andre Guedes
2019-04-22 18:04 ` Cong Wang
2019-04-22 18:07 ` Cong Wang
2019-04-22 19:21 ` Guedes, Andre
2019-04-22 19:36 ` Cong Wang
2019-04-23 19:21 ` Guedes, Andre
2019-04-23 19:24 ` Cong Wang
2019-04-20 0:00 ` [PATCH 4/5] net: sched: taprio: Fix taprio_peek() Andre Guedes
2019-04-20 0:00 ` Andre Guedes [this message]
2019-04-21 3:46 ` [PATCH 0/5] Taprio qdisc fixes David Miller
2019-04-22 19:18 ` Guedes, Andre
2019-04-23 4:21 ` 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=20190420000052.4242-6-andre.guedes@intel.com \
--to=andre.guedes@intel.com \
--cc=netdev@vger.kernel.org \
--cc=vinicius.gomes@intel.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).