[Top] [All Lists]

Re: [PATCH] pkt_cls.h incompatiables

To: shemminger@xxxxxxxx
Subject: Re: [PATCH] pkt_cls.h incompatiables
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Date: Thu, 22 Jul 2004 20:04:26 -0400 (EDT)
Cc: davem@xxxxxxxxxx, hadi@xxxxxxxx, arekm@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20040722134522.4e7e0b07@xxxxxxxxxxxxxxxxxxxxx>
Organization: USAGI Project
References: <20040716103759.1928c2ae@xxxxxxxxxxxxxxxxxxxxx> <200407172357.15832.arekm@xxxxxxxxxxxxx> <20040722134522.4e7e0b07@xxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
In article <20040722134522.4e7e0b07@xxxxxxxxxxxxxxxxxxxxx> (at Thu, 22 Jul 2004 
13:45:22 -0700), Stephen Hemminger <shemminger@xxxxxxxx> says:

> The recent changes to (6 Jul 04) pkt_cls.h are evil, you can't build a version
> of 'tc' to work unless you know the kernel config!
> It has several API problems:
>   - API data structures change on kernel config options
>   - new fields should be added at the end of a structure to allow
>     binary compatibility.
    - We cannot add new variable(s) after the last member which is 
      an variable-length array in effect.

> @@ -229,11 +214,9 @@
>       short                   hoff;
>       __u32                   hmask;
> -#ifdef CONFIG_CLS_U32_PERF
> +     struct tc_u32_key       keys[0];
>       unsigned long           rcnt;
>       unsigned long           rhit;
> -#endif
> -     struct tc_u32_key       keys[0];
>  };
>  /* Flags */

We cannot do this because keys holds key of variable length.

Solutions are, for example,
 to allocate new TCA_U32_xxx for rcnt and rhit,
 to rename TCA_U32_SEL to TCA_U32_OLS_SEL and allocate new value for 


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