netdev
[Top] [All Lists]

Re: cls_u32 compile failure in current 2.6.12-rc1+BK tree

To: jamal <hadi@xxxxxxxxxx>
Subject: Re: cls_u32 compile failure in current 2.6.12-rc1+BK tree
From: Thomas Graf <tgraf@xxxxxxx>
Date: Wed, 30 Mar 2005 03:02:09 +0200
Cc: Meelis Roos <mroos@xxxxxxxx>, netdev <netdev@xxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>
In-reply-to: <1112129516.1076.90.camel@xxxxxxxxxxxxxxxx>
References: <20050328123801.GY3086@xxxxxxxxxxxxxx> <1112014261.1089.1018.camel@xxxxxxxxxxxxxxxx> <20050328125802.GZ3086@xxxxxxxxxxxxxx> <1112015725.1089.1045.camel@xxxxxxxxxxxxxxxx> <20050328155523.GD3086@xxxxxxxxxxxxxx> <1112038128.1119.5.camel@xxxxxxxxxxxxxxxx> <20050328195320.GE3086@xxxxxxxxxxxxxx> <20050328223310.GH3086@xxxxxxxxxxxxxx> <20050329011058.GJ3086@xxxxxxxxxxxxxx> <1112129516.1076.90.camel@xxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
* 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.

Attachment: 1
Description: Text document

Attachment: 2
Description: Text document

Attachment: 3
Description: Text document

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