Skip to content

Commit

Permalink
pkt_sched: Remove the tx queue state check in qdisc_run()
Browse files Browse the repository at this point in the history
The current check wrongly uses the state of one (currently the first)
tx queue for all tx queues in case of non-default qdiscs. This check
mainly prevented requeuing loop with __netif_schedule(), but now it's
controlled inside __qdisc_run(), while dequeuing. The wrongness of
this check was first noticed by Herbert Xu.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Sep 23, 2008
1 parent cd07a8e commit f4ab543
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions include/net/pkt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ extern void __qdisc_run(struct Qdisc *q);

static inline void qdisc_run(struct Qdisc *q)
{
struct netdev_queue *txq = q->dev_queue;

if (!netif_tx_queue_stopped(txq) &&
!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
__qdisc_run(q);
}

Expand Down

0 comments on commit f4ab543

Please sign in to comment.