| To: | netdev <netdev@xxxxxxxxxxx> |
|---|---|
| Subject: | simple change to qdisc_restart() |
| From: | Eric Lemoine <Eric.Lemoine@xxxxxxx> |
| Date: | Tue, 20 May 2003 10:22:17 +0200 |
| Cc: | Eric.Lemoine@xxxxxxx |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.3.28i |
Hi,
Any comments regarding the following patch?
Thx.
--- sch_generic.c.old Tue May 20 09:11:25 2003
+++ sch_generic.c Tue May 20 10:16:11 2003
@@ -77,6 +77,7 @@
int qdisc_restart(struct net_device *dev)
{
struct Qdisc *q = dev->qdisc;
+ int sched_flag = 1;
struct sk_buff *skb;
/* Dequeue packet */
@@ -120,6 +121,12 @@
printk(KERN_DEBUG "Dead loop on
netdevice %s, fix it urgently!\n", dev->name);
return -1;
}
+
+ /* At this point we know for sure that someone
+ * is taking care of this Qdisc for us so we
+ * do not need to schedule tx softirq.
+ */
+ sched_flag = 0;
netdev_rx_stat[smp_processor_id()].cpu_collision++;
}
@@ -134,7 +141,8 @@
*/
q->ops->requeue(skb, q);
- netif_schedule(dev);
+ if (sched_flag)
+ netif_schedule(dev);
return 1;
}
return q->q.qlen
--
Eric
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] IPv6 IPComp, Mitsuru KANDA / 神田 充 |
|---|---|
| Next by Date: | Re: simple change to qdisc_restart(), David S. Miller |
| Previous by Thread: | the change from spinlock to rcu_read_lock in the bridge code, Bart De Schuymer |
| Next by Thread: | Re: simple change to qdisc_restart(), David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |