All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] [PATCH] Prevent loopback traffic to be shown on the network leds
@ 2003-07-19 11:31 Rüdiger Scholz
  2003-07-19 12:42 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Rüdiger Scholz @ 2003-07-19 11:31 UTC (permalink / raw)
  To: parisc-linux

[-- 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);

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

end of thread, other threads:[~2003-07-21  3:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-19 11:31 [parisc-linux] [PATCH] Prevent loopback traffic to be shown on the network leds Rüdiger Scholz
2003-07-19 12:42 ` Matthew Wilcox
2003-07-21  2:32   ` Thibaut VARENE

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.