Re: RFC/PATCH capture qdisc requeue event in stats
From: jamal <hidden>
Date: 2004-08-30 22:56:32
From: jamal <hidden>
Date: 2004-08-30 22:56:32
On Mon, 2004-08-30 at 18:44, David S. Miller wrote:
On 30 Aug 2004 18:14:48 -0400 jamal [off-list ref] 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