public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jesper Dangaard Brouer <hawk@diku.dk>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
	Changli Gao <xiaosuo@gmail.com>,
	David Miller <davem@davemloft.net>,
	Fabio Checconi <fabio@gandalf.sssup.it>,
	netdev <netdev@vger.kernel.org>, Luigi Rizzo <rizzo@iet.unipi.it>,
	hawk@comx.dk
Subject: Re: [PATCH] net_sched: factorize qdisc stats handling
Date: Mon, 17 Jan 2011 23:04:12 +0100	[thread overview]
Message-ID: <1295301852.3362.16.camel@edumazet-laptop> (raw)
In-Reply-To: <Pine.LNX.4.64.1101172243470.15896@ask.diku.dk>

Le lundi 17 janvier 2011 à 22:55 +0100, Jesper Dangaard Brouer a écrit :
> 
> On Sat, 8 Jan 2011, Eric Dumazet wrote:
> >> Changli Gao <xiaosuo@gmail.com> 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?
> 
> 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);
>          }
> 
> Is is at all legal to modify the q.qlen this way?

nope ;)

q.qlen is really number of skbs here.




  reply	other threads:[~2011-01-17 22:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07  3:56 [RFC] sched: QFQ - quick fair queue scheduler Stephen Hemminger
2011-01-07 19:24 ` [RFC] sched: QFQ - quick fair queue scheduler (iproute2) Stephen Hemminger
2011-01-08  2:56 ` [RFC] sched: QFQ - quick fair queue scheduler Changli Gao
2011-01-08  4:02   ` Stephen Hemminger
2011-01-08  9:26     ` [PATCH] net_sched: factorize qdisc stats handling Eric Dumazet
2011-01-08 13:35       ` Jarek Poplawski
2011-01-08 15:40         ` Eric Dumazet
2011-01-09 17:57       ` Stephen Hemminger
2011-01-09 18:30         ` Eric Dumazet
2011-01-11  0:08           ` David Miller
2011-01-17 21:55       ` Jesper Dangaard Brouer
2011-01-17 22:04         ` Eric Dumazet [this message]
2011-01-08  4:34   ` [RFC] sched: QFQ - quick fair queue scheduler David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295301852.3362.16.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fabio@gandalf.sssup.it \
    --cc=hawk@comx.dk \
    --cc=hawk@diku.dk \
    --cc=netdev@vger.kernel.org \
    --cc=rizzo@iet.unipi.it \
    --cc=shemminger@vyatta.com \
    --cc=xiaosuo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox