netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* simple change to qdisc_restart()
@ 2003-05-20  8:22 Eric Lemoine
  2003-05-20  8:28 ` David S. Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Lemoine @ 2003-05-20  8:22 UTC (permalink / raw)
  To: netdev; +Cc: Eric.Lemoine

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-05-26  9:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-20  8:22 simple change to qdisc_restart() Eric Lemoine
2003-05-20  8:28 ` David S. Miller
2003-05-20  8:57   ` Eric Lemoine
2003-05-20 10:36     ` Robert Olsson
2003-05-20 11:21       ` Eric Lemoine
2003-05-20 11:24         ` Eric Lemoine
2003-05-20 12:24         ` Robert Olsson
2003-05-20 12:33           ` Jamal Hadi
2003-05-26  9:15             ` Eric Lemoine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).