[TG3]: Add tagged status support.
[linux-2.6/verdex.git] / include / linux / tc_ematch / tc_em_meta.h
blobaa6b48bb4dcd0c1fbeec59278d84eb3e15244da0
1 #ifndef __LINUX_TC_EM_META_H
2 #define __LINUX_TC_EM_META_H
4 #include <linux/pkt_cls.h>
6 enum
8 TCA_EM_META_UNSPEC,
9 TCA_EM_META_HDR,
10 TCA_EM_META_LVALUE,
11 TCA_EM_META_RVALUE,
12 __TCA_EM_META_MAX
14 #define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1)
16 struct tcf_meta_val
18 __u16 kind;
19 __u8 shift;
20 __u8 op;
23 #define TCF_META_TYPE_MASK (0xf << 12)
24 #define TCF_META_TYPE(kind) (((kind) & TCF_META_TYPE_MASK) >> 12)
25 #define TCF_META_ID_MASK 0x7ff
26 #define TCF_META_ID(kind) ((kind) & TCF_META_ID_MASK)
28 enum
30 TCF_META_TYPE_VAR,
31 TCF_META_TYPE_INT,
32 __TCF_META_TYPE_MAX
34 #define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1)
36 enum
38 TCF_META_ID_VALUE,
39 TCF_META_ID_RANDOM,
40 TCF_META_ID_LOADAVG_0,
41 TCF_META_ID_LOADAVG_1,
42 TCF_META_ID_LOADAVG_2,
43 TCF_META_ID_DEV,
44 TCF_META_ID_INDEV,
45 TCF_META_ID_REALDEV,
46 TCF_META_ID_PRIORITY,
47 TCF_META_ID_PROTOCOL,
48 TCF_META_ID_SECURITY,
49 TCF_META_ID_PKTTYPE,
50 TCF_META_ID_PKTLEN,
51 TCF_META_ID_DATALEN,
52 TCF_META_ID_MACLEN,
53 TCF_META_ID_NFMARK,
54 TCF_META_ID_TCINDEX,
55 TCF_META_ID_TCVERDICT,
56 TCF_META_ID_TCCLASSID,
57 TCF_META_ID_RTCLASSID,
58 TCF_META_ID_RTIIF,
59 __TCF_META_ID_MAX
61 #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
63 struct tcf_meta_hdr
65 struct tcf_meta_val left;
66 struct tcf_meta_val right;
69 #endif