Qdisc drops not being reported
RFC PATCH 1/1 Qdisc drops not being reported
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
include/asm-i386/mmu.h +2 -0
@@ -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.
net/core/dev.c +6 -3
@@ -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;