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