netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: hadi@cyberus.ca
Cc: netdev@oss.sgi.com
Subject: Re: RFC/PATCH capture qdisc requeue event in stats
Date: Mon, 30 Aug 2004 15:44:30 -0700	[thread overview]
Message-ID: <20040830154430.769d1d59.davem@redhat.com> (raw)
In-Reply-To: <1093904088.1043.12.camel@jzny.localdomain>

On 30 Aug 2004 18:14:48 -0400
jamal <hadi@cyberus.ca> wrote:

> 4) old kernel +  new tc --> will bomb (sizeof check will fail)
> 
> Cant think of something smart to do with option #4. I have contemplated
> playing with offsetoff() etc. The best thing i can think of right
> now is to complain about it as in that fprintf()
> 
> Thoughts?

Check the size, if it matches the older tc_stats size sans
requeue stat addition, then don't try to reference that struct member.

	if (RTA_PAYLOAD(tb[TCA_STATS]) == sizeof(struct tc_stats_old)) {
		/* report everything sans requeue */
	} else if (RTA_PAYLOAD(tb[TCA_STATS]) == sizeof(struct tc_stats)) {
		/* report all stats, including requeue */
	} else {
		/* report error, etc. */
	}

  reply	other threads:[~2004-08-30 22:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-29 17:13 RFC/PATCH capture qdisc requeue event in stats jamal
2004-08-30 21:40 ` David S. Miller
2004-08-30 22:14   ` jamal
2004-08-30 22:44     ` David S. Miller [this message]
2004-08-30 22:56       ` jamal
2004-08-30 23:00         ` David S. Miller
2004-08-31  1:43           ` jamal
2004-08-31  2:17             ` David S. Miller
2004-08-31  2:37               ` jamal
2004-08-31  4:29                 ` David S. Miller
2004-08-31 18:09                   ` jamal
2004-09-29  0:36                   ` Thomas Graf
2004-09-29  2:54                     ` jamal
2004-09-29 12:48                       ` Thomas Graf
2004-09-29 14:08                         ` jamal
2004-08-30 23:05         ` Stephen Hemminger
2004-09-28 23:10 ` Stephen Hemminger
2004-09-28 23:18   ` David S. Miller
2004-09-29  0:01     ` Stephen Hemminger
2004-09-29  0:03       ` David S. Miller
2004-09-29  2:31         ` jamal

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=20040830154430.769d1d59.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=hadi@cyberus.ca \
    --cc=netdev@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).