Commit c5de793d authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[PKT_SCHED]: Fix pkt_cls.h incompatabilities

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.
 
This patch tries to clean this up.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 4d4eae2c
...@@ -117,17 +117,8 @@ enum ...@@ -117,17 +117,8 @@ enum
struct tc_police struct tc_police
{ {
__u32 index; __u32 index;
#ifdef CONFIG_NET_CLS_ACT
int refcnt; int refcnt;
int bindcnt; int bindcnt;
#endif
/* Turned off because it requires new tc
* to work (for now maintain ABI)
*
#ifdef CONFIG_NET_CLS_ACT
__u32 capab;
#endif
*/
int action; int action;
#define TC_POLICE_UNSPEC TC_ACT_UNSPEC #define TC_POLICE_UNSPEC TC_ACT_UNSPEC
#define TC_POLICE_OK TC_ACT_OK #define TC_POLICE_OK TC_ACT_OK
...@@ -195,12 +186,8 @@ enum ...@@ -195,12 +186,8 @@ enum
TCA_U32_DIVISOR, TCA_U32_DIVISOR,
TCA_U32_SEL, TCA_U32_SEL,
TCA_U32_POLICE, TCA_U32_POLICE,
#ifdef CONFIG_NET_CLS_ACT
TCA_U32_ACT, TCA_U32_ACT,
#endif
#ifdef CONFIG_NET_CLS_IND
TCA_U32_INDEV, TCA_U32_INDEV,
#endif
__TCA_U32_MAX __TCA_U32_MAX
}; };
...@@ -212,9 +199,7 @@ struct tc_u32_key ...@@ -212,9 +199,7 @@ struct tc_u32_key
__u32 val; __u32 val;
int off; int off;
int offmask; int offmask;
#ifdef CONFIG_CLS_U32_PERF __u32 kcnt;
unsigned long kcnt;
#endif
}; };
struct tc_u32_sel struct tc_u32_sel
...@@ -229,11 +214,9 @@ struct tc_u32_sel ...@@ -229,11 +214,9 @@ struct tc_u32_sel
short hoff; short hoff;
__u32 hmask; __u32 hmask;
#ifdef CONFIG_CLS_U32_PERF struct tc_u32_key keys[0];
unsigned long rcnt; unsigned long rcnt;
unsigned long rhit; unsigned long rhit;
#endif
struct tc_u32_key keys[0];
}; };
/* Flags */ /* Flags */
...@@ -300,12 +283,8 @@ enum ...@@ -300,12 +283,8 @@ enum
TCA_FW_UNSPEC, TCA_FW_UNSPEC,
TCA_FW_CLASSID, TCA_FW_CLASSID,
TCA_FW_POLICE, TCA_FW_POLICE,
#ifdef CONFIG_NET_CLS_IND
TCA_FW_INDEV, TCA_FW_INDEV,
#endif
#ifdef CONFIG_NET_CLS_ACT
TCA_FW_ACT, TCA_FW_ACT,
#endif
__TCA_FW_MAX __TCA_FW_MAX
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment