DPDK  20.05.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 
404 
412 
419 
428 
441 
450 
459 
468 
477 
484 
491 
498 
504 
513 
522 
529 
530 };
531 
539  struct rte_higig2_hdr hdr;
540 };
541 
543 #ifndef __cplusplus
545  .hdr = {
546  .ppt1 = {
547  .classification = 0xffff,
548  .vid = 0xfff,
549  },
550  },
551 };
552 #endif
553 
566  uint32_t num;
567 };
568 
570 #ifndef __cplusplus
572  .num = 0x00000000,
573 };
574 #endif
575 
595  uint32_t id;
596 };
597 
599 #ifndef __cplusplus
601  .id = 0x00000000,
602 };
603 #endif
604 
626  uint32_t index;
627 };
628 
630 #ifndef __cplusplus
632  .index = 0x00000000,
633 };
634 #endif
635 
652  uint32_t id;
653 };
654 
656 #ifndef __cplusplus
658  .id = 0xffffffff,
659 };
660 #endif
661 
681  uint32_t relative:1;
682  uint32_t search:1;
683  uint32_t reserved:30;
684  int32_t offset;
685  uint16_t limit;
686  uint16_t length;
687  const uint8_t *pattern;
688 };
689 
691 #ifndef __cplusplus
693  .relative = 1,
694  .search = 1,
695  .reserved = 0x3fffffff,
696  .offset = 0xffffffff,
697  .limit = 0xffff,
698  .length = 0xffff,
699  .pattern = NULL,
700 };
701 #endif
702 
724 };
725 
727 #ifndef __cplusplus
729  .dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
730  .src.addr_bytes = "\xff\xff\xff\xff\xff\xff",
731  .type = RTE_BE16(0x0000),
732 };
733 #endif
734 
749 };
750 
752 #ifndef __cplusplus
754  .tci = RTE_BE16(0x0fff),
755  .inner_type = RTE_BE16(0x0000),
756 };
757 #endif
758 
767  struct rte_ipv4_hdr hdr;
768 };
769 
771 #ifndef __cplusplus
773  .hdr = {
774  .src_addr = RTE_BE32(0xffffffff),
775  .dst_addr = RTE_BE32(0xffffffff),
776  },
777 };
778 #endif
779 
789  struct rte_ipv6_hdr hdr;
790 };
791 
793 #ifndef __cplusplus
795  .hdr = {
796  .src_addr =
797  "\xff\xff\xff\xff\xff\xff\xff\xff"
798  "\xff\xff\xff\xff\xff\xff\xff\xff",
799  .dst_addr =
800  "\xff\xff\xff\xff\xff\xff\xff\xff"
801  "\xff\xff\xff\xff\xff\xff\xff\xff",
802  },
803 };
804 #endif
805 
812  struct rte_icmp_hdr hdr;
813 };
814 
816 #ifndef __cplusplus
818  .hdr = {
819  .icmp_type = 0xff,
820  .icmp_code = 0xff,
821  },
822 };
823 #endif
824 
831  struct rte_udp_hdr hdr;
832 };
833 
835 #ifndef __cplusplus
837  .hdr = {
838  .src_port = RTE_BE16(0xffff),
839  .dst_port = RTE_BE16(0xffff),
840  },
841 };
842 #endif
843 
850  struct rte_tcp_hdr hdr;
851 };
852 
854 #ifndef __cplusplus
856  .hdr = {
857  .src_port = RTE_BE16(0xffff),
858  .dst_port = RTE_BE16(0xffff),
859  },
860 };
861 #endif
862 
869  struct rte_sctp_hdr hdr;
870 };
871 
873 #ifndef __cplusplus
875  .hdr = {
876  .src_port = RTE_BE16(0xffff),
877  .dst_port = RTE_BE16(0xffff),
878  },
879 };
880 #endif
881 
888  uint8_t flags;
889  uint8_t rsvd0[3];
890  uint8_t vni[3];
891  uint8_t rsvd1;
892 };
893 
895 #ifndef __cplusplus
897  .vni = "\xff\xff\xff",
898 };
899 #endif
900 
917  uint8_t in_ecid_e;
918  uint8_t ecid_e;
920 };
921 
923 #ifndef __cplusplus
925  .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
926 };
927 #endif
928 
943  uint8_t tni[3];
944  uint8_t flow_id;
945 };
946 
948 #ifndef __cplusplus
950  .tni = "\xff\xff\xff",
951 };
952 #endif
953 
963  uint8_t label_tc_s[3];
964  uint8_t ttl;
965 };
966 
968 #ifndef __cplusplus
970  .label_tc_s = "\xff\xff\xf0",
971 };
972 #endif
973 
986 };
987 
989 #ifndef __cplusplus
991  .protocol = RTE_BE16(0xffff),
992 };
993 #endif
994 
1013  uint32_t thresh;
1014 };
1015 
1017 #ifndef __cplusplus
1019  .thresh = 0xffffffff,
1020 };
1021 #endif
1022 
1036  uint8_t msg_type;
1039 };
1040 
1042 #ifndef __cplusplus
1044  .teid = RTE_BE32(0xffffffff),
1045 };
1046 #endif
1047 
1054  struct rte_esp_hdr hdr;
1055 };
1056 
1058 #ifndef __cplusplus
1060  .hdr = {
1061  .spi = RTE_BE32(0xffffffff),
1062  },
1063 };
1064 #endif
1065 
1078  uint8_t vni[3];
1079  uint8_t rsvd1;
1080 };
1081 
1083 #ifndef __cplusplus
1085  .vni = "\xff\xff\xff",
1086 };
1087 #endif
1088 
1095  uint8_t flags;
1096  uint8_t rsvd0[2];
1097  uint8_t protocol;
1098  uint8_t vni[3];
1099  uint8_t rsvd1;
1100 };
1101 
1103 #ifndef __cplusplus
1105  .vni = "\xff\xff\xff",
1106 };
1107 #endif
1108 
1117  uint8_t hln;
1118  uint8_t pln;
1124 };
1125 
1127 #ifndef __cplusplus
1128 static const struct rte_flow_item_arp_eth_ipv4
1130  .sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1131  .spa = RTE_BE32(0xffffffff),
1132  .tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1133  .tpa = RTE_BE32(0xffffffff),
1134 };
1135 #endif
1136 
1148  uint8_t next_hdr;
1149 };
1150 
1152 #ifndef __cplusplus
1153 static const
1155  .next_hdr = 0xff,
1156 };
1157 #endif
1158 
1165  uint8_t type;
1166  uint8_t code;
1167  uint16_t checksum;
1168 };
1169 
1171 #ifndef __cplusplus
1173  .type = 0xff,
1174  .code = 0xff,
1175 };
1176 #endif
1177 
1184  uint8_t type;
1185  uint8_t code;
1188  uint8_t target_addr[16];
1189 };
1190 
1192 #ifndef __cplusplus
1193 static const
1195  .target_addr =
1196  "\xff\xff\xff\xff\xff\xff\xff\xff"
1197  "\xff\xff\xff\xff\xff\xff\xff\xff",
1198 };
1199 #endif
1200 
1207  uint8_t type;
1208  uint8_t code;
1215  uint8_t target_addr[16];
1216 };
1217 
1219 #ifndef __cplusplus
1220 static const
1222  .target_addr =
1223  "\xff\xff\xff\xff\xff\xff\xff\xff"
1224  "\xff\xff\xff\xff\xff\xff\xff\xff",
1225 };
1226 #endif
1227 
1240  uint8_t type;
1241  uint8_t length;
1242 };
1243 
1245 #ifndef __cplusplus
1246 static const struct rte_flow_item_icmp6_nd_opt
1248  .type = 0xff,
1249 };
1250 #endif
1251 
1264  uint8_t type;
1265  uint8_t length;
1267 };
1268 
1270 #ifndef __cplusplus
1271 static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1273  .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1274 };
1275 #endif
1276 
1289  uint8_t type;
1290  uint8_t length;
1292 };
1293 
1295 #ifndef __cplusplus
1296 static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1298  .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1299 };
1300 #endif
1301 
1313  uint32_t data;
1314 };
1315 
1317 #ifndef __cplusplus
1319  .data = UINT32_MAX,
1320 };
1321 #endif
1322 
1329  uint8_t pdu_type;
1330  uint8_t qfi;
1331 };
1332 
1334 #ifndef __cplusplus
1335 static const struct rte_flow_item_gtp_psc
1337  .qfi = 0x3f,
1338 };
1339 #endif
1340 
1350  uint8_t version_type;
1351  uint8_t code;
1354 };
1355 
1370 };
1371 
1373 #ifndef __cplusplus
1374 static const struct rte_flow_item_pppoe_proto_id
1376  .proto_id = RTE_BE16(0xffff),
1377 };
1378 #endif
1379 
1389  uint32_t data;
1390  uint8_t index;
1391 };
1392 
1394 #ifndef __cplusplus
1396  .data = 0xffffffff,
1397  .index = 0xff,
1398 };
1399 #endif
1400 
1408 };
1409 
1411 #ifndef __cplusplus
1413  .session_id = RTE_BE32(UINT32_MAX),
1414 };
1415 #endif
1416 
1417 
1437  uint32_t id;
1438 };
1439 
1441 #ifndef __cplusplus
1443  .id = 0xffffffff,
1444 };
1445 #endif
1446 
1457  uint32_t version:2;
1458  uint32_t oam_pkt:1;
1459  uint32_t reserved:1;
1460  uint32_t ttl:6;
1461  uint32_t length:6;
1462  uint32_t reserved1:4;
1463  uint32_t mdtype:4;
1464  uint32_t next_proto:8;
1465  uint32_t spi:24;
1466  uint32_t sindex:8;
1467 };
1468 
1470 #ifndef __cplusplus
1472  .mdtype = 0xf,
1473  .next_proto = 0xff,
1474  .spi = 0xffffff,
1475  .sindex = 0xff,
1476 };
1477 #endif
1478 
1489  uint32_t type:8;
1490  uint32_t max_resp_time:8;
1491  uint32_t checksum:16;
1492  uint32_t group_addr;
1493 };
1494 
1496 #ifndef __cplusplus
1498  .group_addr = 0xffffffff,
1499 };
1500 #endif
1501 
1512  uint32_t next_hdr:8;
1513  uint32_t payload_len:8;
1514  uint32_t reserved:16;
1515  uint32_t spi;
1516  uint32_t seq_num;
1517 };
1518 
1520 #ifndef __cplusplus
1522  .spi = 0xffffffff,
1523 };
1524 #endif
1525 
1535  uint8_t s_field;
1536  uint8_t msg_type;
1537  rte_be16_t msg_len;
1538  rte_be64_t seid;
1539 };
1540 
1542 #ifndef __cplusplus
1544  .s_field = 0x01,
1545  .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1546 };
1547 #endif
1548 
1584  const void *spec;
1585  const void *last;
1586  const void *mask;
1587 };
1588 
1623 
1631 
1639 
1648 
1656 
1664 
1671 
1680 
1690 
1699 
1707 
1715 
1723 
1730 
1738 
1746 
1754 
1762 
1770 
1778 
1787 
1796 
1804 
1812 
1820 
1828 
1836 
1844 
1852 
1861 
1869 
1878 
1885 
1892 
1902 
1912 
1922 
1932 
1943 
1954 
1965 
1972 
1979 
1989 
1999 
2013 
2027 
2041 
2055 
2065 
2072 
2082 
2092 
2102 };
2103 
2115  uint32_t id;
2116 };
2117 
2131  uint32_t group;
2132 };
2133 
2140  uint16_t index;
2141 };
2142 
2157  uint32_t timeout:24;
2158  uint32_t reserved:8;
2159  void *context;
2161 };
2162 
2189  uint32_t shared:1;
2190  uint32_t reserved:31;
2191  uint32_t id;
2192 };
2193 
2200  uint32_t reset:1;
2201  uint32_t hits_set:1;
2202  uint32_t bytes_set:1;
2203  uint32_t reserved:29;
2204  uint64_t hits;
2205  uint64_t bytes;
2206 };
2207 
2212  RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
2221  RTE_ETH_HASH_FUNCTION_MAX,
2222 };
2223 
2267  uint32_t level;
2268  uint64_t types;
2269  uint32_t key_len;
2270  uint32_t queue_num;
2271  const uint8_t *key;
2272  const uint16_t *queue;
2273 };
2274 
2288  uint32_t original:1;
2289  uint32_t reserved:31;
2290  uint32_t id;
2291 };
2292 
2302  uint32_t original:1;
2303  uint32_t reserved:31;
2304  uint32_t index;
2305 };
2306 
2315  uint32_t original:1;
2316  uint32_t reserved:31;
2317  uint32_t id;
2318 };
2319 
2329  uint32_t mtr_id;
2330 };
2331 
2364 };
2365 
2373  uint8_t mpls_ttl;
2374 };
2375 
2383  uint8_t nw_ttl;
2384 };
2385 
2394 };
2395 
2404 };
2405 
2413  uint8_t vlan_pcp;
2414 };
2415 
2424 };
2425 
2434 };
2435 
2469 };
2470 
2503 };
2504 
2525  uint8_t *data;
2526  uint8_t *preserve;
2527  size_t size;
2528 };
2529 
2546  uint8_t *data;
2547  size_t size;
2548 };
2549 
2562  rte_be32_t ipv4_addr;
2563 };
2564 
2577  uint8_t ipv6_addr[16];
2578 };
2579 
2592  rte_be16_t port;
2593 };
2594 
2601  uint8_t ttl_value;
2602 };
2603 
2610  uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
2611 };
2612 
2623  uint32_t data;
2624  uint32_t mask;
2625  uint8_t index;
2626 };
2627 
2648  uint32_t data;
2649  uint32_t mask;
2650 };
2651 
2660  uint8_t dscp;
2661 };
2662 
2663 /* Mbuf dynamic field offset for metadata. */
2664 extern int32_t rte_flow_dynf_metadata_offs;
2665 
2666 /* Mbuf dynamic field flag mask for metadata. */
2667 extern uint64_t rte_flow_dynf_metadata_mask;
2668 
2669 /* Mbuf dynamic field pointer for metadata. */
2670 #define RTE_FLOW_DYNF_METADATA(m) \
2671  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
2672 
2673 /* Mbuf dynamic flags for metadata. */
2674 #define PKT_RX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
2675 #define PKT_TX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
2676 
2677 __rte_experimental
2678 static inline uint32_t
2679 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
2680 {
2681  return *RTE_FLOW_DYNF_METADATA(m);
2682 }
2683 
2684 __rte_experimental
2685 static inline void
2686 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
2687 {
2688  *RTE_FLOW_DYNF_METADATA(m) = v;
2689 }
2690 
2691 /*
2692  * Definition of a single action.
2693  *
2694  * A list of actions is terminated by a END action.
2695  *
2696  * For simple actions without a configuration object, conf remains NULL.
2697  */
2698 struct rte_flow_action {
2699  enum rte_flow_action_type type;
2700  const void *conf;
2701 };
2702 
2709 struct rte_flow;
2710 
2735 };
2736 
2750  const void *cause;
2751  const char *message;
2752 };
2753 
2764  union {
2765  const struct rte_flow_attr *attr_ro;
2767  };
2768  union {
2769  const struct rte_flow_item *pattern_ro;
2771  };
2772  union {
2773  const struct rte_flow_action *actions_ro;
2774  struct rte_flow_action *actions;
2775  };
2776 };
2777 
2790 
2802 
2814 
2826 
2839 
2852 
2865 
2879 
2893 
2907 
2921 };
2922 
2940 __rte_experimental
2941 int
2942 rte_flow_dev_dump(uint16_t port_id, FILE *file, struct rte_flow_error *error);
2943 
2950 __rte_experimental
2951 static inline int
2953 {
2954  return !!rte_flow_dynf_metadata_mask;
2955 }
2956 
2967 __rte_experimental
2968 int
2970 
3023 int
3024 rte_flow_validate(uint16_t port_id,
3025  const struct rte_flow_attr *attr,
3026  const struct rte_flow_item pattern[],
3027  const struct rte_flow_action actions[],
3028  struct rte_flow_error *error);
3029 
3050 struct rte_flow *
3051 rte_flow_create(uint16_t port_id,
3052  const struct rte_flow_attr *attr,
3053  const struct rte_flow_item pattern[],
3054  const struct rte_flow_action actions[],
3055  struct rte_flow_error *error);
3056 
3077 int
3078 rte_flow_destroy(uint16_t port_id,
3079  struct rte_flow *flow,
3080  struct rte_flow_error *error);
3081 
3098 int
3099 rte_flow_flush(uint16_t port_id,
3100  struct rte_flow_error *error);
3101 
3126 int
3127 rte_flow_query(uint16_t port_id,
3128  struct rte_flow *flow,
3129  const struct rte_flow_action *action,
3130  void *data,
3131  struct rte_flow_error *error);
3132 
3174 int
3175 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
3176 
3194 int
3195 rte_flow_error_set(struct rte_flow_error *error,
3196  int code,
3197  enum rte_flow_error_type type,
3198  const void *cause,
3199  const char *message);
3200 
3206  size_t size;
3209  struct rte_flow_action *actions;
3210  uint8_t data[];
3211 };
3212 
3239 __rte_deprecated
3240 size_t
3241 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
3242  const struct rte_flow_attr *attr,
3243  const struct rte_flow_item *items,
3244  const struct rte_flow_action *actions);
3245 
3286 __rte_experimental
3287 int
3289  void *dst,
3290  size_t size,
3291  const void *src,
3292  struct rte_flow_error *error);
3293 
3322 __rte_experimental
3323 int
3324 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
3325  uint32_t nb_contexts, struct rte_flow_error *error);
3326 
3327 #ifdef __cplusplus
3328 }
3329 #endif
3330 
3331 #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:1272
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:984
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1076
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:2774
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1221
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:794
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:914
rte_be16_t protocol
Definition: rte_flow.h:1077
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
Definition: rte_flow.h:1543
uint32_t num
Definition: rte_flow.h:566
struct rte_flow_attr * attr
Definition: rte_flow.h:2766
uint32_t rte_be32_t
uint32_t original
Definition: rte_flow.h:2288
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:2468
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:990
struct rte_flow_attr attr
Definition: rte_flow.h:3207
rte_be16_t msg_len
Definition: rte_flow.h:1037
static const struct rte_flow_item_gtp rte_flow_item_gtp_mask
Definition: rte_flow.h:1043
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:817
#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:1084
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:2765
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:874
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:571
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1318
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1059
struct rte_icmp_hdr hdr
Definition: rte_flow.h:812
__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:1035
struct rte_ether_addr tla
Definition: rte_flow.h:1291
rte_be16_t protocol
Definition: rte_flow.h:942
uint32_t reserved
Definition: rte_flow.h:683
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:1172
rte_be16_t src_port
Definition: rte_sctp.h:29
struct rte_flow_action * actions
Definition: rte_flow.h:3209
uint8_t data[]
Definition: rte_flow.h:3210
struct rte_ether_addr tha
Definition: rte_flow.h:1122
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:767
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1442
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:1247
static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask
Definition: rte_flow.h:631
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:896
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:657
static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask
Definition: rte_flow.h:544
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:949
uint64_t rte_be64_t
const void * mask
Definition: rte_flow.h:1586
struct rte_flow_item * pattern
Definition: rte_flow.h:2770
enum rte_eth_hash_function func
Definition: rte_flow.h:2241
rte_be16_t type
Definition: rte_flow.h:723
enum rte_flow_error_type type
Definition: rte_flow.h:2749
const void * cause
Definition: rte_flow.h:2750
static const struct rte_flow_item_udp rte_flow_item_udp_mask
Definition: rte_flow.h:836
struct rte_esp_hdr hdr
Definition: rte_flow.h:1054
rte_flow_error_type
Definition: rte_flow.h:2717
rte_flow_conv_op
Definition: rte_flow.h:2783
rte_be16_t src_port
Definition: rte_udp.h:29
uint32_t id
Definition: rte_flow.h:595
const uint8_t * pattern
Definition: rte_flow.h:687
uint32_t search
Definition: rte_flow.h:682
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:916
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:692
uint16_t limit
Definition: rte_flow.h:685
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:969
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1194
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:2751
rte_eth_hash_function
Definition: rte_flow.h:2211
uint16_t length
Definition: rte_flow.h:686
const void * last
Definition: rte_flow.h:1585
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1297
rte_be32_t teid
Definition: rte_flow.h:1038
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:1583
rte_be16_t tci
Definition: rte_flow.h:747
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask
Definition: rte_flow.h:772
size_t size
Definition: rte_flow.h:3206
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:941
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1336
rte_be16_t length
Definition: rte_flow.h:1353
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:2773
struct rte_flow_item * items
Definition: rte_flow.h:3208
__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:1615
struct rte_ether_addr sla
Definition: rte_flow.h:1266
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:721
static const struct rte_flow_item_l2tpv3oip rte_flow_item_l2tpv3oip_mask
Definition: rte_flow.h:1412
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1497
const void * spec
Definition: rte_flow.h:1584
uint8_t label_tc_s[3]
Definition: rte_flow.h:963
uint8_t version_type
Definition: rte_flow.h:1350
#define RTE_STD_C11
Definition: rte_common.h:40
const uint8_t * key
Definition: rte_flow.h:2271
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1129
struct rte_ether_addr sha
Definition: rte_flow.h:1120
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:728
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:2289
__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:1521
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1395
uint32_t priority
Definition: rte_flow.h:77
struct rte_ether_addr src
Definition: rte_flow.h:722
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1154
static const struct rte_flow_item_vf rte_flow_item_vf_mask
Definition: rte_flow.h:600
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:789
rte_be16_t protocol
Definition: rte_flow.h:985
uint32_t queue_num
Definition: rte_flow.h:2270
uint8_t tni[3]
Definition: rte_flow.h:943
struct rte_tcp_hdr hdr
Definition: rte_flow.h:850
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1375
__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:2502
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:753
uint8_t msg_type
Definition: rte_flow.h:1036
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:924
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:2952
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask
Definition: rte_flow.h:855
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1018
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:61
rte_be16_t inner_type
Definition: rte_flow.h:748
uint8_t rsvd0[3]
Definition: rte_flow.h:889
struct rte_udp_hdr hdr
Definition: rte_flow.h:831
const uint16_t * queue
Definition: rte_flow.h:2272
rte_flow_item_type
Definition: rte_flow.h:118
uint32_t relative
Definition: rte_flow.h:681
uint8_t vni[3]
Definition: rte_flow.h:890
int32_t offset
Definition: rte_flow.h:684
rte_be16_t inner_type
Definition: rte_flow.h:919
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:2769
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1104
rte_be16_t session_id
Definition: rte_flow.h:1352
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1471
struct rte_sctp_hdr hdr
Definition: rte_flow.h:869