Merge branch 'cfq-2.6.33' into for-2.6.33
[linux-2.6/next.git] / include / linux / tc_ematch / tc_em_meta.h
blobdcfb733fa1f6660542696362df20bbd94f6e8701
1 #ifndef __LINUX_TC_EM_META_H
2 #define __LINUX_TC_EM_META_H
4 #include <linux/types.h>
5 #include <linux/pkt_cls.h>
7 enum
9 TCA_EM_META_UNSPEC,
10 TCA_EM_META_HDR,
11 TCA_EM_META_LVALUE,
12 TCA_EM_META_RVALUE,
13 __TCA_EM_META_MAX
15 #define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1)
17 struct tcf_meta_val
19 __u16 kind;
20 __u8 shift;
21 __u8 op;
24 #define TCF_META_TYPE_MASK (0xf << 12)
25 #define TCF_META_TYPE(kind) (((kind) & TCF_META_TYPE_MASK) >> 12)
26 #define TCF_META_ID_MASK 0x7ff
27 #define TCF_META_ID(kind) ((kind) & TCF_META_ID_MASK)
29 enum
31 TCF_META_TYPE_VAR,
32 TCF_META_TYPE_INT,
33 __TCF_META_TYPE_MAX
35 #define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1)
37 enum
39 TCF_META_ID_VALUE,
40 TCF_META_ID_RANDOM,
41 TCF_META_ID_LOADAVG_0,
42 TCF_META_ID_LOADAVG_1,
43 TCF_META_ID_LOADAVG_2,
44 TCF_META_ID_DEV,
45 TCF_META_ID_PRIORITY,
46 TCF_META_ID_PROTOCOL,
47 TCF_META_ID_PKTTYPE,
48 TCF_META_ID_PKTLEN,
49 TCF_META_ID_DATALEN,
50 TCF_META_ID_MACLEN,
51 TCF_META_ID_NFMARK,
52 TCF_META_ID_TCINDEX,
53 TCF_META_ID_RTCLASSID,
54 TCF_META_ID_RTIIF,
55 TCF_META_ID_SK_FAMILY,
56 TCF_META_ID_SK_STATE,
57 TCF_META_ID_SK_REUSE,
58 TCF_META_ID_SK_BOUND_IF,
59 TCF_META_ID_SK_REFCNT,
60 TCF_META_ID_SK_SHUTDOWN,
61 TCF_META_ID_SK_PROTO,
62 TCF_META_ID_SK_TYPE,
63 TCF_META_ID_SK_RCVBUF,
64 TCF_META_ID_SK_RMEM_ALLOC,
65 TCF_META_ID_SK_WMEM_ALLOC,
66 TCF_META_ID_SK_OMEM_ALLOC,
67 TCF_META_ID_SK_WMEM_QUEUED,
68 TCF_META_ID_SK_RCV_QLEN,
69 TCF_META_ID_SK_SND_QLEN,
70 TCF_META_ID_SK_ERR_QLEN,
71 TCF_META_ID_SK_FORWARD_ALLOCS,
72 TCF_META_ID_SK_SNDBUF,
73 TCF_META_ID_SK_ALLOCS,
74 TCF_META_ID_SK_ROUTE_CAPS,
75 TCF_META_ID_SK_HASH,
76 TCF_META_ID_SK_LINGERTIME,
77 TCF_META_ID_SK_ACK_BACKLOG,
78 TCF_META_ID_SK_MAX_ACK_BACKLOG,
79 TCF_META_ID_SK_PRIO,
80 TCF_META_ID_SK_RCVLOWAT,
81 TCF_META_ID_SK_RCVTIMEO,
82 TCF_META_ID_SK_SNDTIMEO,
83 TCF_META_ID_SK_SENDMSG_OFF,
84 TCF_META_ID_SK_WRITE_PENDING,
85 TCF_META_ID_VLAN_TAG,
86 __TCF_META_ID_MAX
88 #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
90 struct tcf_meta_hdr
92 struct tcf_meta_val left;
93 struct tcf_meta_val right;
96 #endif