public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@in.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>, linux-net@vger.kernel.org
Subject: [rfc] [patch] Qdisc drops not being reported
Date: Mon, 2 Sep 2002 16:58:53 +0530	[thread overview]
Message-ID: <20020902165853.B21589@in.ibm.com> (raw)

Hi,
The Qdisc drops does not seem to be reported to user space for the
default queuing discipline -- pfifo_fast_ops.  I ran isic tests on a up
to test if the drops happen at all, and yes there were significant no of
packets dropped under heavy tx load.  Here is a patch which reports just 
the qdisc drops to the /proc/net/dev entry.  Does this sound like a 
good idea?

Comments welcome.  

-Kiran



diff -X dontdiff -ruN linux-2.5.31/include/asm-i386/mmu.h statctr-2.5.31/include/asm-i386/mmu.h
--- linux-2.5.31/include/asm-i386/mmu.h	Sun Aug 11 07:11:42 2002
+++ statctr-2.5.31/include/asm-i386/mmu.h	Wed Aug 21 12:40:35 2002
@@ -1,6 +1,8 @@
 #ifndef __i386_MMU_H
 #define __i386_MMU_H
 
+#include <asm/semaphore.h>
+
 /*
  * The i386 doesn't have a mmu context, but
  * we put the segment information here.
diff -X dontdiff -ruN linux-2.5.31/net/core/dev.c statctr-2.5.31/net/core/dev.c
--- linux-2.5.31/net/core/dev.c	Sun Aug 11 07:11:30 2002
+++ statctr-2.5.31/net/core/dev.c	Wed Aug 21 17:57:24 2002
@@ -1746,10 +1746,12 @@
 							  NULL;
 	int size;
 
+	struct Qdisc *q = dev->qdisc;
+
 	if (stats)
 		size = sprintf(buffer, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu "
 				       "%10lu %9lu %8lu %7lu %4lu %4lu %4lu "
-				       "%5lu %7lu %10lu\n",
+				       "%5lu %7lu %10lu %10u\n",
  		   dev->name,
 		   stats->rx_bytes,
 		   stats->rx_packets, stats->rx_errors,
@@ -1763,7 +1765,8 @@
 		   stats->tx_fifo_errors, stats->collisions,
 		   stats->tx_carrier_errors + stats->tx_aborted_errors +
 		   	stats->tx_window_errors + stats->tx_heartbeat_errors,
-		   stats->tx_compressed);
+		   stats->tx_compressed,
+		   q->stats.drops);
 	else
 		size = sprintf(buffer, "%6s: No statistics available.\n",
 			       dev->name);
@@ -1785,7 +1788,7 @@
 
 	size = sprintf(buffer,
 		"Inter-|   Receive                                                |  Transmit\n"
-		" face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed\n");
+		" face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed Qdiscdrops\n");
 
 	pos += size;
 	len += size;

                 reply	other threads:[~2002-09-02 11:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020902165853.B21589@in.ibm.com \
    --to=kiran@in.ibm.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox