DPDK  19.11.0
rte_flow.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2016 6WIND S.A.
3  * Copyright 2016 Mellanox Technologies, Ltd
4  */
5 
6 #ifndef RTE_FLOW_H_
7 #define RTE_FLOW_H_
8 
17 #include <stddef.h>
18 #include <stdint.h>
19 
20 #include <rte_arp.h>
21 #include <rte_common.h>
22 #include <rte_ether.h>
23 #include <rte_icmp.h>
24 #include <rte_ip.h>
25 #include <rte_sctp.h>
26 #include <rte_tcp.h>
27 #include <rte_udp.h>
28 #include <rte_byteorder.h>
29 #include <rte_esp.h>
30 #include <rte_higig.h>
31 #include <rte_mbuf.h>
32 #include <rte_mbuf_dyn.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
75 struct rte_flow_attr {
76  uint32_t group;
77  uint32_t priority;
78  uint32_t ingress:1;
79  uint32_t egress:1;
98  uint32_t transfer:1;
99  uint32_t reserved:29;
100 };
101 
128 
138 
148 
156 
166 
176 
186 
196 
203 
210 
217 
224 
231 
238 
245 
252 
259 
266 
273 
280 
287 
294 
306 
315 
324 
333 
340 
347 
354 
361 
368 
375 
382 
389 
396 
403 
411 
419 
426 
435 
448 
457 
466 
475 
484 
491 
498 
505 
511 
520 };
521 
529  struct rte_higig2_hdr hdr;
530 };
531 
533 #ifndef __cplusplus
535  .hdr = {
536  .ppt1 = {
537  .classification = 0xffff,
538  .vid = 0xfff,
539  },
540  },
541 };
542 #endif
543 
556  uint32_t num;
557 };
558 
560 #ifndef __cplusplus
562  .num = 0x00000000,
563 };
564 #endif
565 
585  uint32_t id;
586 };
587 
589 #ifndef __cplusplus
591  .id = 0x00000000,
592 };
593 #endif
594 
616  uint32_t index;
617 };
618 
620 #ifndef __cplusplus
622  .index = 0x00000000,
623 };
624 #endif
625 
642  uint32_t id;
643 };
644 
646 #ifndef __cplusplus
648  .id = 0xffffffff,
649 };
650 #endif
651 
671  uint32_t relative:1;
672  uint32_t search:1;
673  uint32_t reserved:30;
674  int32_t offset;
675  uint16_t limit;
676  uint16_t length;
677  const uint8_t *pattern;
678 };
679 
681 #ifndef __cplusplus
683  .relative = 1,
684  .search = 1,
685  .reserved = 0x3fffffff,
686  .offset = 0xffffffff,
687  .limit = 0xffff,
688  .length = 0xffff,
689  .pattern = NULL,
690 };
691 #endif
692 
714 };
715 
717 #ifndef __cplusplus
719  .dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
720  .src.addr_bytes = "\xff\xff\xff\xff\xff\xff",
721  .type = RTE_BE16(0x0000),
722 };
723 #endif
724 
739 };
740 
742 #ifndef __cplusplus
744  .tci = RTE_BE16(0x0fff),
745  .inner_type = RTE_BE16(0x0000),
746 };
747 #endif
748 
757  struct rte_ipv4_hdr hdr;
758 };
759 
761 #ifndef __cplusplus
763  .hdr = {
764  .src_addr = RTE_BE32(0xffffffff),
765  .dst_addr = RTE_BE32(0xffffffff),
766  },
767 };
768 #endif
769 
779  struct rte_ipv6_hdr hdr;
780  uint32_t is_frag:1;
781  uint32_t reserved:31;
782 };
783 
785 #ifndef __cplusplus
787  .hdr = {
788  .src_addr =
789  "\xff\xff\xff\xff\xff\xff\xff\xff"
790  "\xff\xff\xff\xff\xff\xff\xff\xff",
791  .dst_addr =
792  "\xff\xff\xff\xff\xff\xff\xff\xff"
793  "\xff\xff\xff\xff\xff\xff\xff\xff",
794  },
795 };
796 #endif
797 
804  struct rte_icmp_hdr hdr;
805 };
806 
808 #ifndef __cplusplus
810  .hdr = {
811  .icmp_type = 0xff,
812  .icmp_code = 0xff,
813  },
814 };
815 #endif
816 
823  struct rte_udp_hdr hdr;
824 };
825 
827 #ifndef __cplusplus
829  .hdr = {
830  .src_port = RTE_BE16(0xffff),
831  .dst_port = RTE_BE16(0xffff),
832  },
833 };
834 #endif
835 
842  struct rte_tcp_hdr hdr;
843 };
844 
846 #ifndef __cplusplus
848  .hdr = {
849  .src_port = RTE_BE16(0xffff),
850  .dst_port = RTE_BE16(0xffff),
851  },
852 };
853 #endif
854 
861  struct rte_sctp_hdr hdr;
862 };
863 
865 #ifndef __cplusplus
867  .hdr = {
868  .src_port = RTE_BE16(0xffff),
869  .dst_port = RTE_BE16(0xffff),
870  },
871 };
872 #endif
873 
880  uint8_t flags;
881  uint8_t rsvd0[3];
882  uint8_t vni[3];
883  uint8_t rsvd1;
884 };
885 
887 #ifndef __cplusplus
889  .vni = "\xff\xff\xff",
890 };
891 #endif
892 
909  uint8_t in_ecid_e;
910  uint8_t ecid_e;
912 };
913 
915 #ifndef __cplusplus
917  .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
918 };
919 #endif
920 
935  uint8_t tni[3];
936  uint8_t flow_id;
937 };
938 
940 #ifndef __cplusplus
942  .tni = "\xff\xff\xff",
943 };
944 #endif
945 
955  uint8_t label_tc_s[3];
956  uint8_t ttl;
957 };
958 
960 #ifndef __cplusplus
962  .label_tc_s = "\xff\xff\xf0",
963 };
964 #endif
965 
978 };
979 
981 #ifndef __cplusplus
983  .protocol = RTE_BE16(0xffff),
984 };
985 #endif
986 
1005  uint32_t thresh;
1006 };
1007 
1009 #ifndef __cplusplus
1011  .thresh = 0xffffffff,
1012 };
1013 #endif
1014 
1028  uint8_t msg_type;
1031 };
1032 
1034 #ifndef __cplusplus
1036  .teid = RTE_BE32(0xffffffff),
1037 };
1038 #endif
1039 
1046  struct rte_esp_hdr hdr;
1047 };
1048 
1050 #ifndef __cplusplus
1052  .hdr = {
1053  .spi = RTE_BE32(0xffffffff),
1054  },
1055 };
1056 #endif
1057 
1070  uint8_t vni[3];
1071  uint8_t rsvd1;
1072 };
1073 
1075 #ifndef __cplusplus
1077  .vni = "\xff\xff\xff",
1078 };
1079 #endif
1080 
1087  uint8_t flags;
1088  uint8_t rsvd0[2];
1089  uint8_t protocol;
1090  uint8_t vni[3];
1091  uint8_t rsvd1;
1092 };
1093 
1095 #ifndef __cplusplus
1097  .vni = "\xff\xff\xff",
1098 };
1099 #endif
1100 
1109  uint8_t hln;
1110  uint8_t pln;
1116 };
1117 
1119 #ifndef __cplusplus
1120 static const struct rte_flow_item_arp_eth_ipv4
1122  .sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1123  .spa = RTE_BE32(0xffffffff),
1124  .tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1125  .tpa = RTE_BE32(0xffffffff),
1126 };
1127 #endif
1128 
1140  uint8_t next_hdr;
1141 };
1142 
1144 #ifndef __cplusplus
1145 static const
1147  .next_hdr = 0xff,
1148 };
1149 #endif
1150 
1162  struct rte_ipv6_fragment_ext hdr;
1163 };
1164 
1171  uint8_t type;
1172  uint8_t code;
1173  uint16_t checksum;
1174 };
1175 
1177 #ifndef __cplusplus
1179  .type = 0xff,
1180  .code = 0xff,
1181 };
1182 #endif
1183 
1190  uint8_t type;
1191  uint8_t code;
1194  uint8_t target_addr[16];
1195 };
1196 
1198 #ifndef __cplusplus
1199 static const
1201  .target_addr =
1202  "\xff\xff\xff\xff\xff\xff\xff\xff"
1203  "\xff\xff\xff\xff\xff\xff\xff\xff",
1204 };
1205 #endif
1206 
1213  uint8_t type;
1214  uint8_t code;
1221  uint8_t target_addr[16];
1222 };
1223 
1225 #ifndef __cplusplus
1226 static const
1228  .target_addr =
1229  "\xff\xff\xff\xff\xff\xff\xff\xff"
1230  "\xff\xff\xff\xff\xff\xff\xff\xff",
1231 };
1232 #endif
1233 
1246  uint8_t type;
1247  uint8_t length;
1248 };
1249 
1251 #ifndef __cplusplus
1252 static const struct rte_flow_item_icmp6_nd_opt
1254  .type = 0xff,
1255 };
1256 #endif
1257 
1270  uint8_t type;
1271  uint8_t length;
1273 };
1274 
1276 #ifndef __cplusplus
1277 static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1279  .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1280 };
1281 #endif
1282 
1295  uint8_t type;
1296  uint8_t length;
1298 };
1299 
1301 #ifndef __cplusplus
1302 static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1304  .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1305 };
1306 #endif
1307 
1319  uint32_t data;
1320 };
1321 
1323 #ifndef __cplusplus
1325  .data = UINT32_MAX,
1326 };
1327 #endif
1328 
1335  uint8_t pdu_type;
1336  uint8_t qfi;
1337 };
1338 
1340 #ifndef __cplusplus
1341 static const struct rte_flow_item_gtp_psc
1343  .qfi = 0x3f,
1344 };
1345 #endif
1346 
1356  uint8_t version_type;
1357  uint8_t code;
1360 };
1361 
1376 };
1377 
1379 #ifndef __cplusplus
1380 static const struct rte_flow_item_pppoe_proto_id
1382  .proto_id = RTE_BE16(0xffff),
1383 };
1384 #endif
1385 
1395  uint32_t data;
1396  uint8_t index;
1397 };
1398 
1400 #ifndef __cplusplus
1402  .data = 0xffffffff,
1403  .index = 0xff,
1404 };
1405 #endif
1406 
1426  uint32_t id;
1427 };
1428 
1430 #ifndef __cplusplus
1432  .id = 0xffffffff,
1433 };
1434 #endif
1435 
1446  uint32_t version:2;
1447  uint32_t oam_pkt:1;
1448  uint32_t reserved:1;
1449  uint32_t ttl:6;
1450  uint32_t length:6;
1451  uint32_t reserved1:4;
1452  uint32_t mdtype:4;
1453  uint32_t next_proto:8;
1454  uint32_t spi:24;
1455  uint32_t sindex:8;
1456 };
1457 
1459 #ifndef __cplusplus
1461  .mdtype = 0xf,
1462  .next_proto = 0xff,
1463  .spi = 0xffffff,
1464  .sindex = 0xff,
1465 };
1466 #endif
1467 
1478  uint32_t type:8;
1479  uint32_t max_resp_time:8;
1480  uint32_t checksum:16;
1481  uint32_t group_addr;
1482 };
1483 
1485 #ifndef __cplusplus
1487  .group_addr = 0xffffffff,
1488 };
1489 #endif
1490 
1501  uint32_t next_hdr:8;
1502  uint32_t payload_len:8;
1503  uint32_t reserved:16;
1504  uint32_t spi;
1505  uint32_t seq_num;
1506 };
1507 
1509 #ifndef __cplusplus
1511  .spi = 0xffffffff,
1512 };
1513 #endif
1514 
1550  const void *spec;
1551  const void *last;
1552  const void *mask;
1553 };
1554 
1589 
1597 
1605 
1614 
1622 
1630 
1637 
1646 
1656 
1665 
1673 
1681 
1689 
1696 
1704 
1712 
1720 
1728 
1736 
1744 
1753 
1762 
1770 
1778 
1786 
1794 
1802 
1810 
1818 
1827 
1835 
1844 
1851 
1858 
1868 
1878 
1888 
1898 
1909 
1920 
1931 
1938 
1945 
1955 
1965 
1979 
1993 
2007 
2021 
2031 
2038 
2048 
2058 
2068 };
2069 
2081  uint32_t id;
2082 };
2083 
2097  uint32_t group;
2098 };
2099 
2106  uint16_t index;
2107 };
2108 
2123  uint32_t timeout:24;
2124  uint32_t reserved:8;
2125  void *context;
2127 };
2128 
2155  uint32_t shared:1;
2156  uint32_t reserved:31;
2157  uint32_t id;
2158 };
2159 
2166  uint32_t reset:1;
2167  uint32_t hits_set:1;
2168  uint32_t bytes_set:1;
2169  uint32_t reserved:29;
2170  uint64_t hits;
2171  uint64_t bytes;
2172 };
2173 
2178  RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
2187  RTE_ETH_HASH_FUNCTION_MAX,
2188 };
2189 
2233  uint32_t level;
2234  uint64_t types;
2235  uint32_t key_len;
2236  uint32_t queue_num;
2237  const uint8_t *key;
2238  const uint16_t *queue;
2239 };
2240 
2254  uint32_t original:1;
2255  uint32_t reserved:31;
2256  uint32_t id;
2257 };
2258 
2268  uint32_t original:1;
2269  uint32_t reserved:31;
2270  uint32_t index;
2271 };
2272 
2281  uint32_t original:1;
2282  uint32_t reserved:31;
2283  uint32_t id;
2284 };
2285 
2295  uint32_t mtr_id;
2296 };
2297 
2325 };
2326 
2334  uint8_t mpls_ttl;
2335 };
2336 
2344  uint8_t nw_ttl;
2345 };
2346 
2355 };
2356 
2365 };
2366 
2374  uint8_t vlan_pcp;
2375 };
2376 
2385 };
2386 
2395 };
2396 
2430 };
2431 
2464 };
2465 
2486  uint8_t *data;
2487  uint8_t *preserve;
2488  size_t size;
2489 };
2490 
2507  uint8_t *data;
2508  size_t size;
2509 };
2510 
2523  rte_be32_t ipv4_addr;
2524 };
2525 
2538  uint8_t ipv6_addr[16];
2539 };
2540 
2553  rte_be16_t port;
2554 };
2555 
2562  uint8_t ttl_value;
2563 };
2564 
2571  uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
2572 };
2573 
2584  uint32_t data;
2585  uint32_t mask;
2586  uint8_t index;
2587 };
2588 
2609  uint32_t data;
2610  uint32_t mask;
2611 };
2612 
2621  uint8_t dscp;
2622 };
2623 
2624 /* Mbuf dynamic field offset for metadata. */
2625 extern int32_t rte_flow_dynf_metadata_offs;
2626 
2627 /* Mbuf dynamic field flag mask for metadata. */
2628 extern uint64_t rte_flow_dynf_metadata_mask;
2629 
2630 /* Mbuf dynamic field pointer for metadata. */
2631 #define RTE_FLOW_DYNF_METADATA(m) \
2632  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
2633 
2634 /* Mbuf dynamic flags for metadata. */
2635 #define PKT_RX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
2636 #define PKT_TX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
2637 
2638 __rte_experimental
2639 static inline uint32_t
2640 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
2641 {
2642  return *RTE_FLOW_DYNF_METADATA(m);
2643 }
2644 
2645 __rte_experimental
2646 static inline void
2647 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
2648 {
2649  *RTE_FLOW_DYNF_METADATA(m) = v;
2650 }
2651 
2652 /*
2653  * Definition of a single action.
2654  *
2655  * A list of actions is terminated by a END action.
2656  *
2657  * For simple actions without a configuration object, conf remains NULL.
2658  */
2659 struct rte_flow_action {
2660  enum rte_flow_action_type type;
2661  const void *conf;
2662 };
2663 
2670 struct rte_flow;
2671 
2696 };
2697 
2711  const void *cause;
2712  const char *message;
2713 };
2714 
2725  union {
2726  const struct rte_flow_attr *attr_ro;
2728  };
2729  union {
2730  const struct rte_flow_item *pattern_ro;
2732  };
2733  union {
2734  const struct rte_flow_action *actions_ro;
2735  struct rte_flow_action *actions;
2736  };
2737 };
2738 
2751 
2763 
2775 
2787 
2800 
2813 
2826 
2840 
2854 
2868 
2882 };
2883 
2901 __rte_experimental
2902 int
2903 rte_flow_dev_dump(uint16_t port_id, FILE *file, struct rte_flow_error *error);
2904 
2911 __rte_experimental
2912 static inline int
2914 {
2915  return !!rte_flow_dynf_metadata_mask;
2916 }
2917 
2928 __rte_experimental
2929 int
2931 
2984 int
2985 rte_flow_validate(uint16_t port_id,
2986  const struct rte_flow_attr *attr,
2987  const struct rte_flow_item pattern[],
2988  const struct rte_flow_action actions[],
2989  struct rte_flow_error *error);
2990 
3011 struct rte_flow *
3012 rte_flow_create(uint16_t port_id,
3013  const struct rte_flow_attr *attr,
3014  const struct rte_flow_item pattern[],
3015  const struct rte_flow_action actions[],
3016  struct rte_flow_error *error);
3017 
3038 int
3039 rte_flow_destroy(uint16_t port_id,
3040  struct rte_flow *flow,
3041  struct rte_flow_error *error);
3042 
3059 int
3060 rte_flow_flush(uint16_t port_id,
3061  struct rte_flow_error *error);
3062 
3087 int
3088 rte_flow_query(uint16_t port_id,
3089  struct rte_flow *flow,
3090  const struct rte_flow_action *action,
3091  void *data,
3092  struct rte_flow_error *error);
3093 
3135 int
3136 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
3137 
3155 int
3156 rte_flow_error_set(struct rte_flow_error *error,
3157  int code,
3158  enum rte_flow_error_type type,
3159  const void *cause,
3160  const char *message);
3161 
3167  size_t size;
3170  struct rte_flow_action *actions;
3171  uint8_t data[];
3172 };
3173 
3200 __rte_deprecated
3201 size_t
3202 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
3203  const struct rte_flow_attr *attr,
3204  const struct rte_flow_item *items,
3205  const struct rte_flow_action *actions);
3206 
3247 __rte_experimental
3248 int
3250  void *dst,
3251  size_t size,
3252  const void *src,
3253  struct rte_flow_error *error);
3254 
3283 __rte_experimental
3284 int
3285 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
3286  uint32_t nb_contexts, struct rte_flow_error *error);
3287 
3288 #ifdef __cplusplus
3289 }
3290 #endif
3291 
3292 #endif /* RTE_FLOW_H_ */
uint32_t reserved
Definition: rte_flow.h:99
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
Definition: rte_flow.h:1278
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:976
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1068
uint32_t reserved
Definition: rte_flow.h:781
int rte_flow_validate(uint16_t port_id, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], struct rte_flow_error *error)
struct rte_flow_action * actions
Definition: rte_flow.h:2735
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1227
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:786
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:906
rte_be16_t protocol
Definition: rte_flow.h:1069
uint32_t num
Definition: rte_flow.h:556
struct rte_flow_attr * attr
Definition: rte_flow.h:2727
uint32_t rte_be32_t
uint32_t original
Definition: rte_flow.h:2254
int rte_flow_query(uint16_t port_id, struct rte_flow *flow, const struct rte_flow_action *action, void *data, struct rte_flow_error *error)
uint32_t group
Definition: rte_flow.h:76
struct rte_flow_item * definition
Definition: rte_flow.h:2429
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:982
struct rte_flow_attr attr
Definition: rte_flow.h:3168
rte_be16_t msg_len
Definition: rte_flow.h:1029
static const struct rte_flow_item_gtp rte_flow_item_gtp_mask
Definition: rte_flow.h:1035
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:809
#define RTE_ETHER_ADDR_LEN
Definition: rte_ether.h:26
static const struct rte_flow_item_geneve rte_flow_item_geneve_mask
Definition: rte_flow.h:1076
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:2726
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:866
int rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error)
static const struct rte_flow_item_any rte_flow_item_any_mask
Definition: rte_flow.h:561
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1324
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1051
struct rte_icmp_hdr hdr
Definition: rte_flow.h:804
__rte_deprecated size_t rte_flow_copy(struct rte_flow_desc *fd, size_t len, const struct rte_flow_attr *attr, const struct rte_flow_item *items, const struct rte_flow_action *actions)
uint8_t v_pt_rsv_flags
Definition: rte_flow.h:1027
struct rte_ether_addr tla
Definition: rte_flow.h:1297
rte_be16_t protocol
Definition: rte_flow.h:934
uint32_t reserved
Definition: rte_flow.h:673
rte_be32_t spi
Definition: rte_esp.h:24
static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask
Definition: rte_flow.h:1178
rte_be16_t src_port
Definition: rte_sctp.h:29
struct rte_flow_action * actions
Definition: rte_flow.h:3170
uint8_t data[]
Definition: rte_flow.h:3171
struct rte_ether_addr tha
Definition: rte_flow.h:1114
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:757
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1431
rte_be32_t src_addr
Definition: rte_ip.h:42
static const struct rte_flow_item_icmp6_nd_opt rte_flow_item_icmp6_nd_opt_mask
Definition: rte_flow.h:1253
static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask
Definition: rte_flow.h:621
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:888
uint8_t src_addr[16]
Definition: rte_ip.h:363
static const struct rte_flow_item_port_id rte_flow_item_port_id_mask
Definition: rte_flow.h:647
static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask
Definition: rte_flow.h:534
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:941
const void * mask
Definition: rte_flow.h:1552
struct rte_flow_item * pattern
Definition: rte_flow.h:2731
enum rte_eth_hash_function func
Definition: rte_flow.h:2207
rte_be16_t type
Definition: rte_flow.h:713
enum rte_flow_error_type type
Definition: rte_flow.h:2710
const void * cause
Definition: rte_flow.h:2711
static const struct rte_flow_item_udp rte_flow_item_udp_mask
Definition: rte_flow.h:828
struct rte_esp_hdr hdr
Definition: rte_flow.h:1046
rte_flow_error_type
Definition: rte_flow.h:2678
rte_flow_conv_op
Definition: rte_flow.h:2744
rte_be16_t src_port
Definition: rte_udp.h:29
uint32_t id
Definition: rte_flow.h:585
const uint8_t * pattern
Definition: rte_flow.h:677
uint32_t search
Definition: rte_flow.h:672
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:908
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:682
uint16_t limit
Definition: rte_flow.h:675
int rte_flow_flush(uint16_t port_id, struct rte_flow_error *error)
static const struct rte_flow_item_mpls rte_flow_item_mpls_mask
Definition: rte_flow.h:961
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1200
int rte_flow_error_set(struct rte_flow_error *error, int code, enum rte_flow_error_type type, const void *cause, const char *message)
const char * message
Definition: rte_flow.h:2712
rte_eth_hash_function
Definition: rte_flow.h:2177
uint16_t length
Definition: rte_flow.h:676
const void * last
Definition: rte_flow.h:1551
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1303
rte_be32_t teid
Definition: rte_flow.h:1030
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
uint32_t ingress
Definition: rte_flow.h:78
enum rte_flow_item_type type
Definition: rte_flow.h:1549
rte_be16_t tci
Definition: rte_flow.h:737
uint32_t is_frag
Definition: rte_flow.h:780
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask
Definition: rte_flow.h:762
size_t size
Definition: rte_flow.h:3167
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:933
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1342
rte_be16_t length
Definition: rte_flow.h:1359
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:2734
struct rte_flow_item * items
Definition: rte_flow.h:3169
__rte_experimental int rte_flow_get_aged_flows(uint16_t port_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
rte_flow_action_type
Definition: rte_flow.h:1581
struct rte_ether_addr sla
Definition: rte_flow.h:1272
struct rte_flow * rte_flow_create(uint16_t port_id, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], struct rte_flow_error *error)
struct rte_ether_addr dst
Definition: rte_flow.h:711
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1486
const void * spec
Definition: rte_flow.h:1550
uint8_t label_tc_s[3]
Definition: rte_flow.h:955
uint8_t version_type
Definition: rte_flow.h:1356
#define RTE_STD_C11
Definition: rte_common.h:40
const uint8_t * key
Definition: rte_flow.h:2237
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1121
struct rte_ether_addr sha
Definition: rte_flow.h:1112
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:718
rte_be16_t src_port
Definition: rte_tcp.h:29
uint16_t rte_be16_t
__rte_experimental int rte_flow_conv(enum rte_flow_conv_op op, void *dst, size_t size, const void *src, struct rte_flow_error *error)
uint32_t reserved
Definition: rte_flow.h:2255
__rte_experimental int rte_flow_dynf_metadata_register(void)
static const struct rte_flow_item_ah rte_flow_item_ah_mask
Definition: rte_flow.h:1510
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1401
uint32_t priority
Definition: rte_flow.h:77
struct rte_ether_addr src
Definition: rte_flow.h:712
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1146
static const struct rte_flow_item_vf rte_flow_item_vf_mask
Definition: rte_flow.h:590
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:779
rte_be16_t protocol
Definition: rte_flow.h:977
uint32_t queue_num
Definition: rte_flow.h:2236
uint8_t tni[3]
Definition: rte_flow.h:935
struct rte_tcp_hdr hdr
Definition: rte_flow.h:842
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1381
__rte_experimental int rte_flow_dev_dump(uint16_t port_id, FILE *file, struct rte_flow_error *error)
uint32_t transfer
Definition: rte_flow.h:98
struct rte_flow_item * definition
Definition: rte_flow.h:2463
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:743
uint8_t msg_type
Definition: rte_flow.h:1028
uint32_t egress
Definition: rte_flow.h:79
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
Definition: rte_flow.h:916
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:2913
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask
Definition: rte_flow.h:847
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1010
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:61
rte_be16_t inner_type
Definition: rte_flow.h:738
uint8_t rsvd0[3]
Definition: rte_flow.h:881
struct rte_udp_hdr hdr
Definition: rte_flow.h:823
const uint16_t * queue
Definition: rte_flow.h:2238
rte_flow_item_type
Definition: rte_flow.h:118
uint32_t relative
Definition: rte_flow.h:671
uint8_t vni[3]
Definition: rte_flow.h:882
int32_t offset
Definition: rte_flow.h:674
rte_be16_t inner_type
Definition: rte_flow.h:911
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:2730
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1096
rte_be16_t session_id
Definition: rte_flow.h:1358
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1460
struct rte_sctp_hdr hdr
Definition: rte_flow.h:861