netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Lemoine <Eric.Lemoine@Sun.COM>
To: netdev <netdev@oss.sgi.com>
Cc: Eric.Lemoine@Sun.COM
Subject: simple change to qdisc_restart()
Date: Tue, 20 May 2003 10:22:17 +0200	[thread overview]
Message-ID: <20030520082217.GC978@udine> (raw)

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

             reply	other threads:[~2003-05-20  8:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-20  8:22 Eric Lemoine [this message]
2003-05-20  8:28 ` simple change to qdisc_restart() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030520082217.GC978@udine \
    --to=eric.lemoine@sun.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).