Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55968
b: refs/heads/master
c: 41a23b0
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed May 11, 2007
1 parent 0b8d712 commit 605b802
Show file tree
Hide file tree
Showing 2 changed files with 9 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: cce1fa36a8ed36e8a3f64455e2a830f48e904c64
refs/heads/master: 41a23b0788610b27ecb4c4ee857f3fe7168f1070
18 changes: 8 additions & 10 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ static inline int qdisc_restart(struct net_device *dev)
*/

requeue:
if (skb->next)
if (unlikely(q == &noop_qdisc))
kfree_skb(skb);
else if (skb->next)
dev->gso_skb = skb;
else
q->ops->requeue(skb, q);
Expand All @@ -177,15 +179,11 @@ static inline int qdisc_restart(struct net_device *dev)

void __qdisc_run(struct net_device *dev)
{
if (unlikely(dev->qdisc == &noop_qdisc))
goto out;

do {
if (!qdisc_restart(dev))
break;
} while (!netif_queue_stopped(dev));

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

Expand Down Expand Up @@ -547,15 +545,20 @@ void dev_activate(struct net_device *dev)
void dev_deactivate(struct net_device *dev)
{
struct Qdisc *qdisc;
struct sk_buff *skb;

spin_lock_bh(&dev->queue_lock);
qdisc = dev->qdisc;
dev->qdisc = &noop_qdisc;

qdisc_reset(qdisc);

skb = dev->gso_skb;
dev->gso_skb = NULL;
spin_unlock_bh(&dev->queue_lock);

kfree_skb(skb);

dev_watchdog_down(dev);

/* Wait for outstanding dev_queue_xmit calls. */
Expand All @@ -564,11 +567,6 @@ void dev_deactivate(struct net_device *dev)
/* Wait for outstanding qdisc_run calls. */
while (test_bit(__LINK_STATE_QDISC_RUNNING, &dev->state))
yield();

if (dev->gso_skb) {
kfree_skb(dev->gso_skb);
dev->gso_skb = NULL;
}
}

void dev_init_scheduler(struct net_device *dev)
Expand Down

0 comments on commit 605b802

Please sign in to comment.