From patchwork Tue Aug 25 22:35:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sridhar Samudrala X-Patchwork-Id: 32099 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 92D89B7B98 for ; Wed, 26 Aug 2009 08:35:45 +1000 (EST) Received: by ozlabs.org (Postfix) id 7DE1CDDDB2; Wed, 26 Aug 2009 08:35:45 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 0F527DDDA2 for ; Wed, 26 Aug 2009 08:35:45 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932165AbZHYWfg (ORCPT ); Tue, 25 Aug 2009 18:35:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756289AbZHYWfg (ORCPT ); Tue, 25 Aug 2009 18:35:36 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:57668 "EHLO e3.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756244AbZHYWff (ORCPT ); Tue, 25 Aug 2009 18:35:35 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e3.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n7PMSvPJ003496; Tue, 25 Aug 2009 18:28:57 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n7PMZbhj255120; Tue, 25 Aug 2009 18:35:37 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n7PMZam5023165; Tue, 25 Aug 2009 18:35:37 -0400 Received: from [9.47.18.19] (w-sridhar.beaverton.ibm.com [9.47.18.19]) by d01av03.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n7PMZZGX023155; Tue, 25 Aug 2009 18:35:35 -0400 Subject: Re: UDP multicast packet loss not reported if TX ring overrun? From: Sridhar Samudrala To: Christoph Lameter Cc: David Stevens , "David S. Miller" , Eric Dumazet , netdev@vger.kernel.org, netdev-owner@vger.kernel.org, niv@linux.vnet.ibm.com, sri@linux.vnet.ibm.com In-Reply-To: References: Date: Tue, 25 Aug 2009 15:35:34 -0700 Message-Id: <1251239734.3169.65.camel@w-sridhar.beaverton.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 2009-08-25 at 15:15 -0400, Christoph Lameter wrote: > On Tue, 25 Aug 2009, David Stevens wrote: > > > Christoph Lameter wrote on 08/25/2009 06:48:24 > > AM: > > > > > On Mon, 24 Aug 2009, Sridhar Samudrala wrote: > > > > > > If we count these drops as qdisc drops, should we also count them as > > IP OUTDISCARDS? > > > > > > Yes. > > > > Actually, no. (!) > > > > IP_OUTDISCARDS should count the packets IP dropped, not > > anything dropped at a lower layer (which, in general, it > > is not aware of). If you count these in multiple layers, > > then you don't really know who dropped it. > > You are right. I skipped that IP OUTDICARDS reference. They need to be > accounted at the qdisc level though. Yes. Now that we agree that drops at dev_queue_xmit level should be counted under qdisc stats, the following patch should address 1 of the 3 places where NET_XMIT_DROP is returned, but qdisc drop stats is not incremented. The other 2 places are in ipsec output functions esp_output and esp6_output. I am not sure where these drops should be accounted. Could you check if the UDP packet losses you are seeing are accounted for in qdisc drops with this patch. But i am not completely positive on this as this case happens only if qdisc is deactivated. Thanks Sridhar --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/core/dev.c b/net/core/dev.c index 6a94475..8b6a075 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1864,8 +1864,7 @@ gso: spin_lock(root_lock); if (unlikely(test_bit(__QDISC_STATE_DEACTIVATED, &q->state))) { - kfree_skb(skb); - rc = NET_XMIT_DROP; + rc = qdisc_drop(skb, q); } else { rc = qdisc_enqueue_root(skb, q); qdisc_run(q);