| To: | hadi@xxxxxxxxxx |
|---|---|
| Subject: | Re: RFC/PATCH capture qdisc requeue event in stats |
| From: | "David S. Miller" <davem@xxxxxxxxxx> |
| Date: | Mon, 30 Aug 2004 15:44:30 -0700 |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <1093904088.1043.12.camel@jzny.localdomain> |
| References: | <1093799632.1073.410.camel@jzny.localdomain> <20040830144033.2265a6e6.davem@redhat.com> <1093904088.1043.12.camel@jzny.localdomain> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On 30 Aug 2004 18:14:48 -0400
jamal <hadi@xxxxxxxxxx> 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. */
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Updated WE-18 (WPA) proposal, Jeff Garzik |
|---|---|
| Next by Date: | Re: RFC/PATCH capture qdisc requeue event in stats, jamal |
| Previous by Thread: | Re: RFC/PATCH capture qdisc requeue event in stats, jamal |
| Next by Thread: | Re: RFC/PATCH capture qdisc requeue event in stats, jamal |
| Indexes: | [Date] [Thread] [Top] [All Lists] |