Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55966
b: refs/heads/master
c: d90df3a
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed May 11, 2007
1 parent 7edf76f commit de0d104
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5830725f8a36908111ecccf2899d06d6dcf54d45
refs/heads/master: d90df3ad07a20cd93921e05ff2b12ca7030b4fd7
21 changes: 11 additions & 10 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,9 @@ void qdisc_unlock_tree(struct net_device *dev)


/* Kick device.
Note, that this procedure can be called by a watchdog timer, so that
we do not check dev->tbusy flag here.
Returns: 0 - queue is empty.
>0 - queue is not empty, but throttled.
<0 - queue is not empty. Device is throttled, if dev->tbusy != 0.
Returns: 0 - queue is empty or throttled.
>0 - queue is not empty.
NOTE: Called under dev->queue_lock with locally disabled BH.
*/
Expand Down Expand Up @@ -115,7 +112,7 @@ static inline int qdisc_restart(struct net_device *dev)
kfree_skb(skb);
if (net_ratelimit())
printk(KERN_DEBUG "Dead loop on netdevice %s, fix it urgently!\n", dev->name);
return -1;
goto out;
}
__get_cpu_var(netdev_rx_stat).cpu_collision++;
goto requeue;
Expand All @@ -135,7 +132,7 @@ static inline int qdisc_restart(struct net_device *dev)
netif_tx_unlock(dev);
}
spin_lock(&dev->queue_lock);
return -1;
goto out;
}
if (ret == NETDEV_TX_LOCKED && nolock) {
spin_lock(&dev->queue_lock);
Expand Down Expand Up @@ -169,8 +166,10 @@ static inline int qdisc_restart(struct net_device *dev)
else
q->ops->requeue(skb, q);
netif_schedule(dev);
return 1;
return 0;
}

out:
BUG_ON((int) q->q.qlen < 0);
return q->q.qlen;
}
Expand All @@ -180,8 +179,10 @@ void __qdisc_run(struct net_device *dev)
if (unlikely(dev->qdisc == &noop_qdisc))
goto out;

while (qdisc_restart(dev) < 0 && !netif_queue_stopped(dev))
/* NOTHING */;
do {
if (!qdisc_restart(dev))
break;
} while (!netif_queue_stopped(dev));

out:
clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
Expand Down

0 comments on commit de0d104

Please sign in to comment.