1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef __LINUX_PKT_CLS_H
20 #define __LINUX_PKT_CLS_H
21 #include <linux/types.h>
22 #include <linux/pkt_sched.h>
23 #define TC_COOKIE_MAX_SIZE 16
24 enum {
25   TCA_ACT_UNSPEC,
26   TCA_ACT_KIND,
27   TCA_ACT_OPTIONS,
28   TCA_ACT_INDEX,
29   TCA_ACT_STATS,
30   TCA_ACT_PAD,
31   TCA_ACT_COOKIE,
32   TCA_ACT_FLAGS,
33   TCA_ACT_HW_STATS,
34   TCA_ACT_USED_HW_STATS,
35   __TCA_ACT_MAX
36 };
37 #define TCA_ACT_FLAGS_NO_PERCPU_STATS 1
38 #define TCA_ACT_HW_STATS_IMMEDIATE (1 << 0)
39 #define TCA_ACT_HW_STATS_DELAYED (1 << 1)
40 #define TCA_ACT_MAX __TCA_ACT_MAX
41 #define TCA_OLD_COMPAT (TCA_ACT_MAX + 1)
42 #define TCA_ACT_MAX_PRIO 32
43 #define TCA_ACT_BIND 1
44 #define TCA_ACT_NOBIND 0
45 #define TCA_ACT_UNBIND 1
46 #define TCA_ACT_NOUNBIND 0
47 #define TCA_ACT_REPLACE 1
48 #define TCA_ACT_NOREPLACE 0
49 #define TC_ACT_UNSPEC (- 1)
50 #define TC_ACT_OK 0
51 #define TC_ACT_RECLASSIFY 1
52 #define TC_ACT_SHOT 2
53 #define TC_ACT_PIPE 3
54 #define TC_ACT_STOLEN 4
55 #define TC_ACT_QUEUED 5
56 #define TC_ACT_REPEAT 6
57 #define TC_ACT_REDIRECT 7
58 #define TC_ACT_TRAP 8
59 #define TC_ACT_VALUE_MAX TC_ACT_TRAP
60 #define __TC_ACT_EXT_SHIFT 28
61 #define __TC_ACT_EXT(local) ((local) << __TC_ACT_EXT_SHIFT)
62 #define TC_ACT_EXT_VAL_MASK ((1 << __TC_ACT_EXT_SHIFT) - 1)
63 #define TC_ACT_EXT_OPCODE(combined) ((combined) & (~TC_ACT_EXT_VAL_MASK))
64 #define TC_ACT_EXT_CMP(combined,opcode) (TC_ACT_EXT_OPCODE(combined) == opcode)
65 #define TC_ACT_JUMP __TC_ACT_EXT(1)
66 #define TC_ACT_GOTO_CHAIN __TC_ACT_EXT(2)
67 #define TC_ACT_EXT_OPCODE_MAX TC_ACT_GOTO_CHAIN
68 #define TCA_ACT_GACT 5
69 #define TCA_ACT_IPT 6
70 #define TCA_ACT_PEDIT 7
71 #define TCA_ACT_MIRRED 8
72 #define TCA_ACT_NAT 9
73 #define TCA_ACT_XT 10
74 #define TCA_ACT_SKBEDIT 11
75 #define TCA_ACT_VLAN 12
76 #define TCA_ACT_BPF 13
77 #define TCA_ACT_CONNMARK 14
78 #define TCA_ACT_SKBMOD 15
79 #define TCA_ACT_CSUM 16
80 #define TCA_ACT_TUNNEL_KEY 17
81 #define TCA_ACT_SIMP 22
82 #define TCA_ACT_IFE 25
83 #define TCA_ACT_SAMPLE 26
84 enum tca_id {
85   TCA_ID_UNSPEC = 0,
86   TCA_ID_POLICE = 1,
87   TCA_ID_GACT = TCA_ACT_GACT,
88   TCA_ID_IPT = TCA_ACT_IPT,
89   TCA_ID_PEDIT = TCA_ACT_PEDIT,
90   TCA_ID_MIRRED = TCA_ACT_MIRRED,
91   TCA_ID_NAT = TCA_ACT_NAT,
92   TCA_ID_XT = TCA_ACT_XT,
93   TCA_ID_SKBEDIT = TCA_ACT_SKBEDIT,
94   TCA_ID_VLAN = TCA_ACT_VLAN,
95   TCA_ID_BPF = TCA_ACT_BPF,
96   TCA_ID_CONNMARK = TCA_ACT_CONNMARK,
97   TCA_ID_SKBMOD = TCA_ACT_SKBMOD,
98   TCA_ID_CSUM = TCA_ACT_CSUM,
99   TCA_ID_TUNNEL_KEY = TCA_ACT_TUNNEL_KEY,
100   TCA_ID_SIMP = TCA_ACT_SIMP,
101   TCA_ID_IFE = TCA_ACT_IFE,
102   TCA_ID_SAMPLE = TCA_ACT_SAMPLE,
103   TCA_ID_CTINFO,
104   TCA_ID_MPLS,
105   TCA_ID_CT,
106   __TCA_ID_MAX = 255
107 };
108 #define TCA_ID_MAX __TCA_ID_MAX
109 struct tc_police {
110   __u32 index;
111   int action;
112 #define TC_POLICE_UNSPEC TC_ACT_UNSPEC
113 #define TC_POLICE_OK TC_ACT_OK
114 #define TC_POLICE_RECLASSIFY TC_ACT_RECLASSIFY
115 #define TC_POLICE_SHOT TC_ACT_SHOT
116 #define TC_POLICE_PIPE TC_ACT_PIPE
117   __u32 limit;
118   __u32 burst;
119   __u32 mtu;
120   struct tc_ratespec rate;
121   struct tc_ratespec peakrate;
122   int refcnt;
123   int bindcnt;
124   __u32 capab;
125 };
126 struct tcf_t {
127   __u64 install;
128   __u64 lastuse;
129   __u64 expires;
130   __u64 firstuse;
131 };
132 struct tc_cnt {
133   int refcnt;
134   int bindcnt;
135 };
136 #define tc_gen __u32 index; __u32 capab; int action; int refcnt; int bindcnt
137 enum {
138   TCA_POLICE_UNSPEC,
139   TCA_POLICE_TBF,
140   TCA_POLICE_RATE,
141   TCA_POLICE_PEAKRATE,
142   TCA_POLICE_AVRATE,
143   TCA_POLICE_RESULT,
144   TCA_POLICE_TM,
145   TCA_POLICE_PAD,
146   TCA_POLICE_RATE64,
147   TCA_POLICE_PEAKRATE64,
148   __TCA_POLICE_MAX
149 #define TCA_POLICE_RESULT TCA_POLICE_RESULT
150 };
151 #define TCA_POLICE_MAX (__TCA_POLICE_MAX - 1)
152 #define TCA_CLS_FLAGS_SKIP_HW (1 << 0)
153 #define TCA_CLS_FLAGS_SKIP_SW (1 << 1)
154 #define TCA_CLS_FLAGS_IN_HW (1 << 2)
155 #define TCA_CLS_FLAGS_NOT_IN_HW (1 << 3)
156 #define TCA_CLS_FLAGS_VERBOSE (1 << 4)
157 #define TC_U32_HTID(h) ((h) & 0xFFF00000)
158 #define TC_U32_USERHTID(h) (TC_U32_HTID(h) >> 20)
159 #define TC_U32_HASH(h) (((h) >> 12) & 0xFF)
160 #define TC_U32_NODE(h) ((h) & 0xFFF)
161 #define TC_U32_KEY(h) ((h) & 0xFFFFF)
162 #define TC_U32_UNSPEC 0
163 #define TC_U32_ROOT (0xFFF00000)
164 enum {
165   TCA_U32_UNSPEC,
166   TCA_U32_CLASSID,
167   TCA_U32_HASH,
168   TCA_U32_LINK,
169   TCA_U32_DIVISOR,
170   TCA_U32_SEL,
171   TCA_U32_POLICE,
172   TCA_U32_ACT,
173   TCA_U32_INDEV,
174   TCA_U32_PCNT,
175   TCA_U32_MARK,
176   TCA_U32_FLAGS,
177   TCA_U32_PAD,
178   __TCA_U32_MAX
179 };
180 #define TCA_U32_MAX (__TCA_U32_MAX - 1)
181 struct tc_u32_key {
182   __be32 mask;
183   __be32 val;
184   int off;
185   int offmask;
186 };
187 struct tc_u32_sel {
188   unsigned char flags;
189   unsigned char offshift;
190   unsigned char nkeys;
191   __be16 offmask;
192   __u16 off;
193   short offoff;
194   short hoff;
195   __be32 hmask;
196   struct tc_u32_key keys[0];
197 };
198 struct tc_u32_mark {
199   __u32 val;
200   __u32 mask;
201   __u32 success;
202 };
203 struct tc_u32_pcnt {
204   __u64 rcnt;
205   __u64 rhit;
206   __u64 kcnts[0];
207 };
208 #define TC_U32_TERMINAL 1
209 #define TC_U32_OFFSET 2
210 #define TC_U32_VAROFFSET 4
211 #define TC_U32_EAT 8
212 #define TC_U32_MAXDEPTH 8
213 enum {
214   TCA_RSVP_UNSPEC,
215   TCA_RSVP_CLASSID,
216   TCA_RSVP_DST,
217   TCA_RSVP_SRC,
218   TCA_RSVP_PINFO,
219   TCA_RSVP_POLICE,
220   TCA_RSVP_ACT,
221   __TCA_RSVP_MAX
222 };
223 #define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1)
224 struct tc_rsvp_gpi {
225   __u32 key;
226   __u32 mask;
227   int offset;
228 };
229 struct tc_rsvp_pinfo {
230   struct tc_rsvp_gpi dpi;
231   struct tc_rsvp_gpi spi;
232   __u8 protocol;
233   __u8 tunnelid;
234   __u8 tunnelhdr;
235   __u8 pad;
236 };
237 enum {
238   TCA_ROUTE4_UNSPEC,
239   TCA_ROUTE4_CLASSID,
240   TCA_ROUTE4_TO,
241   TCA_ROUTE4_FROM,
242   TCA_ROUTE4_IIF,
243   TCA_ROUTE4_POLICE,
244   TCA_ROUTE4_ACT,
245   __TCA_ROUTE4_MAX
246 };
247 #define TCA_ROUTE4_MAX (__TCA_ROUTE4_MAX - 1)
248 enum {
249   TCA_FW_UNSPEC,
250   TCA_FW_CLASSID,
251   TCA_FW_POLICE,
252   TCA_FW_INDEV,
253   TCA_FW_ACT,
254   TCA_FW_MASK,
255   __TCA_FW_MAX
256 };
257 #define TCA_FW_MAX (__TCA_FW_MAX - 1)
258 enum {
259   TCA_TCINDEX_UNSPEC,
260   TCA_TCINDEX_HASH,
261   TCA_TCINDEX_MASK,
262   TCA_TCINDEX_SHIFT,
263   TCA_TCINDEX_FALL_THROUGH,
264   TCA_TCINDEX_CLASSID,
265   TCA_TCINDEX_POLICE,
266   TCA_TCINDEX_ACT,
267   __TCA_TCINDEX_MAX
268 };
269 #define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1)
270 enum {
271   FLOW_KEY_SRC,
272   FLOW_KEY_DST,
273   FLOW_KEY_PROTO,
274   FLOW_KEY_PROTO_SRC,
275   FLOW_KEY_PROTO_DST,
276   FLOW_KEY_IIF,
277   FLOW_KEY_PRIORITY,
278   FLOW_KEY_MARK,
279   FLOW_KEY_NFCT,
280   FLOW_KEY_NFCT_SRC,
281   FLOW_KEY_NFCT_DST,
282   FLOW_KEY_NFCT_PROTO_SRC,
283   FLOW_KEY_NFCT_PROTO_DST,
284   FLOW_KEY_RTCLASSID,
285   FLOW_KEY_SKUID,
286   FLOW_KEY_SKGID,
287   FLOW_KEY_VLAN_TAG,
288   FLOW_KEY_RXHASH,
289   __FLOW_KEY_MAX,
290 };
291 #define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1)
292 enum {
293   FLOW_MODE_MAP,
294   FLOW_MODE_HASH,
295 };
296 enum {
297   TCA_FLOW_UNSPEC,
298   TCA_FLOW_KEYS,
299   TCA_FLOW_MODE,
300   TCA_FLOW_BASECLASS,
301   TCA_FLOW_RSHIFT,
302   TCA_FLOW_ADDEND,
303   TCA_FLOW_MASK,
304   TCA_FLOW_XOR,
305   TCA_FLOW_DIVISOR,
306   TCA_FLOW_ACT,
307   TCA_FLOW_POLICE,
308   TCA_FLOW_EMATCHES,
309   TCA_FLOW_PERTURB,
310   __TCA_FLOW_MAX
311 };
312 #define TCA_FLOW_MAX (__TCA_FLOW_MAX - 1)
313 struct tc_basic_pcnt {
314   __u64 rcnt;
315   __u64 rhit;
316 };
317 enum {
318   TCA_BASIC_UNSPEC,
319   TCA_BASIC_CLASSID,
320   TCA_BASIC_EMATCHES,
321   TCA_BASIC_ACT,
322   TCA_BASIC_POLICE,
323   TCA_BASIC_PCNT,
324   TCA_BASIC_PAD,
325   __TCA_BASIC_MAX
326 };
327 #define TCA_BASIC_MAX (__TCA_BASIC_MAX - 1)
328 enum {
329   TCA_CGROUP_UNSPEC,
330   TCA_CGROUP_ACT,
331   TCA_CGROUP_POLICE,
332   TCA_CGROUP_EMATCHES,
333   __TCA_CGROUP_MAX,
334 };
335 #define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1)
336 #define TCA_BPF_FLAG_ACT_DIRECT (1 << 0)
337 enum {
338   TCA_BPF_UNSPEC,
339   TCA_BPF_ACT,
340   TCA_BPF_POLICE,
341   TCA_BPF_CLASSID,
342   TCA_BPF_OPS_LEN,
343   TCA_BPF_OPS,
344   TCA_BPF_FD,
345   TCA_BPF_NAME,
346   TCA_BPF_FLAGS,
347   TCA_BPF_FLAGS_GEN,
348   TCA_BPF_TAG,
349   TCA_BPF_ID,
350   __TCA_BPF_MAX,
351 };
352 #define TCA_BPF_MAX (__TCA_BPF_MAX - 1)
353 enum {
354   TCA_FLOWER_UNSPEC,
355   TCA_FLOWER_CLASSID,
356   TCA_FLOWER_INDEV,
357   TCA_FLOWER_ACT,
358   TCA_FLOWER_KEY_ETH_DST,
359   TCA_FLOWER_KEY_ETH_DST_MASK,
360   TCA_FLOWER_KEY_ETH_SRC,
361   TCA_FLOWER_KEY_ETH_SRC_MASK,
362   TCA_FLOWER_KEY_ETH_TYPE,
363   TCA_FLOWER_KEY_IP_PROTO,
364   TCA_FLOWER_KEY_IPV4_SRC,
365   TCA_FLOWER_KEY_IPV4_SRC_MASK,
366   TCA_FLOWER_KEY_IPV4_DST,
367   TCA_FLOWER_KEY_IPV4_DST_MASK,
368   TCA_FLOWER_KEY_IPV6_SRC,
369   TCA_FLOWER_KEY_IPV6_SRC_MASK,
370   TCA_FLOWER_KEY_IPV6_DST,
371   TCA_FLOWER_KEY_IPV6_DST_MASK,
372   TCA_FLOWER_KEY_TCP_SRC,
373   TCA_FLOWER_KEY_TCP_DST,
374   TCA_FLOWER_KEY_UDP_SRC,
375   TCA_FLOWER_KEY_UDP_DST,
376   TCA_FLOWER_FLAGS,
377   TCA_FLOWER_KEY_VLAN_ID,
378   TCA_FLOWER_KEY_VLAN_PRIO,
379   TCA_FLOWER_KEY_VLAN_ETH_TYPE,
380   TCA_FLOWER_KEY_ENC_KEY_ID,
381   TCA_FLOWER_KEY_ENC_IPV4_SRC,
382   TCA_FLOWER_KEY_ENC_IPV4_SRC_MASK,
383   TCA_FLOWER_KEY_ENC_IPV4_DST,
384   TCA_FLOWER_KEY_ENC_IPV4_DST_MASK,
385   TCA_FLOWER_KEY_ENC_IPV6_SRC,
386   TCA_FLOWER_KEY_ENC_IPV6_SRC_MASK,
387   TCA_FLOWER_KEY_ENC_IPV6_DST,
388   TCA_FLOWER_KEY_ENC_IPV6_DST_MASK,
389   TCA_FLOWER_KEY_TCP_SRC_MASK,
390   TCA_FLOWER_KEY_TCP_DST_MASK,
391   TCA_FLOWER_KEY_UDP_SRC_MASK,
392   TCA_FLOWER_KEY_UDP_DST_MASK,
393   TCA_FLOWER_KEY_SCTP_SRC_MASK,
394   TCA_FLOWER_KEY_SCTP_DST_MASK,
395   TCA_FLOWER_KEY_SCTP_SRC,
396   TCA_FLOWER_KEY_SCTP_DST,
397   TCA_FLOWER_KEY_ENC_UDP_SRC_PORT,
398   TCA_FLOWER_KEY_ENC_UDP_SRC_PORT_MASK,
399   TCA_FLOWER_KEY_ENC_UDP_DST_PORT,
400   TCA_FLOWER_KEY_ENC_UDP_DST_PORT_MASK,
401   TCA_FLOWER_KEY_FLAGS,
402   TCA_FLOWER_KEY_FLAGS_MASK,
403   TCA_FLOWER_KEY_ICMPV4_CODE,
404   TCA_FLOWER_KEY_ICMPV4_CODE_MASK,
405   TCA_FLOWER_KEY_ICMPV4_TYPE,
406   TCA_FLOWER_KEY_ICMPV4_TYPE_MASK,
407   TCA_FLOWER_KEY_ICMPV6_CODE,
408   TCA_FLOWER_KEY_ICMPV6_CODE_MASK,
409   TCA_FLOWER_KEY_ICMPV6_TYPE,
410   TCA_FLOWER_KEY_ICMPV6_TYPE_MASK,
411   TCA_FLOWER_KEY_ARP_SIP,
412   TCA_FLOWER_KEY_ARP_SIP_MASK,
413   TCA_FLOWER_KEY_ARP_TIP,
414   TCA_FLOWER_KEY_ARP_TIP_MASK,
415   TCA_FLOWER_KEY_ARP_OP,
416   TCA_FLOWER_KEY_ARP_OP_MASK,
417   TCA_FLOWER_KEY_ARP_SHA,
418   TCA_FLOWER_KEY_ARP_SHA_MASK,
419   TCA_FLOWER_KEY_ARP_THA,
420   TCA_FLOWER_KEY_ARP_THA_MASK,
421   TCA_FLOWER_KEY_MPLS_TTL,
422   TCA_FLOWER_KEY_MPLS_BOS,
423   TCA_FLOWER_KEY_MPLS_TC,
424   TCA_FLOWER_KEY_MPLS_LABEL,
425   TCA_FLOWER_KEY_TCP_FLAGS,
426   TCA_FLOWER_KEY_TCP_FLAGS_MASK,
427   TCA_FLOWER_KEY_IP_TOS,
428   TCA_FLOWER_KEY_IP_TOS_MASK,
429   TCA_FLOWER_KEY_IP_TTL,
430   TCA_FLOWER_KEY_IP_TTL_MASK,
431   TCA_FLOWER_KEY_CVLAN_ID,
432   TCA_FLOWER_KEY_CVLAN_PRIO,
433   TCA_FLOWER_KEY_CVLAN_ETH_TYPE,
434   TCA_FLOWER_KEY_ENC_IP_TOS,
435   TCA_FLOWER_KEY_ENC_IP_TOS_MASK,
436   TCA_FLOWER_KEY_ENC_IP_TTL,
437   TCA_FLOWER_KEY_ENC_IP_TTL_MASK,
438   TCA_FLOWER_KEY_ENC_OPTS,
439   TCA_FLOWER_KEY_ENC_OPTS_MASK,
440   TCA_FLOWER_IN_HW_COUNT,
441   TCA_FLOWER_KEY_PORT_SRC_MIN,
442   TCA_FLOWER_KEY_PORT_SRC_MAX,
443   TCA_FLOWER_KEY_PORT_DST_MIN,
444   TCA_FLOWER_KEY_PORT_DST_MAX,
445   TCA_FLOWER_KEY_CT_STATE,
446   TCA_FLOWER_KEY_CT_STATE_MASK,
447   TCA_FLOWER_KEY_CT_ZONE,
448   TCA_FLOWER_KEY_CT_ZONE_MASK,
449   TCA_FLOWER_KEY_CT_MARK,
450   TCA_FLOWER_KEY_CT_MARK_MASK,
451   TCA_FLOWER_KEY_CT_LABELS,
452   TCA_FLOWER_KEY_CT_LABELS_MASK,
453   __TCA_FLOWER_MAX,
454 };
455 #define TCA_FLOWER_MAX (__TCA_FLOWER_MAX - 1)
456 enum {
457   TCA_FLOWER_KEY_CT_FLAGS_NEW = 1 << 0,
458   TCA_FLOWER_KEY_CT_FLAGS_ESTABLISHED = 1 << 1,
459   TCA_FLOWER_KEY_CT_FLAGS_RELATED = 1 << 2,
460   TCA_FLOWER_KEY_CT_FLAGS_TRACKED = 1 << 3,
461 };
462 enum {
463   TCA_FLOWER_KEY_ENC_OPTS_UNSPEC,
464   TCA_FLOWER_KEY_ENC_OPTS_GENEVE,
465   TCA_FLOWER_KEY_ENC_OPTS_VXLAN,
466   TCA_FLOWER_KEY_ENC_OPTS_ERSPAN,
467   __TCA_FLOWER_KEY_ENC_OPTS_MAX,
468 };
469 #define TCA_FLOWER_KEY_ENC_OPTS_MAX (__TCA_FLOWER_KEY_ENC_OPTS_MAX - 1)
470 enum {
471   TCA_FLOWER_KEY_ENC_OPT_GENEVE_UNSPEC,
472   TCA_FLOWER_KEY_ENC_OPT_GENEVE_CLASS,
473   TCA_FLOWER_KEY_ENC_OPT_GENEVE_TYPE,
474   TCA_FLOWER_KEY_ENC_OPT_GENEVE_DATA,
475   __TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX,
476 };
477 #define TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX (__TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX - 1)
478 enum {
479   TCA_FLOWER_KEY_ENC_OPT_VXLAN_UNSPEC,
480   TCA_FLOWER_KEY_ENC_OPT_VXLAN_GBP,
481   __TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX,
482 };
483 #define TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX (__TCA_FLOWER_KEY_ENC_OPT_VXLAN_MAX - 1)
484 enum {
485   TCA_FLOWER_KEY_ENC_OPT_ERSPAN_UNSPEC,
486   TCA_FLOWER_KEY_ENC_OPT_ERSPAN_VER,
487   TCA_FLOWER_KEY_ENC_OPT_ERSPAN_INDEX,
488   TCA_FLOWER_KEY_ENC_OPT_ERSPAN_DIR,
489   TCA_FLOWER_KEY_ENC_OPT_ERSPAN_HWID,
490   __TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX,
491 };
492 #define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX (__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1)
493 enum {
494   TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0),
495   TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1),
496 };
497 #define TCA_FLOWER_MASK_FLAGS_RANGE (1 << 0)
498 struct tc_matchall_pcnt {
499   __u64 rhit;
500 };
501 enum {
502   TCA_MATCHALL_UNSPEC,
503   TCA_MATCHALL_CLASSID,
504   TCA_MATCHALL_ACT,
505   TCA_MATCHALL_FLAGS,
506   TCA_MATCHALL_PCNT,
507   TCA_MATCHALL_PAD,
508   __TCA_MATCHALL_MAX,
509 };
510 #define TCA_MATCHALL_MAX (__TCA_MATCHALL_MAX - 1)
511 struct tcf_ematch_tree_hdr {
512   __u16 nmatches;
513   __u16 progid;
514 };
515 enum {
516   TCA_EMATCH_TREE_UNSPEC,
517   TCA_EMATCH_TREE_HDR,
518   TCA_EMATCH_TREE_LIST,
519   __TCA_EMATCH_TREE_MAX
520 };
521 #define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1)
522 struct tcf_ematch_hdr {
523   __u16 matchid;
524   __u16 kind;
525   __u16 flags;
526   __u16 pad;
527 };
528 #define TCF_EM_REL_END 0
529 #define TCF_EM_REL_AND (1 << 0)
530 #define TCF_EM_REL_OR (1 << 1)
531 #define TCF_EM_INVERT (1 << 2)
532 #define TCF_EM_SIMPLE (1 << 3)
533 #define TCF_EM_REL_MASK 3
534 #define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK)
535 enum {
536   TCF_LAYER_LINK,
537   TCF_LAYER_NETWORK,
538   TCF_LAYER_TRANSPORT,
539   __TCF_LAYER_MAX
540 };
541 #define TCF_LAYER_MAX (__TCF_LAYER_MAX - 1)
542 #define TCF_EM_CONTAINER 0
543 #define TCF_EM_CMP 1
544 #define TCF_EM_NBYTE 2
545 #define TCF_EM_U32 3
546 #define TCF_EM_META 4
547 #define TCF_EM_TEXT 5
548 #define TCF_EM_VLAN 6
549 #define TCF_EM_CANID 7
550 #define TCF_EM_IPSET 8
551 #define TCF_EM_IPT 9
552 #define TCF_EM_MAX 9
553 enum {
554   TCF_EM_PROG_TC
555 };
556 enum {
557   TCF_EM_OPND_EQ,
558   TCF_EM_OPND_GT,
559   TCF_EM_OPND_LT
560 };
561 #endif
562