Can you tell me what is the patch you have mentioned below? I agree to the fact that all layers need to have their own statistics. Will it be a good idea to export the qdisc statistics to /proc ? Thanks Nivedita Singhvi wrote: > Prashanth T wrote: > > I was wondering why is that the network device's drop statistics > > (/proc/net/dev) doesn't consider the drops from device queue. What I > > mean is, if enqueing the packet [q->enqueue called in dev_queue_xmit( ) > > ] results in NET_XMIT_DROP or NET_XMIT_CN or NET_XMIT_POLICED, we should > > be incrementing the device drop statistics. Otherwise, it looks like > > there will be an inconsistency of tcp packets sent (seen from netstat > > -s) to the data from the adapter (Tx-OK and TX-DRP from netstat -i ). > > Let me know if I am wrong. > > This doesnt address your main question, but there is no > reason for the view from TCP and the view from the adapter > to be consistent (e.g. TCP packets sent and adapter packets > sent) else why have separate counters? :)). The point is > that once TCP has sent the packet, any part of the stack > below could drop the packet. It would be nice to count all > the dropped packets, though. qdisc drops are the one of the > few silent drops that I can think of. Its not the adapter > dropping them, however, so they wont be counted in the > device statistics, correctly, imho. We had a patch floating > around to count them, iirc. > > thanks, > Nivedita - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html