netdev
[Top] [All Lists]

Re: RFC/PATCH capture qdisc requeue event in stats

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: RFC/PATCH capture qdisc requeue event in stats
From: jamal <hadi@xxxxxxxxxx>
Date: 30 Aug 2004 18:56:32 -0400
Cc: netdev@xxxxxxxxxxx, Stephen Hemminger <shemminger@xxxxxxxx>
In-reply-to: <20040830154430.769d1d59.davem@xxxxxxxxxx>
Organization: jamalopolous
References: <1093799632.1073.410.camel@xxxxxxxxxxxxxxxx> <20040830144033.2265a6e6.davem@xxxxxxxxxx> <1093904088.1043.12.camel@xxxxxxxxxxxxxxxx> <20040830154430.769d1d59.davem@xxxxxxxxxx>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
On Mon, 2004-08-30 at 18:44, David S. Miller wrote:
> On 30 Aug 2004 18:14:48 -0400
> jamal <hadi@xxxxxxxxxx> wrote:

> 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. */
>       }

Sounds reasonable to me. Some of the BSDs do this to maintain old compat
- just means keeping old struct around. Steve, agreeable to you? 

Change to both kernel and user space or just user space?

cheers,
jamal



<Prev in Thread] Current Thread [Next in Thread>