All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rüdiger Scholz" <rscholz@hrzpub.tu-darmstadt.de>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] [PATCH] Prevent loopback traffic to be shown on the network leds
Date: Sat, 19 Jul 2003 13:31:41 +0200	[thread overview]
Message-ID: <3F192C1D.2050701@hrzpub.tu-darmstadt.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

Hi,

looking at the Download page from the ESIEE-Team I found the following 
patch from Thibaut. It filters the traffic from/to the loopback device, 
so network led isn't blinking when accessing the loopback device. 
Should'nt it go into CVS?

Rüdiger

[-- Attachment #2: led.c-diff --]
[-- Type: text/plain, Size: 882 bytes --]

Index: linux/arch/parisc/kernel/led.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/led.c,v
retrieving revision 1.28
diff -u -p -u -r1.28 led.c
--- linux/arch/parisc/kernel/led.c	29 Sep 2002 15:49:20 -0000	1.28
+++ linux/arch/parisc/kernel/led.c	17 Jan 2003 16:02:56 -0000
@@ -365,10 +365,12 @@ static void led_get_net_stats(int addval
 	 * for reading should be OK */
 	read_lock(&dev_base_lock);
 	for (dev = dev_base; dev != NULL; dev = dev->next) {
-	    if (dev->get_stats) { 
-	        stats = dev->get_stats(dev);
-		rx_total += stats->rx_packets;
-		tx_total += stats->tx_packets;
+	    if (!(dev->flags & IFF_LOOPBACK)) {
+		if (dev->get_stats) {
+		    stats = dev->get_stats(dev);
+		    rx_total += stats->rx_packets;
+		    tx_total += stats->tx_packets;
+		}
 	    }
 	}
 	read_unlock(&dev_base_lock);

             reply	other threads:[~2003-07-19 11:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-19 11:31 Rüdiger Scholz [this message]
2003-07-19 12:42 ` [parisc-linux] [PATCH] Prevent loopback traffic to be shown on the network leds Matthew Wilcox
2003-07-21  2:32   ` Thibaut VARENE

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=3F192C1D.2050701@hrzpub.tu-darmstadt.de \
    --to=rscholz@hrzpub.tu-darmstadt.de \
    --cc=parisc-linux@lists.parisc-linux.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.