* jamal <1112129516.1076.90.camel@xxxxxxxxxxxxxxxx> 2005-03-29 15:51
>
> In general (from 1 mile away looks fine).
> One issue: a->type could be used for in the future to carry
> other things in addition to backward compatibility. So you cant assume
> it being set means only backward compat is needed (and nothing else).
Not sure if I get you but maybe a mistake of mine while mapping
the logic in mind into code has confused you. The code really
should have been:
/* compat_mode being true specifies a call that is supposed
* to add additional backward compatiblity statistic TLVs.
*/
if (compat_mode) {
if (a->type == TCA_OLD_COMPAT)
err = gnet_stats_start_copy_compat(skb, 0,
TCA_STATS, TCA_XSTATS, h->stats_lock, &d);
} else
err = gnet_stats_start_copy(skb, TCA_ACT_STATS,
h->stats_lock, &d);
So we always dump TCA_ACT_STATS when calling from tcf_exts_dump
and add the backward compatibility TLVs in the second call
comming from tcf_exts_dump_stats for actions that need it.
Patches tested, works for me but might be worth for someone
else to give it a try as well just to make sure. Meelis, could
you give the 3 attched patches a try?
Dave, you can pull from bk://kernel.bkbits.net/tgraf/net-2.6-tcf_exts
if everyone can agree on this.
1
Description: Text document
2
Description: Text document
3
Description: Text document
|