DPDK  22.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_compat.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_vxlan.h>
29 #include <rte_esp.h>
30 #include <rte_higig.h>
31 #include <rte_ecpri.h>
32 #include <rte_bitops.h>
33 #include <rte_mbuf_dyn.h>
34 #include <rte_meter.h>
35 #include <rte_gtp.h>
36 #include <rte_l2tpv2.h>
37 #include <rte_ppp.h>
38 #include <rte_gre.h>
39 #include <rte_macsec.h>
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 #define RTE_FLOW_LOG(level, ...) \
46  rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, "" __VA_ARGS__)
47 
88 struct rte_flow_attr {
89  uint32_t group;
90  uint32_t priority;
94  uint32_t ingress:1;
98  uint32_t egress:1;
116  uint32_t transfer:1;
117  uint32_t reserved:29;
118 };
119 
146 
156 
166 
174 
188 
195 
202 
209 
216 
223 
230 
237 
244 
251 
258 
265 
272 
279 
286 
298 
307 
316 
325 
332 
339 
346 
353 
360 
367 
374 
381 
388 
396 
404 
411 
420 
433 
442 
451 
460 
469 
476 
483 
490 
496 
505 
514 
521 
530 
537 
544 
555 
564 
573 
583 
592 
599 
606 
613 
620 
627 };
628 
636  struct rte_higig2_hdr hdr;
637 };
638 
640 #ifndef __cplusplus
642  .hdr = {
643  .ppt1 = {
644  .classification = 0xffff,
645  .vid = 0xfff,
646  },
647  },
648 };
649 #endif
650 
663  uint32_t num;
664 };
665 
667 #ifndef __cplusplus
669  .num = 0x00000000,
670 };
671 #endif
672 
688  uint32_t id;
689 };
690 
692 #ifndef __cplusplus
694  .id = 0xffffffff,
695 };
696 #endif
697 
717  uint32_t relative:1;
718  uint32_t search:1;
719  uint32_t reserved:30;
720  int32_t offset;
721  uint16_t limit;
722  uint16_t length;
723  const uint8_t *pattern;
724 };
725 
727 #ifndef __cplusplus
729  .relative = 1,
730  .search = 1,
731  .reserved = 0x3fffffff,
732  .offset = 0xffffffff,
733  .limit = 0xffff,
734  .length = 0xffff,
735  .pattern = NULL,
736 };
737 #endif
738 
758  union {
759  struct {
760  /*
761  * These fields are retained for compatibility.
762  * Please switch to the new header field below.
763  */
764  struct rte_ether_addr dst;
765  struct rte_ether_addr src;
767  };
768  struct rte_ether_hdr hdr;
769  };
770  uint32_t has_vlan:1;
771  uint32_t reserved:31;
772 };
773 
775 #ifndef __cplusplus
777  .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
778  .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
779  .hdr.ether_type = RTE_BE16(0x0000),
780 };
781 #endif
782 
800  union {
801  struct {
802  /*
803  * These fields are retained for compatibility.
804  * Please switch to the new header field below.
805  */
808  };
809  struct rte_vlan_hdr hdr;
810  };
812  uint32_t has_more_vlan:1;
813  uint32_t reserved:31;
814 };
815 
817 #ifndef __cplusplus
819  .hdr.vlan_tci = RTE_BE16(0x0fff),
820  .hdr.eth_proto = RTE_BE16(0x0000),
821 };
822 #endif
823 
832  struct rte_ipv4_hdr hdr;
833 };
834 
836 #ifndef __cplusplus
838  .hdr = {
839  .src_addr = RTE_BE32(0xffffffff),
840  .dst_addr = RTE_BE32(0xffffffff),
841  },
842 };
843 #endif
844 
853  struct rte_ipv6_hdr hdr;
855  uint32_t has_hop_ext:1;
857  uint32_t has_route_ext:1;
859  uint32_t has_frag_ext:1;
861  uint32_t has_auth_ext:1;
863  uint32_t has_esp_ext:1;
865  uint32_t has_dest_ext:1;
867  uint32_t has_mobil_ext:1;
869  uint32_t has_hip_ext:1;
871  uint32_t has_shim6_ext:1;
873  uint32_t reserved:23;
874 };
875 
877 #ifndef __cplusplus
879  .hdr = {
880  .src_addr =
881  "\xff\xff\xff\xff\xff\xff\xff\xff"
882  "\xff\xff\xff\xff\xff\xff\xff\xff",
883  .dst_addr =
884  "\xff\xff\xff\xff\xff\xff\xff\xff"
885  "\xff\xff\xff\xff\xff\xff\xff\xff",
886  },
887 };
888 #endif
889 
896  struct rte_icmp_hdr hdr;
897 };
898 
900 #ifndef __cplusplus
902  .hdr = {
903  .icmp_type = 0xff,
904  .icmp_code = 0xff,
905  },
906 };
907 #endif
908 
915  struct rte_udp_hdr hdr;
916 };
917 
919 #ifndef __cplusplus
921  .hdr = {
922  .src_port = RTE_BE16(0xffff),
923  .dst_port = RTE_BE16(0xffff),
924  },
925 };
926 #endif
927 
934  struct rte_tcp_hdr hdr;
935 };
936 
938 #ifndef __cplusplus
940  .hdr = {
941  .src_port = RTE_BE16(0xffff),
942  .dst_port = RTE_BE16(0xffff),
943  },
944 };
945 #endif
946 
953  struct rte_sctp_hdr hdr;
954 };
955 
957 #ifndef __cplusplus
959  .hdr = {
960  .src_port = RTE_BE16(0xffff),
961  .dst_port = RTE_BE16(0xffff),
962  },
963 };
964 #endif
965 
973  union {
974  struct {
975  /*
976  * These fields are retained for compatibility.
977  * Please switch to the new header field below.
978  */
979  uint8_t flags;
980  uint8_t rsvd0[3];
981  uint8_t vni[3];
982  uint8_t rsvd1;
983  };
984  struct rte_vxlan_hdr hdr;
985  };
986 };
987 
989 #ifndef __cplusplus
991  .hdr.vx_vni = RTE_BE32(0xffffff00), /* (0xffffff << 8) */
992 };
993 #endif
994 
1011  uint8_t in_ecid_e;
1012  uint8_t ecid_e;
1014 };
1015 
1017 #ifndef __cplusplus
1019  .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
1020 };
1021 #endif
1022 
1037  uint8_t tni[3];
1038  uint8_t flow_id;
1039 };
1040 
1042 #ifndef __cplusplus
1044  .tni = "\xff\xff\xff",
1045 };
1046 #endif
1047 
1057  uint8_t label_tc_s[3];
1058  uint8_t ttl;
1059 };
1060 
1062 #ifndef __cplusplus
1064  .label_tc_s = "\xff\xff\xf0",
1065 };
1066 #endif
1067 
1080 };
1081 
1083 #ifndef __cplusplus
1085  .protocol = RTE_BE16(0xffff),
1086 };
1087 #endif
1088 
1095  struct rte_gre_hdr_opt_checksum_rsvd checksum_rsvd;
1096  struct rte_gre_hdr_opt_key key;
1097  struct rte_gre_hdr_opt_sequence sequence;
1098 };
1099 
1106  struct rte_macsec_hdr macsec_hdr;
1107 };
1108 
1127  uint32_t thresh;
1128 };
1129 
1131 #ifndef __cplusplus
1133  .thresh = 0xffffffff,
1134 };
1135 #endif
1136 
1150  uint8_t msg_type;
1153 };
1154 
1156 #ifndef __cplusplus
1158  .teid = RTE_BE32(0xffffffff),
1159 };
1160 #endif
1161 
1168  struct rte_esp_hdr hdr;
1169 };
1170 
1172 #ifndef __cplusplus
1174  .hdr = {
1175  .spi = RTE_BE32(0xffffffff),
1176  },
1177 };
1178 #endif
1179 
1192  uint8_t vni[3];
1193  uint8_t rsvd1;
1194 };
1195 
1197 #ifndef __cplusplus
1199  .vni = "\xff\xff\xff",
1200 };
1201 #endif
1202 
1209  uint8_t flags;
1210  uint8_t rsvd0[2];
1211  uint8_t protocol;
1212  uint8_t vni[3];
1213  uint8_t rsvd1;
1214 };
1215 
1217 #ifndef __cplusplus
1219  .vni = "\xff\xff\xff",
1220 };
1221 #endif
1222 
1231  uint8_t hln;
1232  uint8_t pln;
1234  struct rte_ether_addr sha;
1236  struct rte_ether_addr tha;
1238 };
1239 
1241 #ifndef __cplusplus
1242 static const struct rte_flow_item_arp_eth_ipv4
1244  .sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1245  .spa = RTE_BE32(0xffffffff),
1246  .tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1247  .tpa = RTE_BE32(0xffffffff),
1248 };
1249 #endif
1250 
1262  uint8_t next_hdr;
1263 };
1264 
1266 #ifndef __cplusplus
1267 static const
1269  .next_hdr = 0xff,
1270 };
1271 #endif
1272 
1284  struct rte_ipv6_fragment_ext hdr;
1285 };
1286 
1293  uint8_t type;
1294  uint8_t code;
1295  uint16_t checksum;
1296 };
1297 
1299 #ifndef __cplusplus
1301  .type = 0xff,
1302  .code = 0xff,
1303 };
1304 #endif
1305 
1312  uint8_t type;
1313  uint8_t code;
1316  uint8_t target_addr[16];
1317 };
1318 
1320 #ifndef __cplusplus
1321 static const
1323  .target_addr =
1324  "\xff\xff\xff\xff\xff\xff\xff\xff"
1325  "\xff\xff\xff\xff\xff\xff\xff\xff",
1326 };
1327 #endif
1328 
1335  uint8_t type;
1336  uint8_t code;
1343  uint8_t target_addr[16];
1344 };
1345 
1347 #ifndef __cplusplus
1348 static const
1350  .target_addr =
1351  "\xff\xff\xff\xff\xff\xff\xff\xff"
1352  "\xff\xff\xff\xff\xff\xff\xff\xff",
1353 };
1354 #endif
1355 
1368  uint8_t type;
1369  uint8_t length;
1370 };
1371 
1373 #ifndef __cplusplus
1374 static const struct rte_flow_item_icmp6_nd_opt
1376  .type = 0xff,
1377 };
1378 #endif
1379 
1392  uint8_t type;
1393  uint8_t length;
1394  struct rte_ether_addr sla;
1395 };
1396 
1398 #ifndef __cplusplus
1399 static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1401  .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1402 };
1403 #endif
1404 
1417  uint8_t type;
1418  uint8_t length;
1419  struct rte_ether_addr tla;
1420 };
1421 
1423 #ifndef __cplusplus
1424 static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1426  .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1427 };
1428 #endif
1429 
1442  uint32_t data;
1443 };
1444 
1446 #ifndef __cplusplus
1448  .data = UINT32_MAX,
1449 };
1450 #endif
1451 
1459 };
1460 
1462 #ifndef __cplusplus
1463 static const struct rte_flow_item_gtp_psc
1465  .hdr.qfi = 0x3f,
1466 };
1467 #endif
1468 
1478  uint8_t version_type;
1479  uint8_t code;
1482 };
1483 
1498 };
1499 
1501 #ifndef __cplusplus
1502 static const struct rte_flow_item_pppoe_proto_id
1504  .proto_id = RTE_BE16(0xffff),
1505 };
1506 #endif
1507 
1517  uint32_t data;
1518  uint8_t index;
1519 };
1520 
1522 #ifndef __cplusplus
1524  .data = 0xffffffff,
1525  .index = 0xff,
1526 };
1527 #endif
1528 
1536 };
1537 
1539 #ifndef __cplusplus
1541  .session_id = RTE_BE32(UINT32_MAX),
1542 };
1543 #endif
1544 
1545 
1565  uint32_t id;
1566 };
1567 
1569 #ifndef __cplusplus
1571  .id = 0xffffffff,
1572 };
1573 #endif
1574 
1585  uint32_t version:2;
1586  uint32_t oam_pkt:1;
1587  uint32_t reserved:1;
1588  uint32_t ttl:6;
1589  uint32_t length:6;
1590  uint32_t reserved1:4;
1591  uint32_t mdtype:4;
1592  uint32_t next_proto:8;
1593  uint32_t spi:24;
1594  uint32_t sindex:8;
1595 };
1596 
1598 #ifndef __cplusplus
1600  .mdtype = 0xf,
1601  .next_proto = 0xff,
1602  .spi = 0xffffff,
1603  .sindex = 0xff,
1604 };
1605 #endif
1606 
1617  uint32_t type:8;
1618  uint32_t max_resp_time:8;
1619  uint32_t checksum:16;
1620  uint32_t group_addr;
1621 };
1622 
1624 #ifndef __cplusplus
1626  .group_addr = 0xffffffff,
1627 };
1628 #endif
1629 
1640  uint32_t next_hdr:8;
1641  uint32_t payload_len:8;
1642  uint32_t reserved:16;
1643  uint32_t spi;
1644  uint32_t seq_num;
1645 };
1646 
1648 #ifndef __cplusplus
1650  .spi = 0xffffffff,
1651 };
1652 #endif
1653 
1663  uint8_t s_field;
1664  uint8_t msg_type;
1665  rte_be16_t msg_len;
1666  rte_be64_t seid;
1667 };
1668 
1670 #ifndef __cplusplus
1672  .s_field = 0x01,
1673  .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1674 };
1675 #endif
1676 
1686  struct rte_ecpri_combined_msg_hdr hdr;
1687 };
1688 
1690 #ifndef __cplusplus
1692  .hdr = {
1693  .common = {
1694  .u32 = 0x0,
1695  },
1696  },
1697 };
1698 #endif
1699 
1706  rte_be16_t option_class;
1707  uint8_t option_type;
1708  uint8_t option_len;
1709  uint32_t *data;
1710 };
1711 
1713 #ifndef __cplusplus
1714 static const struct rte_flow_item_geneve_opt
1716  .option_type = 0xff,
1717 };
1718 #endif
1719 
1732  uint32_t level;
1733  RTE_STD_C11
1734  union {
1735  __extension__
1736  struct {
1738  uint64_t packet_ok:1;
1740  uint64_t l2_ok:1;
1742  uint64_t l3_ok:1;
1744  uint64_t l4_ok:1;
1746  uint64_t l2_crc_ok:1;
1748  uint64_t ipv4_csum_ok:1;
1750  uint64_t l4_csum_ok:1;
1752  uint64_t l3_len_ok:1;
1753  uint64_t reserved:56;
1754  };
1755  uint64_t value;
1756  };
1757 };
1758 
1759 #ifndef __cplusplus
1760 static const struct rte_flow_item_integrity
1761 rte_flow_item_integrity_mask = {
1762  .level = 0,
1763  .value = 0,
1764 };
1765 #endif
1766 
1770 #define RTE_FLOW_CONNTRACK_PKT_STATE_VALID RTE_BIT32(0)
1771 
1774 #define RTE_FLOW_CONNTRACK_PKT_STATE_CHANGED RTE_BIT32(1)
1775 
1779 #define RTE_FLOW_CONNTRACK_PKT_STATE_INVALID RTE_BIT32(2)
1780 
1784 #define RTE_FLOW_CONNTRACK_PKT_STATE_DISABLED RTE_BIT32(3)
1785 
1789 #define RTE_FLOW_CONNTRACK_PKT_STATE_BAD RTE_BIT32(4)
1790 
1802  uint32_t flags;
1803 };
1804 
1806 #ifndef __cplusplus
1808  .flags = 0xffffffff,
1809 };
1810 #endif
1811 
1818  uint16_t port_id;
1819 };
1820 
1822 #ifndef __cplusplus
1824  .port_id = 0xffff,
1825 };
1826 #endif
1827 
1837  struct rte_l2tpv2_combined_msg_hdr hdr;
1838 };
1839 
1841 #ifndef __cplusplus
1843  /*
1844  * flags and version bit mask
1845  * 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
1846  * T L x x S x O P x x x x V V V V
1847  */
1848  .hdr = {
1849  .common = {
1850  .flags_version = RTE_BE16(0xcb0f),
1851  },
1852  },
1853 };
1854 #endif
1855 
1865  struct rte_ppp_hdr hdr;
1866 };
1867 
1869 #ifndef __cplusplus
1871  .hdr = {
1872  .addr = 0xff,
1873  .ctrl = 0xff,
1874  .proto_id = RTE_BE16(0xffff),
1875  }
1876 };
1877 #endif
1878 
1914  const void *spec;
1915  const void *last;
1916  const void *mask;
1917 };
1918 
1936  struct rte_flow_item_flex_handle *handle;
1937  uint32_t length;
1938  const uint8_t *pattern;
1939 };
1971 };
1972 
2002 };
2003 
2009 __extension__
2013  uint32_t field_size;
2014  int32_t field_base;
2015  uint32_t offset_base;
2016  uint32_t offset_mask;
2017  int32_t offset_shift;
2018  uint32_t field_id:16;
2019  uint32_t reserved:16;
2020 };
2021 
2032  struct rte_flow_item item;
2037  uint32_t next;
2038 };
2039 
2056  struct rte_flow_item_flex_field next_header;
2061  struct rte_flow_item_flex_field next_protocol;
2069  uint32_t nb_samples;
2079  uint32_t nb_inputs;
2087  uint32_t nb_outputs;
2088 };
2089 
2096  enum rte_color color;
2097 };
2098 
2100 #ifndef __cplusplus
2102  .color = RTE_COLORS,
2103 };
2104 #endif
2105 
2140 
2148 
2156 
2165 
2177 
2189 
2196 
2205 
2216 
2225 
2237 
2249 
2260 
2268 
2276 
2287 
2295 
2303 
2311 
2319 
2327 
2335 
2343 
2352 
2360 
2369 
2376 
2383 
2396 
2409 
2422 
2435 
2449 
2463 
2474 
2484 
2494 
2507 
2520 
2537 
2554 
2571 
2588 
2601 
2611 
2624 
2637 
2650 
2658 
2669 
2680 
2688 
2697 
2705 
2712 
2720 
2728 
2739 };
2740 
2752  uint32_t id;
2753 };
2754 
2768  uint32_t group;
2769 };
2770 
2777  uint16_t index;
2778 };
2779 
2794  uint32_t timeout:24;
2795  uint32_t reserved:8;
2797  void *context;
2798 };
2799 
2807  uint32_t reserved:6;
2808  uint32_t aged:1;
2811  uint32_t sec_since_last_hit:24;
2812 };
2813 
2834  uint32_t reserved:6;
2835  uint32_t timeout_valid:1;
2836  uint32_t timeout:24;
2838  uint32_t touch:1;
2839 };
2840 
2859  uint32_t id;
2860 };
2861 
2868  uint32_t reset:1;
2869  uint32_t hits_set:1;
2870  uint32_t bytes_set:1;
2871  uint32_t reserved:29;
2872  uint64_t hits;
2873  uint64_t bytes;
2874 };
2875 
2880  RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
2889  RTE_ETH_HASH_FUNCTION_MAX,
2890 };
2891 
2935  uint32_t level;
2936  uint64_t types;
2937  uint32_t key_len;
2938  uint32_t queue_num;
2939  const uint8_t *key;
2940  const uint16_t *queue;
2941 };
2942 
2960  uint32_t original:1;
2961  uint32_t reserved:31;
2962  uint32_t id;
2963 };
2964 
2977  uint32_t original:1;
2978  uint32_t reserved:31;
2979  uint32_t id;
2980 };
2981 
2991  uint32_t mtr_id;
2992 };
2993 
3026 };
3027 
3036 };
3037 
3046 };
3047 
3055  uint8_t vlan_pcp;
3056 };
3057 
3066 };
3067 
3076 };
3077 
3111 };
3112 
3145 };
3146 
3167  uint8_t *data;
3168  uint8_t *preserve;
3169  size_t size;
3170 };
3171 
3188  uint8_t *data;
3189  size_t size;
3190 };
3191 
3204  rte_be32_t ipv4_addr;
3205 };
3206 
3219  uint8_t ipv6_addr[16];
3220 };
3221 
3234  rte_be16_t port;
3235 };
3236 
3243  uint8_t ttl_value;
3244 };
3245 
3252  uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
3253 };
3254 
3265  uint32_t data;
3266  uint32_t mask;
3267  uint8_t index;
3268 };
3269 
3290  uint32_t data;
3291  uint32_t mask;
3292 };
3293 
3302  uint8_t dscp;
3303 };
3304 
3322 struct rte_flow_action_handle;
3323 
3340 };
3341 
3352 };
3353 
3365  uint32_t scale:4;
3367  uint32_t close_initiated:1;
3369  uint32_t last_ack_seen:1;
3374  uint32_t data_unacked:1;
3379  uint32_t sent_end;
3384  uint32_t reply_end;
3386  uint32_t max_win;
3388  uint32_t max_ack;
3389 };
3390 
3403  uint16_t peer_port;
3408  uint32_t is_original_dir:1;
3416  uint32_t enable:1;
3418  uint32_t live_connection:1;
3420  uint32_t selective_ack:1;
3427  uint32_t last_direction:1;
3429  uint32_t liberal_mode:1;
3437  struct rte_flow_tcp_dir_param original_dir;
3439  struct rte_flow_tcp_dir_param reply_dir;
3441  uint16_t last_window;
3442  enum rte_flow_conntrack_tcp_last_index last_index;
3444  uint32_t last_seq;
3446  uint32_t last_ack;
3451  uint32_t last_end;
3452 };
3453 
3465  uint32_t direction:1;
3467  uint32_t state:1;
3469  uint32_t reserved:30;
3470 };
3471 
3482  enum rte_color color;
3483 };
3484 
3491  uint16_t port_id;
3492 };
3493 
3531 };
3532 
3540  enum rte_flow_field_id field;
3541  RTE_STD_C11
3542  union {
3543  struct {
3545  uint32_t level;
3547  uint32_t offset;
3548  };
3555  uint8_t value[16];
3561  void *pvalue;
3562  };
3563 };
3564 
3572 };
3573 
3585  enum rte_flow_modify_op operation;
3588  uint32_t width;
3589 };
3590 
3603 
3605  struct rte_flow_meter_profile *profile;
3607  struct rte_flow_meter_policy *policy;
3611  enum rte_color init_color;
3613  int state;
3614 };
3615 
3624  struct rte_flow_action_meter_mark meter_mark;
3626  uint32_t profile_valid:1;
3628  uint32_t policy_valid:1;
3630  uint32_t color_mode_valid:1;
3632  uint32_t init_color_valid:1;
3634  uint32_t state_valid:1;
3636  uint32_t reserved:27;
3637 };
3638 
3639 /* Mbuf dynamic field offset for metadata. */
3640 extern int32_t rte_flow_dynf_metadata_offs;
3641 
3642 /* Mbuf dynamic field flag mask for metadata. */
3643 extern uint64_t rte_flow_dynf_metadata_mask;
3644 
3645 /* Mbuf dynamic field pointer for metadata. */
3646 #define RTE_FLOW_DYNF_METADATA(m) \
3647  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
3648 
3649 /* Mbuf dynamic flags for metadata. */
3650 #define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask)
3651 #define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask)
3652 
3653 __rte_experimental
3654 static inline uint32_t
3655 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
3656 {
3657  return *RTE_FLOW_DYNF_METADATA(m);
3658 }
3659 
3660 __rte_experimental
3661 static inline void
3662 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
3663 {
3664  *RTE_FLOW_DYNF_METADATA(m) = v;
3665 }
3666 
3676  const void *conf;
3677 };
3678 
3685 struct rte_flow;
3686 
3692 struct rte_flow_meter_profile;
3693 
3699 struct rte_flow_meter_policy;
3700 
3718  uint32_t ratio;
3720  const struct rte_flow_action *actions;
3721 };
3722 
3748 };
3749 
3763  const void *cause;
3764  const char *message;
3765 };
3766 
3777  union {
3778  const struct rte_flow_attr *attr_ro;
3780  };
3781  union {
3782  const struct rte_flow_item *pattern_ro;
3784  };
3785  union {
3786  const struct rte_flow_action *actions_ro;
3788  };
3789 };
3790 
3803 
3815 
3827 
3839 
3852 
3865 
3878 
3892 
3906 
3920 
3934 };
3935 
3955 __rte_experimental
3956 int
3957 rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow,
3958  FILE *file, struct rte_flow_error *error);
3959 
3966 __rte_experimental
3967 static inline int
3969 {
3970  return !!rte_flow_dynf_metadata_mask;
3971 }
3972 
3983 __rte_experimental
3984 int
3986 
4039 int
4040 rte_flow_validate(uint16_t port_id,
4041  const struct rte_flow_attr *attr,
4042  const struct rte_flow_item pattern[],
4043  const struct rte_flow_action actions[],
4044  struct rte_flow_error *error);
4045 
4066 struct rte_flow *
4067 rte_flow_create(uint16_t port_id,
4068  const struct rte_flow_attr *attr,
4069  const struct rte_flow_item pattern[],
4070  const struct rte_flow_action actions[],
4071  struct rte_flow_error *error);
4072 
4093 int
4094 rte_flow_destroy(uint16_t port_id,
4095  struct rte_flow *flow,
4096  struct rte_flow_error *error);
4097 
4114 int
4115 rte_flow_flush(uint16_t port_id,
4116  struct rte_flow_error *error);
4117 
4142 int
4143 rte_flow_query(uint16_t port_id,
4144  struct rte_flow *flow,
4145  const struct rte_flow_action *action,
4146  void *data,
4147  struct rte_flow_error *error);
4148 
4194 int
4195 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
4196 
4214 int
4215 rte_flow_error_set(struct rte_flow_error *error,
4216  int code,
4217  enum rte_flow_error_type type,
4218  const void *cause,
4219  const char *message);
4220 
4226  size_t size;
4227  struct rte_flow_attr attr;
4230  uint8_t data[];
4231 };
4232 
4259 __rte_deprecated
4260 size_t
4261 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
4262  const struct rte_flow_attr *attr,
4263  const struct rte_flow_item *items,
4264  const struct rte_flow_action *actions);
4265 
4306 __rte_experimental
4307 int
4309  void *dst,
4310  size_t size,
4311  const void *src,
4312  struct rte_flow_error *error);
4313 
4342 __rte_experimental
4343 int
4344 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
4345  uint32_t nb_contexts, struct rte_flow_error *error);
4346 
4386 __rte_experimental
4387 int
4388 rte_flow_get_q_aged_flows(uint16_t port_id, uint32_t queue_id, void **contexts,
4389  uint32_t nb_contexts, struct rte_flow_error *error);
4390 
4402  uint32_t ingress:1;
4404  uint32_t egress:1;
4409  uint32_t transfer:1;
4410 };
4411 
4439 __rte_experimental
4440 struct rte_flow_action_handle *
4441 rte_flow_action_handle_create(uint16_t port_id,
4442  const struct rte_flow_indir_action_conf *conf,
4443  const struct rte_flow_action *action,
4444  struct rte_flow_error *error);
4445 
4468 __rte_experimental
4469 int
4470 rte_flow_action_handle_destroy(uint16_t port_id,
4471  struct rte_flow_action_handle *handle,
4472  struct rte_flow_error *error);
4473 
4507 __rte_experimental
4508 int
4509 rte_flow_action_handle_update(uint16_t port_id,
4510  struct rte_flow_action_handle *handle,
4511  const void *update,
4512  struct rte_flow_error *error);
4513 
4539 __rte_experimental
4540 int
4541 rte_flow_action_handle_query(uint16_t port_id,
4542  const struct rte_flow_action_handle *handle,
4543  void *data, struct rte_flow_error *error);
4544 
4545 /* Tunnel has a type and the key information. */
4546 struct rte_flow_tunnel {
4551  enum rte_flow_item_type type;
4552  uint64_t tun_id;
4554  RTE_STD_C11
4555  union {
4556  struct {
4559  } ipv4;
4560  struct {
4561  uint8_t src_addr[16];
4562  uint8_t dst_addr[16];
4563  } ipv6;
4564  };
4565  rte_be16_t tp_src;
4566  rte_be16_t tp_dst;
4567  uint16_t tun_flags;
4569  bool is_ipv6;
4575  uint8_t tos;
4576  uint8_t ttl;
4577  uint32_t label;
4578 };
4579 
4583 #define RTE_FLOW_RESTORE_INFO_TUNNEL RTE_BIT64(0)
4584 
4588 #define RTE_FLOW_RESTORE_INFO_ENCAPSULATED RTE_BIT64(1)
4589 
4593 #define RTE_FLOW_RESTORE_INFO_GROUP_ID RTE_BIT64(2)
4594 
4605  uint64_t flags;
4606  uint32_t group_id;
4607  struct rte_flow_tunnel tunnel;
4608 };
4609 
4633 __rte_experimental
4634 int
4635 rte_flow_tunnel_decap_set(uint16_t port_id,
4636  struct rte_flow_tunnel *tunnel,
4637  struct rte_flow_action **actions,
4638  uint32_t *num_of_actions,
4639  struct rte_flow_error *error);
4640 
4664 __rte_experimental
4665 int
4666 rte_flow_tunnel_match(uint16_t port_id,
4667  struct rte_flow_tunnel *tunnel,
4668  struct rte_flow_item **items,
4669  uint32_t *num_of_items,
4670  struct rte_flow_error *error);
4671 
4692 __rte_experimental
4693 int
4694 rte_flow_get_restore_info(uint16_t port_id,
4695  struct rte_mbuf *m,
4696  struct rte_flow_restore_info *info,
4697  struct rte_flow_error *error);
4698 
4715 __rte_experimental
4716 int
4717 rte_flow_tunnel_action_decap_release(uint16_t port_id,
4718  struct rte_flow_action *actions,
4719  uint32_t num_of_actions,
4720  struct rte_flow_error *error);
4721 
4738 __rte_experimental
4739 int
4740 rte_flow_tunnel_item_release(uint16_t port_id,
4741  struct rte_flow_item *items,
4742  uint32_t num_of_items,
4743  struct rte_flow_error *error);
4744 
4770 int
4771 rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
4772  struct rte_flow_error *error);
4773 
4792 __rte_experimental
4793 struct rte_flow_item_flex_handle *
4794 rte_flow_flex_item_create(uint16_t port_id,
4795  const struct rte_flow_item_flex_conf *conf,
4796  struct rte_flow_error *error);
4797 
4812 __rte_experimental
4813 int
4814 rte_flow_flex_item_release(uint16_t port_id,
4815  const struct rte_flow_item_flex_handle *handle,
4816  struct rte_flow_error *error);
4817 
4822 #define RTE_FLOW_PORT_FLAG_STRICT_QUEUE RTE_BIT32(0)
4823 
4836  uint32_t max_nb_queues;
4851  uint32_t max_nb_meters;
4861 };
4862 
4875  uint32_t max_size;
4876 };
4877 
4899 __rte_experimental
4900 int
4901 rte_flow_info_get(uint16_t port_id,
4902  struct rte_flow_port_info *port_info,
4903  struct rte_flow_queue_info *queue_info,
4904  struct rte_flow_error *error);
4905 
4919  uint32_t nb_counters;
4929  uint32_t nb_meters;
4934  uint32_t nb_conn_tracks;
4938  uint32_t flags;
4939 };
4940 
4953  uint32_t size;
4954 };
4955 
4987 __rte_experimental
4988 int
4989 rte_flow_configure(uint16_t port_id,
4990  const struct rte_flow_port_attr *port_attr,
4991  uint16_t nb_queue,
4992  const struct rte_flow_queue_attr *queue_attr[],
4993  struct rte_flow_error *error);
4994 
4999 struct rte_flow_pattern_template;
5000 
5007 __extension__
5016  uint32_t relaxed_matching:1;
5022  uint32_t ingress:1;
5024  uint32_t egress:1;
5026  uint32_t transfer:1;
5027 };
5028 
5056 __rte_experimental
5057 struct rte_flow_pattern_template *
5058 rte_flow_pattern_template_create(uint16_t port_id,
5059  const struct rte_flow_pattern_template_attr *template_attr,
5060  const struct rte_flow_item pattern[],
5061  struct rte_flow_error *error);
5062 
5083 __rte_experimental
5084 int
5085 rte_flow_pattern_template_destroy(uint16_t port_id,
5086  struct rte_flow_pattern_template *pattern_template,
5087  struct rte_flow_error *error);
5088 
5093 struct rte_flow_actions_template;
5094 
5101 __extension__
5108  uint32_t ingress:1;
5110  uint32_t egress:1;
5112  uint32_t transfer:1;
5113 };
5114 
5150 __rte_experimental
5151 struct rte_flow_actions_template *
5152 rte_flow_actions_template_create(uint16_t port_id,
5153  const struct rte_flow_actions_template_attr *template_attr,
5154  const struct rte_flow_action actions[],
5155  const struct rte_flow_action masks[],
5156  struct rte_flow_error *error);
5157 
5178 __rte_experimental
5179 int
5180 rte_flow_actions_template_destroy(uint16_t port_id,
5181  struct rte_flow_actions_template *actions_template,
5182  struct rte_flow_error *error);
5183 
5188 struct rte_flow_template_table;
5189 
5200  struct rte_flow_attr flow_attr;
5204  uint32_t nb_flows;
5205 };
5206 
5239 __rte_experimental
5240 struct rte_flow_template_table *
5241 rte_flow_template_table_create(uint16_t port_id,
5242  const struct rte_flow_template_table_attr *table_attr,
5243  struct rte_flow_pattern_template *pattern_templates[],
5244  uint8_t nb_pattern_templates,
5245  struct rte_flow_actions_template *actions_templates[],
5246  uint8_t nb_actions_templates,
5247  struct rte_flow_error *error);
5248 
5269 __rte_experimental
5270 int
5271 rte_flow_template_table_destroy(uint16_t port_id,
5272  struct rte_flow_template_table *template_table,
5273  struct rte_flow_error *error);
5274 
5281 __extension__
5287  uint32_t postpone:1;
5288 };
5289 
5326 __rte_experimental
5327 struct rte_flow *
5328 rte_flow_async_create(uint16_t port_id,
5329  uint32_t queue_id,
5330  const struct rte_flow_op_attr *op_attr,
5331  struct rte_flow_template_table *template_table,
5332  const struct rte_flow_item pattern[],
5333  uint8_t pattern_template_index,
5334  const struct rte_flow_action actions[],
5335  uint8_t actions_template_index,
5336  void *user_data,
5337  struct rte_flow_error *error);
5338 
5368 __rte_experimental
5369 int
5370 rte_flow_async_destroy(uint16_t port_id,
5371  uint32_t queue_id,
5372  const struct rte_flow_op_attr *op_attr,
5373  struct rte_flow *flow,
5374  void *user_data,
5375  struct rte_flow_error *error);
5376 
5397 __rte_experimental
5398 int
5399 rte_flow_push(uint16_t port_id,
5400  uint32_t queue_id,
5401  struct rte_flow_error *error);
5402 
5418 };
5419 
5426 __extension__
5431  enum rte_flow_op_status status;
5435  void *user_data;
5436 };
5437 
5463 __rte_experimental
5464 int
5465 rte_flow_pull(uint16_t port_id,
5466  uint32_t queue_id,
5467  struct rte_flow_op_result res[],
5468  uint16_t n_res,
5469  struct rte_flow_error *error);
5470 
5497 __rte_experimental
5498 struct rte_flow_action_handle *
5499 rte_flow_async_action_handle_create(uint16_t port_id,
5500  uint32_t queue_id,
5501  const struct rte_flow_op_attr *op_attr,
5502  const struct rte_flow_indir_action_conf *indir_action_conf,
5503  const struct rte_flow_action *action,
5504  void *user_data,
5505  struct rte_flow_error *error);
5506 
5532 __rte_experimental
5533 int
5534 rte_flow_async_action_handle_destroy(uint16_t port_id,
5535  uint32_t queue_id,
5536  const struct rte_flow_op_attr *op_attr,
5537  struct rte_flow_action_handle *action_handle,
5538  void *user_data,
5539  struct rte_flow_error *error);
5540 
5571 __rte_experimental
5572 int
5573 rte_flow_async_action_handle_update(uint16_t port_id,
5574  uint32_t queue_id,
5575  const struct rte_flow_op_attr *op_attr,
5576  struct rte_flow_action_handle *action_handle,
5577  const void *update,
5578  void *user_data,
5579  struct rte_flow_error *error);
5580 
5615 __rte_experimental
5616 int
5617 rte_flow_async_action_handle_query(uint16_t port_id,
5618  uint32_t queue_id,
5619  const struct rte_flow_op_attr *op_attr,
5620  const struct rte_flow_action_handle *action_handle,
5621  void *data,
5622  void *user_data,
5623  struct rte_flow_error *error);
5624 
5625 #ifdef __cplusplus
5626 }
5627 #endif
5628 
5629 #endif /* RTE_FLOW_H_ */
uint32_t reserved
Definition: rte_flow.h:117
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
Definition: rte_flow.h:1400
rte_be32_t u32
Definition: rte_ecpri.h:72
uint8_t addr
Definition: rte_ppp.h:25
rte_flow_field_id
Definition: rte_flow.h:3497
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:1078
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1190
__rte_experimental int rte_flow_action_handle_update(uint16_t port_id, struct rte_flow_action_handle *handle, const void *update, struct rte_flow_error *error)
__rte_experimental int rte_flow_async_action_handle_query(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, const struct rte_flow_action_handle *action_handle, void *data, void *user_data, struct rte_flow_error *error)
uint32_t reserved
Definition: rte_flow.h:873
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)
uint32_t max_nb_aging_objects
Definition: rte_flow.h:4846
struct rte_ether_addr src_addr
Definition: rte_ether.h:269
struct rte_flow_action * actions
Definition: rte_flow.h:3787
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1349
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:878
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:1008
__rte_experimental int rte_flow_action_handle_query(uint16_t port_id, const struct rte_flow_action_handle *handle, void *data, struct rte_flow_error *error)
__rte_experimental struct rte_flow * rte_flow_async_create(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_template_table *template_table, const struct rte_flow_item pattern[], uint8_t pattern_template_index, const struct rte_flow_action actions[], uint8_t actions_template_index, void *user_data, struct rte_flow_error *error)
rte_be16_t protocol
Definition: rte_flow.h:1191
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
Definition: rte_flow.h:1671
uint32_t has_auth_ext
Definition: rte_flow.h:861
uint32_t nb_counters
Definition: rte_flow.h:4919
uint32_t num
Definition: rte_flow.h:663
__rte_experimental int rte_flow_async_destroy(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow *flow, void *user_data, struct rte_flow_error *error)
struct rte_flow_attr * attr
Definition: rte_flow.h:3779
uint32_t has_mobil_ext
Definition: rte_flow.h:867
uint32_t sec_since_last_hit
Definition: rte_flow.h:2811
uint32_t rte_be32_t
__rte_experimental int rte_flow_action_handle_destroy(uint16_t port_id, struct rte_flow_action_handle *handle, struct rte_flow_error *error)
rte_flow_item_flex_tunnel_mode
Definition: rte_flow.h:1976
uint32_t original
Definition: rte_flow.h:2960
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)
struct rte_flow_item_flex_link * input_link
Definition: rte_flow.h:2077
uint32_t group
Definition: rte_flow.h:89
__rte_experimental int rte_flow_async_action_handle_destroy(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_action_handle *action_handle, void *user_data, struct rte_flow_error *error)
uint32_t nb_aging_objects
Definition: rte_flow.h:4924
struct rte_flow_item * definition
Definition: rte_flow.h:3110
uint32_t nb_meters
Definition: rte_flow.h:4929
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:1084
struct rte_flow_meter_profile * profile
Definition: rte_flow.h:3605
rte_be16_t msg_len
Definition: rte_flow.h:1151
__rte_experimental int rte_flow_template_table_destroy(uint16_t port_id, struct rte_flow_template_table *template_table, struct rte_flow_error *error)
struct rte_ether_addr dst_addr
Definition: rte_ether.h:274
static const struct rte_flow_item_gtp rte_flow_item_gtp_mask
Definition: rte_flow.h:1157
uint32_t postpone
Definition: rte_flow.h:5287
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:901
rte_be16_t flags_version
Definition: rte_l2tpv2.h:101
#define RTE_ETHER_ADDR_LEN
Definition: rte_ether.h:25
static const struct rte_flow_item_geneve rte_flow_item_geneve_mask
Definition: rte_flow.h:1198
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:3778
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:958
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:668
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1447
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1173
rte_flow_conntrack_state
Definition: rte_flow.h:3327
__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:896
__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:1149
struct rte_ether_addr tla
Definition: rte_flow.h:1419
rte_flow_item_flex_field_mode
Definition: rte_flow.h:1943
rte_be16_t protocol
Definition: rte_flow.h:1036
uint32_t reserved
Definition: rte_flow.h:719
rte_be32_t spi
Definition: rte_esp.h:24
static const struct rte_flow_item_meter_color rte_flow_item_meter_color_mask
Definition: rte_flow.h:2101
static const struct rte_flow_item_conntrack rte_flow_item_conntrack_mask
Definition: rte_flow.h:1807
static const struct rte_flow_item_geneve_opt rte_flow_item_geneve_opt_mask
Definition: rte_flow.h:1715
static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask
Definition: rte_flow.h:1300
rte_be16_t src_port
Definition: rte_sctp.h:29
struct rte_flow_action * actions
Definition: rte_flow.h:4229
uint32_t nb_conn_tracks
Definition: rte_flow.h:4934
uint32_t max_nb_conn_tracks
Definition: rte_flow.h:4856
enum rte_color color
Definition: rte_flow.h:2096
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:832
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1570
uint32_t reserved
Definition: rte_flow.h:2807
struct rte_flow_item_flex_field * sample_data
Definition: rte_flow.h:2067
rte_be32_t src_addr
Definition: rte_ip.h:63
static const struct rte_flow_item_icmp6_nd_opt rte_flow_item_icmp6_nd_opt_mask
Definition: rte_flow.h:1375
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:990
#define RTE_BIT32(nr)
Definition: rte_bitops.h:38
uint8_t src_addr[16]
Definition: rte_ip.h:540
static const struct rte_flow_item_port_id rte_flow_item_port_id_mask
Definition: rte_flow.h:693
struct rte_ether_addr dst_addr
Definition: rte_ether.h:268
static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask
Definition: rte_flow.h:641
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:1043
uint64_t rte_be64_t
const void * mask
Definition: rte_flow.h:1916
struct rte_flow_item * pattern
Definition: rte_flow.h:3783
rte_be16_t type
Definition: rte_flow.h:766
const void * cause
Definition: rte_flow.h:3763
__rte_experimental int rte_flow_async_action_handle_update(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_action_handle *action_handle, const void *update, void *user_data, struct rte_flow_error *error)
static const struct rte_flow_item_l2tpv2 rte_flow_item_l2tpv2_mask
Definition: rte_flow.h:1842
struct rte_l2tpv2_common_hdr common
Definition: rte_l2tpv2.h:223
static const struct rte_flow_item_udp rte_flow_item_udp_mask
Definition: rte_flow.h:920
__rte_experimental int rte_flow_get_q_aged_flows(uint16_t port_id, uint32_t queue_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
struct rte_esp_hdr hdr
Definition: rte_flow.h:1168
rte_flow_error_type
Definition: rte_flow.h:3729
uint32_t has_esp_ext
Definition: rte_flow.h:863
rte_flow_conv_op
Definition: rte_flow.h:3796
rte_be16_t src_port
Definition: rte_udp.h:29
uint32_t has_shim6_ext
Definition: rte_flow.h:871
__rte_experimental int rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow, FILE *file, struct rte_flow_error *error)
uint32_t has_route_ext
Definition: rte_flow.h:857
__rte_experimental int rte_flow_actions_template_destroy(uint16_t port_id, struct rte_flow_actions_template *actions_template, struct rte_flow_error *error)
const uint8_t * pattern
Definition: rte_flow.h:723
uint32_t search
Definition: rte_flow.h:718
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:1010
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:728
uint16_t limit
Definition: rte_flow.h:721
rte_flow_conntrack_tcp_last_index
Definition: rte_flow.h:3345
__rte_experimental struct rte_flow_item_flex_handle * rte_flow_flex_item_create(uint16_t port_id, const struct rte_flow_item_flex_conf *conf, struct rte_flow_error *error)
struct rte_gtp_psc_generic_hdr hdr
Definition: rte_flow.h:1458
uint32_t max_nb_queues
Definition: rte_flow.h:4836
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:1063
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1322
__rte_experimental struct rte_flow_action_handle * rte_flow_action_handle_create(uint16_t port_id, const struct rte_flow_indir_action_conf *conf, const struct rte_flow_action *action, struct rte_flow_error *error)
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:3676
const char * message
Definition: rte_flow.h:3764
rte_eth_hash_function
Definition: rte_flow.h:2879
uint32_t close_initiated
Definition: rte_flow.h:3367
uint16_t length
Definition: rte_flow.h:722
const void * last
Definition: rte_flow.h:1915
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1425
rte_be32_t teid
Definition: rte_flow.h:1152
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
uint32_t ingress
Definition: rte_flow.h:94
rte_be16_t tci
Definition: rte_flow.h:806
rte_be32_t vx_vni
Definition: rte_vxlan.h:35
uint32_t max_nb_meters
Definition: rte_flow.h:4851
__rte_experimental struct rte_flow_action_handle * rte_flow_async_action_handle_create(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, const struct rte_flow_indir_action_conf *indir_action_conf, const struct rte_flow_action *action, void *user_data, struct rte_flow_error *error)
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask
Definition: rte_flow.h:837
size_t size
Definition: rte_flow.h:4226
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:1035
static const struct rte_flow_item_ppp rte_flow_item_ppp_mask
Definition: rte_flow.h:1870
const uint8_t * pattern
Definition: rte_flow.h:1938
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1464
uint32_t supported_flags
Definition: rte_flow.h:4860
rte_be16_t length
Definition: rte_flow.h:1481
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:3786
uint32_t has_vlan
Definition: rte_flow.h:770
uint32_t has_more_vlan
Definition: rte_flow.h:812
struct rte_flow_item * items
Definition: rte_flow.h:4228
__rte_experimental int rte_flow_get_aged_flows(uint16_t port_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
uint32_t timeout_valid
Definition: rte_flow.h:2835
rte_flow_action_type
Definition: rte_flow.h:2132
struct rte_ether_addr sla
Definition: rte_flow.h:1394
struct rte_flow_item_flex_link * output_link
Definition: rte_flow.h:2085
__rte_experimental struct rte_flow_template_table * rte_flow_template_table_create(uint16_t port_id, const struct rte_flow_template_table_attr *table_attr, struct rte_flow_pattern_template *pattern_templates[], uint8_t nb_pattern_templates, struct rte_flow_actions_template *actions_templates[], uint8_t nb_actions_templates, struct rte_flow_error *error)
rte_flow_modify_op
Definition: rte_flow.h:3568
uint32_t has_hop_ext
Definition: rte_flow.h:855
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)
__rte_experimental int rte_flow_pattern_template_destroy(uint16_t port_id, struct rte_flow_pattern_template *pattern_template, struct rte_flow_error *error)
static const struct rte_flow_item_l2tpv3oip rte_flow_item_l2tpv3oip_mask
Definition: rte_flow.h:1540
rte_color
Definition: rte_meter.h:35
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1625
const void * spec
Definition: rte_flow.h:1914
uint8_t label_tc_s[3]
Definition: rte_flow.h:1057
uint8_t version_type
Definition: rte_flow.h:1478
#define RTE_STD_C11
Definition: rte_common.h:39
__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:2939
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1243
uint32_t has_hip_ext
Definition: rte_flow.h:869
const struct rte_flow_action * actions
Definition: rte_flow.h:3720
__rte_experimental int rte_flow_flex_item_release(uint16_t port_id, const struct rte_flow_item_flex_handle *handle, struct rte_flow_error *error)
uint32_t sec_since_last_hit_valid
Definition: rte_flow.h:2810
rte_be16_t vlan_tci
Definition: rte_ether.h:285
struct rte_ether_addr sha
Definition: rte_flow.h:1234
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:776
rte_flow_op_status
Definition: rte_flow.h:5409
rte_be16_t src_port
Definition: rte_tcp.h:29
static const struct rte_flow_item_ethdev rte_flow_item_ethdev_mask
Definition: rte_flow.h:1823
__rte_experimental int rte_flow_info_get(uint16_t port_id, struct rte_flow_port_info *port_info, struct rte_flow_queue_info *queue_info, struct rte_flow_error *error)
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:859
uint32_t reserved
Definition: rte_flow.h:2961
__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:1649
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1523
uint32_t priority
Definition: rte_flow.h:90
uint32_t has_dest_ext
Definition: rte_flow.h:865
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1268
uint32_t max_nb_counters
Definition: rte_flow.h:4841
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:853
static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask
Definition: rte_flow.h:1691
__rte_experimental struct rte_flow_actions_template * rte_flow_actions_template_create(uint16_t port_id, const struct rte_flow_actions_template_attr *template_attr, const struct rte_flow_action actions[], const struct rte_flow_action masks[], struct rte_flow_error *error)
rte_be16_t protocol
Definition: rte_flow.h:1079
uint32_t queue_num
Definition: rte_flow.h:2938
uint8_t tni[3]
Definition: rte_flow.h:1037
struct rte_tcp_hdr hdr
Definition: rte_flow.h:934
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1503
uint32_t transfer
Definition: rte_flow.h:116
struct rte_flow_item * definition
Definition: rte_flow.h:3144
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:818
uint8_t msg_type
Definition: rte_flow.h:1150
uint32_t reserved
Definition: rte_flow.h:813
uint32_t egress
Definition: rte_flow.h:98
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
Definition: rte_flow.h:1018
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:3968
__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)
__rte_experimental struct rte_flow_pattern_template * rte_flow_pattern_template_create(uint16_t port_id, const struct rte_flow_pattern_template_attr *template_attr, const struct rte_flow_item pattern[], struct rte_flow_error *error)
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask
Definition: rte_flow.h:939
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1132
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:61
rte_be16_t inner_type
Definition: rte_flow.h:807
__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:915
__rte_experimental int rte_flow_configure(uint16_t port_id, const struct rte_flow_port_attr *port_attr, uint16_t nb_queue, const struct rte_flow_queue_attr *queue_attr[], struct rte_flow_error *error)
const uint16_t * queue
Definition: rte_flow.h:2940
rte_flow_item_type
Definition: rte_flow.h:136
__rte_experimental int rte_flow_pull(uint16_t port_id, uint32_t queue_id, struct rte_flow_op_result res[], uint16_t n_res, struct rte_flow_error *error)
uint32_t relative
Definition: rte_flow.h:717
int32_t offset
Definition: rte_flow.h:720
rte_be16_t inner_type
Definition: rte_flow.h:1013
__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)
struct rte_flow_item_flex_handle * handle
Definition: rte_flow.h:1936
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:3782
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1218
rte_be16_t session_id
Definition: rte_flow.h:1480
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1599
__rte_experimental int rte_flow_push(uint16_t port_id, uint32_t queue_id, struct rte_flow_error *error)
int rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id, struct rte_flow_error *error)
struct rte_sctp_hdr hdr
Definition: rte_flow.h:953
uint32_t reserved
Definition: rte_flow.h:771