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