Skip to content

Commit

Permalink
net/sched: taprio: continue with other TXQs if one dequeue() failed
Browse files Browse the repository at this point in the history
This changes the handling of an unlikely condition to not stop dequeuing
if taprio failed to dequeue the peeked skb in taprio_dequeue().

I've no idea when this can happen, but the only side effect seems to be
that the atomic_sub_return() call right above will have consumed some
budget. This isn't a big deal, since either that made us remain without
any budget (and therefore, we'd exit on the next peeked skb anyway), or
we could send some packets from other TXQs.

I'm making this change because in a future patch I'll be refactoring the
dequeue procedure to simplify it, and this corner case will have to go
away.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladimir Oltean authored and David S. Miller committed Feb 8, 2023
1 parent ecc0cc9 commit 1638bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_taprio.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ static struct sk_buff *taprio_dequeue(struct Qdisc *sch)

skb = child->ops->dequeue(child);
if (unlikely(!skb))
goto done;
continue;

skb_found:
qdisc_bstats_update(sch, skb);
Expand Down

0 comments on commit 1638bbb

Please sign in to comment.