DPDK  20.11.10
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_ecpri.h>
32 #include <rte_mbuf.h>
33 #include <rte_mbuf_dyn.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
76 struct rte_flow_attr {
77  uint32_t group;
78  uint32_t priority;
79  uint32_t ingress:1;
80  uint32_t egress:1;
99  uint32_t transfer:1;
100  uint32_t reserved:29;
101 };
102 
129 
139 
149 
157 
167 
177 
187 
197 
204 
211 
218 
225 
232 
239 
246 
253 
260 
267 
274 
281 
288 
295 
307 
316 
325 
334 
341 
348 
355 
362 
369 
376 
383 
390 
397 
405 
413 
420 
429 
442 
451 
460 
469 
478 
485 
492 
499 
505 
514 
523 
530 
539 
546 };
547 
555  struct rte_higig2_hdr hdr;
556 };
557 
559 #ifndef __cplusplus
561  .hdr = {
562  .ppt1 = {
563  .classification = 0xffff,
564  .vid = 0xfff,
565  },
566  },
567 };
568 #endif
569 
582  uint32_t num;
583 };
584 
586 #ifndef __cplusplus
588  .num = 0x00000000,
589 };
590 #endif
591 
611  uint32_t id;
612 };
613 
615 #ifndef __cplusplus
617  .id = 0x00000000,
618 };
619 #endif
620 
642  uint32_t index;
643 };
644 
646 #ifndef __cplusplus
648  .index = 0x00000000,
649 };
650 #endif
651 
668  uint32_t id;
669 };
670 
672 #ifndef __cplusplus
674  .id = 0xffffffff,
675 };
676 #endif
677 
697  uint32_t relative:1;
698  uint32_t search:1;
699  uint32_t reserved:30;
700  int32_t offset;
701  uint16_t limit;
702  uint16_t length;
703  const uint8_t *pattern;
704 };
705 
707 #ifndef __cplusplus
709  .relative = 1,
710  .search = 1,
711  .reserved = 0x3fffffff,
712  .offset = 0xffffffff,
713  .limit = 0xffff,
714  .length = 0xffff,
715  .pattern = NULL,
716 };
717 #endif
718 
737  struct rte_ether_addr dst;
738  struct rte_ether_addr src;
740  uint32_t has_vlan:1;
741  uint32_t reserved:31;
742 };
743 
745 #ifndef __cplusplus
747  .dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
748  .src.addr_bytes = "\xff\xff\xff\xff\xff\xff",
749  .type = RTE_BE16(0x0000),
750 };
751 #endif
752 
771  uint32_t has_more_vlan:1;
773  uint32_t reserved:31;
774 };
775 
777 #ifndef __cplusplus
779  .tci = RTE_BE16(0x0fff),
780  .inner_type = RTE_BE16(0x0000),
781 };
782 #endif
783 
792  struct rte_ipv4_hdr hdr;
793 };
794 
796 #ifndef __cplusplus
798  .hdr = {
799  .src_addr = RTE_BE32(0xffffffff),
800  .dst_addr = RTE_BE32(0xffffffff),
801  },
802 };
803 #endif
804 
813  struct rte_ipv6_hdr hdr;
814  uint32_t has_hop_ext:1;
816  uint32_t has_route_ext:1;
818  uint32_t has_frag_ext:1;
820  uint32_t has_auth_ext:1;
822  uint32_t has_esp_ext:1;
824  uint32_t has_dest_ext:1;
826  uint32_t has_mobil_ext:1;
828  uint32_t has_hip_ext:1;
830  uint32_t has_shim6_ext:1;
832  uint32_t reserved:23;
834 };
835 
837 #ifndef __cplusplus
839  .hdr = {
840  .src_addr =
841  "\xff\xff\xff\xff\xff\xff\xff\xff"
842  "\xff\xff\xff\xff\xff\xff\xff\xff",
843  .dst_addr =
844  "\xff\xff\xff\xff\xff\xff\xff\xff"
845  "\xff\xff\xff\xff\xff\xff\xff\xff",
846  },
847 };
848 #endif
849 
856  struct rte_icmp_hdr hdr;
857 };
858 
860 #ifndef __cplusplus
862  .hdr = {
863  .icmp_type = 0xff,
864  .icmp_code = 0xff,
865  },
866 };
867 #endif
868 
875  struct rte_udp_hdr hdr;
876 };
877 
879 #ifndef __cplusplus
881  .hdr = {
882  .src_port = RTE_BE16(0xffff),
883  .dst_port = RTE_BE16(0xffff),
884  },
885 };
886 #endif
887 
894  struct rte_tcp_hdr hdr;
895 };
896 
898 #ifndef __cplusplus
900  .hdr = {
901  .src_port = RTE_BE16(0xffff),
902  .dst_port = RTE_BE16(0xffff),
903  },
904 };
905 #endif
906 
913  struct rte_sctp_hdr hdr;
914 };
915 
917 #ifndef __cplusplus
919  .hdr = {
920  .src_port = RTE_BE16(0xffff),
921  .dst_port = RTE_BE16(0xffff),
922  },
923 };
924 #endif
925 
932  uint8_t flags;
933  uint8_t rsvd0[3];
934  uint8_t vni[3];
935  uint8_t rsvd1;
936 };
937 
939 #ifndef __cplusplus
941  .vni = "\xff\xff\xff",
942 };
943 #endif
944 
961  uint8_t in_ecid_e;
962  uint8_t ecid_e;
964 };
965 
967 #ifndef __cplusplus
969  .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
970 };
971 #endif
972 
987  uint8_t tni[3];
988  uint8_t flow_id;
989 };
990 
992 #ifndef __cplusplus
994  .tni = "\xff\xff\xff",
995 };
996 #endif
997 
1007  uint8_t label_tc_s[3];
1008  uint8_t ttl;
1009 };
1010 
1012 #ifndef __cplusplus
1014  .label_tc_s = "\xff\xff\xf0",
1015 };
1016 #endif
1017 
1030 };
1031 
1033 #ifndef __cplusplus
1035  .protocol = RTE_BE16(0xffff),
1036 };
1037 #endif
1038 
1057  uint32_t thresh;
1058 };
1059 
1061 #ifndef __cplusplus
1063  .thresh = 0xffffffff,
1064 };
1065 #endif
1066 
1080  uint8_t msg_type;
1083 };
1084 
1086 #ifndef __cplusplus
1088  .teid = RTE_BE32(0xffffffff),
1089 };
1090 #endif
1091 
1098  struct rte_esp_hdr hdr;
1099 };
1100 
1102 #ifndef __cplusplus
1104  .hdr = {
1105  .spi = RTE_BE32(0xffffffff),
1106  },
1107 };
1108 #endif
1109 
1122  uint8_t vni[3];
1123  uint8_t rsvd1;
1124 };
1125 
1127 #ifndef __cplusplus
1129  .vni = "\xff\xff\xff",
1130 };
1131 #endif
1132 
1139  uint8_t flags;
1140  uint8_t rsvd0[2];
1141  uint8_t protocol;
1142  uint8_t vni[3];
1143  uint8_t rsvd1;
1144 };
1145 
1147 #ifndef __cplusplus
1149  .vni = "\xff\xff\xff",
1150 };
1151 #endif
1152 
1161  uint8_t hln;
1162  uint8_t pln;
1164  struct rte_ether_addr sha;
1166  struct rte_ether_addr tha;
1168 };
1169 
1171 #ifndef __cplusplus
1172 static const struct rte_flow_item_arp_eth_ipv4
1174  .sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1175  .spa = RTE_BE32(0xffffffff),
1176  .tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1177  .tpa = RTE_BE32(0xffffffff),
1178 };
1179 #endif
1180 
1192  uint8_t next_hdr;
1193 };
1194 
1196 #ifndef __cplusplus
1197 static const
1199  .next_hdr = 0xff,
1200 };
1201 #endif
1202 
1214  struct rte_ipv6_fragment_ext hdr;
1215 };
1216 
1223  uint8_t type;
1224  uint8_t code;
1225  uint16_t checksum;
1226 };
1227 
1229 #ifndef __cplusplus
1231  .type = 0xff,
1232  .code = 0xff,
1233 };
1234 #endif
1235 
1242  uint8_t type;
1243  uint8_t code;
1246  uint8_t target_addr[16];
1247 };
1248 
1250 #ifndef __cplusplus
1251 static const
1253  .target_addr =
1254  "\xff\xff\xff\xff\xff\xff\xff\xff"
1255  "\xff\xff\xff\xff\xff\xff\xff\xff",
1256 };
1257 #endif
1258 
1265  uint8_t type;
1266  uint8_t code;
1273  uint8_t target_addr[16];
1274 };
1275 
1277 #ifndef __cplusplus
1278 static const
1280  .target_addr =
1281  "\xff\xff\xff\xff\xff\xff\xff\xff"
1282  "\xff\xff\xff\xff\xff\xff\xff\xff",
1283 };
1284 #endif
1285 
1298  uint8_t type;
1299  uint8_t length;
1300 };
1301 
1303 #ifndef __cplusplus
1304 static const struct rte_flow_item_icmp6_nd_opt
1306  .type = 0xff,
1307 };
1308 #endif
1309 
1322  uint8_t type;
1323  uint8_t length;
1324  struct rte_ether_addr sla;
1325 };
1326 
1328 #ifndef __cplusplus
1329 static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1331  .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1332 };
1333 #endif
1334 
1347  uint8_t type;
1348  uint8_t length;
1349  struct rte_ether_addr tla;
1350 };
1351 
1353 #ifndef __cplusplus
1354 static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1356  .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1357 };
1358 #endif
1359 
1371  uint32_t data;
1372 };
1373 
1375 #ifndef __cplusplus
1377  .data = UINT32_MAX,
1378 };
1379 #endif
1380 
1387  uint8_t pdu_type;
1388  uint8_t qfi;
1389 };
1390 
1392 #ifndef __cplusplus
1393 static const struct rte_flow_item_gtp_psc
1395  .qfi = 0xff,
1396 };
1397 #endif
1398 
1408  uint8_t version_type;
1409  uint8_t code;
1412 };
1413 
1428 };
1429 
1431 #ifndef __cplusplus
1432 static const struct rte_flow_item_pppoe_proto_id
1434  .proto_id = RTE_BE16(0xffff),
1435 };
1436 #endif
1437 
1447  uint32_t data;
1448  uint8_t index;
1449 };
1450 
1452 #ifndef __cplusplus
1454  .data = 0xffffffff,
1455  .index = 0xff,
1456 };
1457 #endif
1458 
1466 };
1467 
1469 #ifndef __cplusplus
1471  .session_id = RTE_BE32(UINT32_MAX),
1472 };
1473 #endif
1474 
1475 
1495  uint32_t id;
1496 };
1497 
1499 #ifndef __cplusplus
1501  .id = 0xffffffff,
1502 };
1503 #endif
1504 
1515  uint32_t version:2;
1516  uint32_t oam_pkt:1;
1517  uint32_t reserved:1;
1518  uint32_t ttl:6;
1519  uint32_t length:6;
1520  uint32_t reserved1:4;
1521  uint32_t mdtype:4;
1522  uint32_t next_proto:8;
1523  uint32_t spi:24;
1524  uint32_t sindex:8;
1525 };
1526 
1528 #ifndef __cplusplus
1530  .mdtype = 0xf,
1531  .next_proto = 0xff,
1532  .spi = 0xffffff,
1533  .sindex = 0xff,
1534 };
1535 #endif
1536 
1547  uint32_t type:8;
1548  uint32_t max_resp_time:8;
1549  uint32_t checksum:16;
1550  uint32_t group_addr;
1551 };
1552 
1554 #ifndef __cplusplus
1556  .group_addr = 0xffffffff,
1557 };
1558 #endif
1559 
1570  uint32_t next_hdr:8;
1571  uint32_t payload_len:8;
1572  uint32_t reserved:16;
1573  uint32_t spi;
1574  uint32_t seq_num;
1575 };
1576 
1578 #ifndef __cplusplus
1580  .spi = 0xffffffff,
1581 };
1582 #endif
1583 
1593  uint8_t s_field;
1594  uint8_t msg_type;
1595  rte_be16_t msg_len;
1596  rte_be64_t seid;
1597 };
1598 
1600 #ifndef __cplusplus
1602  .s_field = 0x01,
1603  .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1604 };
1605 #endif
1606 
1616  struct rte_ecpri_combined_msg_hdr hdr;
1617 };
1618 
1620 #ifndef __cplusplus
1622  .hdr = {
1623  .common = {
1624  .u32 = 0x0,
1625  },
1626  },
1627 };
1628 #endif
1629 
1665  const void *spec;
1666  const void *last;
1667  const void *mask;
1668 };
1669 
1704 
1712 
1720 
1729 
1737 
1745 
1752 
1761 
1772 
1781 
1789 
1797 
1805 
1812 
1820 
1828 
1836 
1844 
1852 
1860 
1869 
1878 
1886 
1894 
1902 
1910 
1918 
1926 
1934 
1943 
1951 
1960 
1967 
1974 
1984 
1994 
2004 
2014 
2025 
2036 
2047 
2054 
2061 
2071 
2081 
2095 
2109 
2123 
2137 
2147 
2154 
2164 
2174 
2185 
2193 
2201 };
2202 
2214  uint32_t id;
2215 };
2216 
2230  uint32_t group;
2231 };
2232 
2239  uint16_t index;
2240 };
2241 
2256  uint32_t timeout:24;
2257  uint32_t reserved:8;
2258  void *context;
2260 };
2261 
2269  uint32_t reserved:6;
2270  uint32_t aged:1;
2273  uint32_t sec_since_last_hit:24;
2274 };
2275 
2306  uint32_t shared:1;
2307  uint32_t reserved:31;
2308  uint32_t id;
2309 };
2310 
2317  uint32_t reset:1;
2318  uint32_t hits_set:1;
2319  uint32_t bytes_set:1;
2320  uint32_t reserved:29;
2321  uint64_t hits;
2322  uint64_t bytes;
2323 };
2324 
2329  RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
2338  RTE_ETH_HASH_FUNCTION_MAX,
2339 };
2340 
2384  uint32_t level;
2385  uint64_t types;
2386  uint32_t key_len;
2387  uint32_t queue_num;
2388  const uint8_t *key;
2389  const uint16_t *queue;
2390 };
2391 
2405  uint32_t original:1;
2406  uint32_t reserved:31;
2407  uint32_t id;
2408 };
2409 
2419  uint32_t original:1;
2420  uint32_t reserved:31;
2421  uint32_t index;
2422 };
2423 
2432  uint32_t original:1;
2433  uint32_t reserved:31;
2434  uint32_t id;
2435 };
2436 
2446  uint32_t mtr_id;
2447 };
2448 
2481 };
2482 
2490  uint8_t mpls_ttl;
2491 };
2492 
2500  uint8_t nw_ttl;
2501 };
2502 
2511 };
2512 
2521 };
2522 
2530  uint8_t vlan_pcp;
2531 };
2532 
2541 };
2542 
2551 };
2552 
2586 };
2587 
2620 };
2621 
2642  uint8_t *data;
2643  uint8_t *preserve;
2644  size_t size;
2645 };
2646 
2663  uint8_t *data;
2664  size_t size;
2665 };
2666 
2679  rte_be32_t ipv4_addr;
2680 };
2681 
2694  uint8_t ipv6_addr[16];
2695 };
2696 
2709  rte_be16_t port;
2710 };
2711 
2718  uint8_t ttl_value;
2719 };
2720 
2727  uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
2728 };
2729 
2740  uint32_t data;
2741  uint32_t mask;
2742  uint8_t index;
2743 };
2744 
2765  uint32_t data;
2766  uint32_t mask;
2767 };
2768 
2777  uint8_t dscp;
2778 };
2779 
2780 
2792 struct rte_flow_shared_action;
2793 
2794 /* Mbuf dynamic field offset for metadata. */
2795 extern int32_t rte_flow_dynf_metadata_offs;
2796 
2797 /* Mbuf dynamic field flag mask for metadata. */
2798 extern uint64_t rte_flow_dynf_metadata_mask;
2799 
2800 /* Mbuf dynamic field pointer for metadata. */
2801 #define RTE_FLOW_DYNF_METADATA(m) \
2802  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
2803 
2804 /* Mbuf dynamic flags for metadata. */
2805 #define PKT_RX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
2806 #define PKT_TX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
2807 
2808 __rte_experimental
2809 static inline uint32_t
2810 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
2811 {
2812  return *RTE_FLOW_DYNF_METADATA(m);
2813 }
2814 
2815 __rte_experimental
2816 static inline void
2817 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
2818 {
2819  *RTE_FLOW_DYNF_METADATA(m) = v;
2820 }
2821 
2831  const void *conf;
2832 };
2833 
2840 struct rte_flow;
2841 
2859  uint32_t ratio;
2860  const struct rte_flow_action *actions;
2862 };
2863 
2888 };
2889 
2903  const void *cause;
2904  const char *message;
2905 };
2906 
2917  union {
2918  const struct rte_flow_attr *attr_ro;
2920  };
2921  union {
2922  const struct rte_flow_item *pattern_ro;
2924  };
2925  union {
2926  const struct rte_flow_action *actions_ro;
2928  };
2929 };
2930 
2943 
2955 
2967 
2979 
2992 
3005 
3018 
3032 
3046 
3060 
3074 };
3075 
3093 __rte_experimental
3094 int
3095 rte_flow_dev_dump(uint16_t port_id, FILE *file, struct rte_flow_error *error);
3096 
3103 __rte_experimental
3104 static inline int
3106 {
3107  return !!rte_flow_dynf_metadata_mask;
3108 }
3109 
3120 __rte_experimental
3121 int
3123 
3176 int
3177 rte_flow_validate(uint16_t port_id,
3178  const struct rte_flow_attr *attr,
3179  const struct rte_flow_item pattern[],
3180  const struct rte_flow_action actions[],
3181  struct rte_flow_error *error);
3182 
3203 struct rte_flow *
3204 rte_flow_create(uint16_t port_id,
3205  const struct rte_flow_attr *attr,
3206  const struct rte_flow_item pattern[],
3207  const struct rte_flow_action actions[],
3208  struct rte_flow_error *error);
3209 
3230 int
3231 rte_flow_destroy(uint16_t port_id,
3232  struct rte_flow *flow,
3233  struct rte_flow_error *error);
3234 
3251 int
3252 rte_flow_flush(uint16_t port_id,
3253  struct rte_flow_error *error);
3254 
3279 int
3280 rte_flow_query(uint16_t port_id,
3281  struct rte_flow *flow,
3282  const struct rte_flow_action *action,
3283  void *data,
3284  struct rte_flow_error *error);
3285 
3327 int
3328 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
3329 
3347 int
3348 rte_flow_error_set(struct rte_flow_error *error,
3349  int code,
3350  enum rte_flow_error_type type,
3351  const void *cause,
3352  const char *message);
3353 
3359  size_t size;
3360  struct rte_flow_attr attr;
3363  uint8_t data[];
3364 };
3365 
3392 __rte_deprecated
3393 size_t
3394 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
3395  const struct rte_flow_attr *attr,
3396  const struct rte_flow_item *items,
3397  const struct rte_flow_action *actions);
3398 
3439 __rte_experimental
3440 int
3442  void *dst,
3443  size_t size,
3444  const void *src,
3445  struct rte_flow_error *error);
3446 
3475 __rte_experimental
3476 int
3477 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
3478  uint32_t nb_contexts, struct rte_flow_error *error);
3479 
3490  uint32_t ingress:1;
3492  uint32_t egress:1;
3501  uint32_t transfer:1;
3502 };
3503 
3530 __rte_experimental
3531 struct rte_flow_shared_action *
3532 rte_flow_shared_action_create(uint16_t port_id,
3533  const struct rte_flow_shared_action_conf *conf,
3534  const struct rte_flow_action *action,
3535  struct rte_flow_error *error);
3536 
3559 __rte_experimental
3560 int
3561 rte_flow_shared_action_destroy(uint16_t port_id,
3562  struct rte_flow_shared_action *action,
3563  struct rte_flow_error *error);
3564 
3595 __rte_experimental
3596 int
3597 rte_flow_shared_action_update(uint16_t port_id,
3598  struct rte_flow_shared_action *action,
3599  const struct rte_flow_action *update,
3600  struct rte_flow_error *error);
3601 
3627 __rte_experimental
3628 int
3629 rte_flow_shared_action_query(uint16_t port_id,
3630  const struct rte_flow_shared_action *action,
3631  void *data,
3632  struct rte_flow_error *error);
3633 
3634 /* Tunnel has a type and the key information. */
3635 struct rte_flow_tunnel {
3640  enum rte_flow_item_type type;
3641  uint64_t tun_id;
3643  RTE_STD_C11
3644  union {
3645  struct {
3646  rte_be32_t src_addr;
3647  rte_be32_t dst_addr;
3648  } ipv4;
3649  struct {
3650  uint8_t src_addr[16];
3651  uint8_t dst_addr[16];
3652  } ipv6;
3653  };
3654  rte_be16_t tp_src;
3655  rte_be16_t tp_dst;
3656  uint16_t tun_flags;
3658  bool is_ipv6;
3664  uint8_t tos;
3665  uint8_t ttl;
3666  uint32_t label;
3667 };
3668 
3672 #define RTE_FLOW_RESTORE_INFO_TUNNEL (1ULL << 0)
3673 
3677 #define RTE_FLOW_RESTORE_INFO_ENCAPSULATED (1ULL << 1)
3678 
3682 #define RTE_FLOW_RESTORE_INFO_GROUP_ID (1ULL << 2)
3683 
3694  uint64_t flags;
3695  uint32_t group_id;
3696  struct rte_flow_tunnel tunnel;
3697 };
3698 
3722 __rte_experimental
3723 int
3724 rte_flow_tunnel_decap_set(uint16_t port_id,
3725  struct rte_flow_tunnel *tunnel,
3726  struct rte_flow_action **actions,
3727  uint32_t *num_of_actions,
3728  struct rte_flow_error *error);
3729 
3753 __rte_experimental
3754 int
3755 rte_flow_tunnel_match(uint16_t port_id,
3756  struct rte_flow_tunnel *tunnel,
3757  struct rte_flow_item **items,
3758  uint32_t *num_of_items,
3759  struct rte_flow_error *error);
3760 
3777 __rte_experimental
3778 int
3779 rte_flow_get_restore_info(uint16_t port_id,
3780  struct rte_mbuf *m,
3781  struct rte_flow_restore_info *info,
3782  struct rte_flow_error *error);
3783 
3800 __rte_experimental
3801 int
3802 rte_flow_tunnel_action_decap_release(uint16_t port_id,
3803  struct rte_flow_action *actions,
3804  uint32_t num_of_actions,
3805  struct rte_flow_error *error);
3806 
3823 __rte_experimental
3824 int
3825 rte_flow_tunnel_item_release(uint16_t port_id,
3826  struct rte_flow_item *items,
3827  uint32_t num_of_items,
3828  struct rte_flow_error *error);
3829 #ifdef __cplusplus
3830 }
3831 #endif
3832 
3833 #endif /* RTE_FLOW_H_ */
uint32_t reserved
Definition: rte_flow.h:100
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
Definition: rte_flow.h:1330
rte_be32_t u32
Definition: rte_ecpri.h:72
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:1028
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1120
uint32_t reserved
Definition: rte_flow.h:832
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:2927
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1279
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:838
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:958
rte_be16_t protocol
Definition: rte_flow.h:1121
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
Definition: rte_flow.h:1601
uint32_t has_auth_ext
Definition: rte_flow.h:820
uint32_t num
Definition: rte_flow.h:582
struct rte_flow_attr * attr
Definition: rte_flow.h:2919
__rte_experimental struct rte_flow_shared_action * rte_flow_shared_action_create(uint16_t port_id, const struct rte_flow_shared_action_conf *conf, const struct rte_flow_action *action, struct rte_flow_error *error)
uint32_t has_mobil_ext
Definition: rte_flow.h:826
uint32_t sec_since_last_hit
Definition: rte_flow.h:2273
uint32_t rte_be32_t
uint32_t original
Definition: rte_flow.h:2405
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:77
struct rte_flow_item * definition
Definition: rte_flow.h:2585
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:1034
rte_be16_t msg_len
Definition: rte_flow.h:1081
static const struct rte_flow_item_gtp rte_flow_item_gtp_mask
Definition: rte_flow.h:1087
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:861
#define RTE_ETHER_ADDR_LEN
Definition: rte_ether.h:30
static const struct rte_flow_item_geneve rte_flow_item_geneve_mask
Definition: rte_flow.h:1128
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:2918
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:918
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:587
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1376
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1103
__rte_experimental int rte_flow_get_restore_info(uint16_t port_id, struct rte_mbuf *m, struct rte_flow_restore_info *info, struct rte_flow_error *error)
struct rte_icmp_hdr hdr
Definition: rte_flow.h:856
__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:1079
struct rte_ether_addr tla
Definition: rte_flow.h:1349
rte_be16_t protocol
Definition: rte_flow.h:986
uint32_t reserved
Definition: rte_flow.h:699
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:1230
rte_be16_t src_port
Definition: rte_sctp.h:29
struct rte_flow_action * actions
Definition: rte_flow.h:3362
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:792
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1500
uint32_t reserved
Definition: rte_flow.h:2269
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:1305
static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask
Definition: rte_flow.h:647
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:940
uint8_t src_addr[16]
Definition: rte_ip.h:384
static const struct rte_flow_item_port_id rte_flow_item_port_id_mask
Definition: rte_flow.h:673
static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask
Definition: rte_flow.h:560
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:993
uint64_t rte_be64_t
const void * mask
Definition: rte_flow.h:1667
struct rte_flow_item * pattern
Definition: rte_flow.h:2923
rte_be16_t type
Definition: rte_flow.h:739
const void * cause
Definition: rte_flow.h:2903
__rte_experimental int rte_flow_shared_action_destroy(uint16_t port_id, struct rte_flow_shared_action *action, struct rte_flow_error *error)
static const struct rte_flow_item_udp rte_flow_item_udp_mask
Definition: rte_flow.h:880
struct rte_esp_hdr hdr
Definition: rte_flow.h:1098
rte_flow_error_type
Definition: rte_flow.h:2870
uint32_t has_esp_ext
Definition: rte_flow.h:822
rte_flow_conv_op
Definition: rte_flow.h:2936
rte_be16_t src_port
Definition: rte_udp.h:29
uint32_t has_shim6_ext
Definition: rte_flow.h:830
uint32_t has_route_ext
Definition: rte_flow.h:816
__rte_experimental int rte_flow_shared_action_update(uint16_t port_id, struct rte_flow_shared_action *action, const struct rte_flow_action *update, struct rte_flow_error *error)
uint32_t id
Definition: rte_flow.h:611
const uint8_t * pattern
Definition: rte_flow.h:703
uint32_t search
Definition: rte_flow.h:698
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:960
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:708
uint16_t limit
Definition: rte_flow.h:701
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:1013
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1252
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 void * conf
Definition: rte_flow.h:2831
const char * message
Definition: rte_flow.h:2904
rte_eth_hash_function
Definition: rte_flow.h:2328
uint16_t length
Definition: rte_flow.h:702
const void * last
Definition: rte_flow.h:1666
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1355
rte_be32_t teid
Definition: rte_flow.h:1082
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
uint32_t ingress
Definition: rte_flow.h:79
rte_be16_t tci
Definition: rte_flow.h:769
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask
Definition: rte_flow.h:797
size_t size
Definition: rte_flow.h:3359
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:985
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1394
rte_be16_t length
Definition: rte_flow.h:1411
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:2926
uint32_t has_vlan
Definition: rte_flow.h:740
uint32_t has_more_vlan
Definition: rte_flow.h:771
struct rte_flow_item * items
Definition: rte_flow.h:3361
__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:1696
struct rte_ether_addr sla
Definition: rte_flow.h:1324
uint32_t has_hop_ext
Definition: rte_flow.h:814
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:737
static const struct rte_flow_item_l2tpv3oip rte_flow_item_l2tpv3oip_mask
Definition: rte_flow.h:1470
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1555
const void * spec
Definition: rte_flow.h:1665
uint8_t label_tc_s[3]
Definition: rte_flow.h:1007
uint8_t version_type
Definition: rte_flow.h:1408
#define RTE_STD_C11
Definition: rte_common.h:40
__rte_experimental int rte_flow_tunnel_decap_set(uint16_t port_id, struct rte_flow_tunnel *tunnel, struct rte_flow_action **actions, uint32_t *num_of_actions, struct rte_flow_error *error)
const uint8_t * key
Definition: rte_flow.h:2388
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1173
uint32_t has_hip_ext
Definition: rte_flow.h:828
const struct rte_flow_action * actions
Definition: rte_flow.h:2860
uint32_t sec_since_last_hit_valid
Definition: rte_flow.h:2271
struct rte_ether_addr sha
Definition: rte_flow.h:1164
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:746
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 has_frag_ext
Definition: rte_flow.h:818
uint32_t reserved
Definition: rte_flow.h:2406
__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:1579
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1453
uint32_t priority
Definition: rte_flow.h:78
uint32_t has_dest_ext
Definition: rte_flow.h:824
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1198
static const struct rte_flow_item_vf rte_flow_item_vf_mask
Definition: rte_flow.h:616
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:813
__rte_experimental int rte_flow_shared_action_query(uint16_t port_id, const struct rte_flow_shared_action *action, void *data, struct rte_flow_error *error)
static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask
Definition: rte_flow.h:1621
rte_be16_t protocol
Definition: rte_flow.h:1029
uint32_t queue_num
Definition: rte_flow.h:2387
uint8_t tni[3]
Definition: rte_flow.h:987
struct rte_tcp_hdr hdr
Definition: rte_flow.h:894
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1433
__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:99
struct rte_flow_item * definition
Definition: rte_flow.h:2619
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:778
uint8_t msg_type
Definition: rte_flow.h:1080
uint32_t reserved
Definition: rte_flow.h:773
uint32_t egress
Definition: rte_flow.h:80
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
Definition: rte_flow.h:968
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:3105
__rte_experimental int rte_flow_tunnel_item_release(uint16_t port_id, struct rte_flow_item *items, uint32_t num_of_items, struct rte_flow_error *error)
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask
Definition: rte_flow.h:899
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1062
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:65
rte_be16_t inner_type
Definition: rte_flow.h:770
__rte_experimental int rte_flow_tunnel_action_decap_release(uint16_t port_id, struct rte_flow_action *actions, uint32_t num_of_actions, struct rte_flow_error *error)
struct rte_udp_hdr hdr
Definition: rte_flow.h:875
const uint16_t * queue
Definition: rte_flow.h:2389
rte_flow_item_type
Definition: rte_flow.h:119
uint32_t relative
Definition: rte_flow.h:697
uint8_t vni[3]
Definition: rte_flow.h:934
int32_t offset
Definition: rte_flow.h:700
rte_be16_t inner_type
Definition: rte_flow.h:963
__rte_experimental int rte_flow_tunnel_match(uint16_t port_id, struct rte_flow_tunnel *tunnel, struct rte_flow_item **items, uint32_t *num_of_items, struct rte_flow_error *error)
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:2922
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1148
rte_be16_t session_id
Definition: rte_flow.h:1410
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1529
struct rte_sctp_hdr hdr
Definition: rte_flow.h:913
uint32_t reserved
Definition: rte_flow.h:741