All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>,
	David Miller <davem@davemloft.net>,
	Fabio Checconi <fabio@gandalf.sssup.it>,
	netdev@vger.kernel.org, Luigi Rizzo <rizzo@iet.unipi.it>
Subject: Re: [PATCH] net_sched: factorize qdisc stats handling
Date: Sun, 9 Jan 2011 09:57:35 -0800	[thread overview]
Message-ID: <20110109095735.5241e755@nehalam> (raw)
In-Reply-To: <1294478789.2709.79.camel@edumazet-laptop>

On Sat, 08 Jan 2011 10:26:29 +0100
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> +static inline void bstats_update(struct gnet_stats_basic_packed *bstats,
> +				 struct sk_buff *skb)
> +{
> +	bstats->bytes += qdisc_pkt_len(skb);
> +	bstats->packets += skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1;
> +}
> +
> +static inline void qdisc_bstats_update(struct Qdisc *sch, struct sk_buff *skb)
>  {
> -	sch->bstats.bytes += len;
> -	sch->bstats.packets++;
> +	bstats_update(&sch->bstats, skb);
>  }

Minor nit. I prefer to show that skb is not modified.

static inline void bstats_update(struct gnet_stats_basic_packed *bstats,
				 const struct sk_buff *skb)

static inline void qdisc_bstats_update(struct Qdisc *sch, const struct sk_buff *skb)

-- 

  parent reply	other threads:[~2011-01-09 17:57 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 [this message]
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
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=20110109095735.5241e755@nehalam \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fabio@gandalf.sssup.it \
    --cc=netdev@vger.kernel.org \
    --cc=rizzo@iet.unipi.it \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.