From patchwork Mon Jan 17 21:55:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Dangaard Brouer X-Patchwork-Id: 79222 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C542AB714B for ; Tue, 18 Jan 2011 08:55:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752826Ab1AQVzg (ORCPT ); Mon, 17 Jan 2011 16:55:36 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:55309 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752750Ab1AQVza (ORCPT ); Mon, 17 Jan 2011 16:55:30 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id D56D019BBC1; Mon, 17 Jan 2011 22:55:27 +0100 (CET) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28068-15; Mon, 17 Jan 2011 22:55:23 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw2.diku.dk (Postfix) with ESMTP id 7607D19BBA8; Mon, 17 Jan 2011 22:55:23 +0100 (CET) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id 7816A6DF835; Mon, 17 Jan 2011 22:50:00 +0100 (CET) Received: by ask.diku.dk (Postfix, from userid 3075) id 5216C200A6; Mon, 17 Jan 2011 22:55:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id 461E1488C9; Mon, 17 Jan 2011 22:55:23 +0100 (CET) Date: Mon, 17 Jan 2011 22:55:23 +0100 (CET) From: Jesper Dangaard Brouer To: Eric Dumazet Cc: Stephen Hemminger , Changli Gao , David Miller , Fabio Checconi , netdev , Luigi Rizzo , hawk@comx.dk Subject: Re: [PATCH] net_sched: factorize qdisc stats handling In-Reply-To: <1294478789.2709.79.camel@edumazet-laptop> Message-ID: References: <20110106195614.20dbc402@nehalam> <20110107200234.3f5e7ff8@nehalam> <1294478789.2709.79.camel@edumazet-laptop> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, 8 Jan 2011, Eric Dumazet wrote: >> Changli Gao wrote: >> >>>> + cl->bstats.packets += skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1; What about the qlen when we enqueue a GSO packet? Should we account for the number of internal GSO packets, or just account a GSO packet as a single packet? Is is at all legal to modify the q.qlen this way? Cheers Jesper Brouer --- ------------------------------------------------------------------- MSc. Master of Computer Science Dept. of Computer Science, University of Copenhagen Author of http://www.adsl-optimizer.dk ------------------------------------------------------------------- -- 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/sched/sch_generic.c b/net/sched/sch_generic.c index 0918834..1a8c0a3 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -453,7 +453,8 @@ static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc) struct sk_buff_head *list = band2list(priv, band); priv->bitmap |= (1 << band); - qdisc->q.qlen++; + /* Should the number of GSO packets be taken into account?*/ + qdisc->q.qlen += skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1; return __qdisc_enqueue_tail(skb, qdisc, list); }