From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: Re: UDP multicast packet loss not reported if TX ring overrun? Date: Fri, 28 Aug 2009 09:53:40 -0400 (EDT) Message-ID: References: <1251239734.3169.65.camel@w-sridhar.beaverton.ibm.com> <1251309040.10599.34.camel@w-sridhar.beaverton.ibm.com> <1251324666.10599.72.camel@w-sridhar.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: David Stevens , "David S. Miller" , Eric Dumazet , netdev@vger.kernel.org, niv@linux.vnet.ibm.com To: Sridhar Samudrala Return-path: Received: from smtp2.ultrahosting.com ([74.213.174.253]:36155 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751570AbZH1NyD (ORCPT ); Fri, 28 Aug 2009 09:54:03 -0400 Received: from localhost (smtp.ultrahosting.com [127.0.0.1]) by smtp.ultrahosting.com (Postfix) with ESMTP id 9221982C83F for ; Fri, 28 Aug 2009 09:55:10 -0400 (EDT) Received: from smtp.ultrahosting.com ([74.213.174.253]) by localhost (smtp.ultrahosting.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lhs4w35OgnwQ for ; Fri, 28 Aug 2009 09:55:10 -0400 (EDT) Received: from gentwo.org (unknown [74.213.171.31]) by smtp.ultrahosting.com (Postfix) with ESMTP id 907A782C86D for ; Fri, 28 Aug 2009 09:55:03 -0400 (EDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: The qdisc drop counter is incremented in pfifo_fast. So Sridhar's patch is not necessary. Seems though that the qdisc drop count does not flow into the tx_dropped counter for the interface. Incrementing the tx_dropped count in the netdev_queue associated with the outbound qdisc also had no effect (see the following patch). Plus I only see one queue for eth0 with "tc -s qdisc show". I think that what I see there is the queue for receiving packets. tc uses this ugly netlink interface. Could be a bug in there or in the netlink interface? Or is there some other trick to display queue statistics for outgoing packets? WTH is going on here? Noone was ever interested in making outbound packet loss account right? Index: linux-2.6.31-rc7/include/net/sch_generic.h =================================================================== --- linux-2.6.31-rc7.orig/include/net/sch_generic.h 2009-08-27 21:20:03.000000000 +0000 +++ linux-2.6.31-rc7/include/net/sch_generic.h 2009-08-27 21:26:33.000000000 +0000 @@ -509,6 +509,9 @@ static inline int qdisc_drop(struct sk_b kfree_skb(skb); sch->qstats.drops++; + /* device queue statistics */ + sch->dev_queue->tx_dropped++; + return NET_XMIT_DROP; }