DPDK  23.07.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_arp.h>
24 #include <rte_icmp.h>
25 #include <rte_ip.h>
26 #include <rte_sctp.h>
27 #include <rte_tcp.h>
28 #include <rte_udp.h>
29 #include <rte_vxlan.h>
30 #include <rte_esp.h>
31 #include <rte_higig.h>
32 #include <rte_ecpri.h>
33 #include <rte_bitops.h>
34 #include <rte_mbuf_dyn.h>
35 #include <rte_meter.h>
36 #include <rte_gtp.h>
37 #include <rte_l2tpv2.h>
38 #include <rte_ppp.h>
39 #include <rte_gre.h>
40 #include <rte_macsec.h>
41 #include <rte_ib.h>
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 #define RTE_FLOW_LOG(level, ...) \
48  rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, "" __VA_ARGS__)
49 
90 struct rte_flow_attr {
101  uint32_t group;
102  uint32_t priority;
106  uint32_t ingress:1;
110  uint32_t egress:1;
128  uint32_t transfer:1;
129  uint32_t reserved:29;
130 };
131 
158 
168 
178 
186 
200 
207 
214 
221 
228 
235 
242 
249 
256 
263 
270 
277 
284 
291 
298 
310 
319 
328 
337 
344 
351 
358 
365 
372 
379 
386 
393 
400 
408 
416 
423 
432 
445 
454 
463 
472 
481 
488 
495 
502 
508 
517 
526 
533 
542 
549 
556 
567 
576 
585 
595 
604 
611 
618 
625 
632 
639 
646 
653 
660 
667 
676 
684 
691 };
692 
704 };
705 
712  enum rte_flow_quota_state state;
713 };
714 
718 #ifndef __cplusplus
720  .state = (enum rte_flow_quota_state)0xff
721 };
722 #endif
723 
731  struct rte_higig2_hdr hdr;
732 };
733 
735 #ifndef __cplusplus
737  .hdr = {
738  .ppt1 = {
739  .classification = RTE_BE16(UINT16_MAX),
740  .vid = RTE_BE16(0xfff),
741  },
742  },
743 };
744 #endif
745 
758  uint32_t num;
759 };
760 
762 #ifndef __cplusplus
764  .num = 0x00000000,
765 };
766 #endif
767 
783  uint32_t id;
784 };
785 
787 #ifndef __cplusplus
789  .id = 0xffffffff,
790 };
791 #endif
792 
812  uint32_t relative:1;
813  uint32_t search:1;
814  uint32_t reserved:30;
815  int32_t offset;
816  uint16_t limit;
817  uint16_t length;
818  const uint8_t *pattern;
819 };
820 
822 #ifndef __cplusplus
824  .relative = 1,
825  .search = 1,
826  .reserved = 0x3fffffff,
827  .offset = 0xffffffff,
828  .limit = 0xffff,
829  .length = 0xffff,
830  .pattern = NULL,
831 };
832 #endif
833 
853  union {
854  struct {
855  /*
856  * These fields are retained for compatibility.
857  * Please switch to the new header field below.
858  */
859  struct rte_ether_addr dst;
860  struct rte_ether_addr src;
862  };
863  struct rte_ether_hdr hdr;
864  };
865  uint32_t has_vlan:1;
866  uint32_t reserved:31;
867 };
868 
870 #ifndef __cplusplus
872  .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
873  .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
874  .hdr.ether_type = RTE_BE16(0x0000),
875 };
876 #endif
877 
895  union {
896  struct {
897  /*
898  * These fields are retained for compatibility.
899  * Please switch to the new header field below.
900  */
903  };
904  struct rte_vlan_hdr hdr;
905  };
907  uint32_t has_more_vlan:1;
908  uint32_t reserved:31;
909 };
910 
912 #ifndef __cplusplus
914  .hdr.vlan_tci = RTE_BE16(0x0fff),
915  .hdr.eth_proto = RTE_BE16(0x0000),
916 };
917 #endif
918 
927  struct rte_ipv4_hdr hdr;
928 };
929 
931 #ifndef __cplusplus
933  .hdr = {
934  .src_addr = RTE_BE32(0xffffffff),
935  .dst_addr = RTE_BE32(0xffffffff),
936  },
937 };
938 #endif
939 
948  struct rte_ipv6_hdr hdr;
950  uint32_t has_hop_ext:1;
952  uint32_t has_route_ext:1;
954  uint32_t has_frag_ext:1;
956  uint32_t has_auth_ext:1;
958  uint32_t has_esp_ext:1;
960  uint32_t has_dest_ext:1;
962  uint32_t has_mobil_ext:1;
964  uint32_t has_hip_ext:1;
966  uint32_t has_shim6_ext:1;
968  uint32_t reserved:23;
969 };
970 
972 #ifndef __cplusplus
974  .hdr = {
975  .src_addr =
976  "\xff\xff\xff\xff\xff\xff\xff\xff"
977  "\xff\xff\xff\xff\xff\xff\xff\xff",
978  .dst_addr =
979  "\xff\xff\xff\xff\xff\xff\xff\xff"
980  "\xff\xff\xff\xff\xff\xff\xff\xff",
981  },
982 };
983 #endif
984 
994  struct rte_ipv6_routing_ext hdr;
995 };
996 
1003  struct rte_icmp_hdr hdr;
1004 };
1005 
1007 #ifndef __cplusplus
1009  .hdr = {
1010  .icmp_type = 0xff,
1011  .icmp_code = 0xff,
1012  },
1013 };
1014 #endif
1015 
1022  struct rte_udp_hdr hdr;
1023 };
1024 
1026 #ifndef __cplusplus
1028  .hdr = {
1029  .src_port = RTE_BE16(0xffff),
1030  .dst_port = RTE_BE16(0xffff),
1031  },
1032 };
1033 #endif
1034 
1041  struct rte_tcp_hdr hdr;
1042 };
1043 
1045 #ifndef __cplusplus
1047  .hdr = {
1048  .src_port = RTE_BE16(0xffff),
1049  .dst_port = RTE_BE16(0xffff),
1050  },
1051 };
1052 #endif
1053 
1060  struct rte_sctp_hdr hdr;
1061 };
1062 
1064 #ifndef __cplusplus
1066  .hdr = {
1067  .src_port = RTE_BE16(0xffff),
1068  .dst_port = RTE_BE16(0xffff),
1069  },
1070 };
1071 #endif
1072 
1080  union {
1081  struct {
1082  /*
1083  * These fields are retained for compatibility.
1084  * Please switch to the new header field below.
1085  */
1086  uint8_t flags;
1087  uint8_t rsvd0[3];
1088  uint8_t vni[3];
1089  uint8_t rsvd1;
1090  };
1091  struct rte_vxlan_hdr hdr;
1092  };
1093 };
1094 
1096 #ifndef __cplusplus
1098  .hdr.vni = "\xff\xff\xff",
1099 };
1100 #endif
1101 
1118  uint8_t in_ecid_e;
1119  uint8_t ecid_e;
1121 };
1122 
1124 #ifndef __cplusplus
1126  .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
1127 };
1128 #endif
1129 
1144  uint8_t tni[3];
1145  uint8_t flow_id;
1146 };
1147 
1149 #ifndef __cplusplus
1151  .tni = "\xff\xff\xff",
1152 };
1153 #endif
1154 
1164  uint8_t label_tc_s[3];
1165  uint8_t ttl;
1166 };
1167 
1169 #ifndef __cplusplus
1171  .label_tc_s = "\xff\xff\xf0",
1172 };
1173 #endif
1174 
1187 };
1188 
1190 #ifndef __cplusplus
1192  .protocol = RTE_BE16(0xffff),
1193 };
1194 #endif
1195 
1202  struct rte_gre_hdr_opt_checksum_rsvd checksum_rsvd;
1203  struct rte_gre_hdr_opt_key key;
1204  struct rte_gre_hdr_opt_sequence sequence;
1205 };
1206 
1213  struct rte_macsec_hdr macsec_hdr;
1214 };
1215 
1234  uint32_t thresh;
1235 };
1236 
1238 #ifndef __cplusplus
1240  .thresh = 0xffffffff,
1241 };
1242 #endif
1243 
1251  union {
1252  struct {
1253  /*
1254  * These are old fields kept for compatibility.
1255  * Please prefer hdr field below.
1256  */
1264  uint8_t msg_type;
1267  };
1268  struct rte_gtp_hdr hdr;
1269  };
1270 };
1271 
1273 #ifndef __cplusplus
1275  .hdr.teid = RTE_BE32(UINT32_MAX),
1276 };
1277 #endif
1278 
1285  struct rte_esp_hdr hdr;
1286 };
1287 
1289 #ifndef __cplusplus
1291  .hdr = {
1292  .spi = RTE_BE32(0xffffffff),
1293  },
1294 };
1295 #endif
1296 
1309  uint8_t vni[3];
1310  uint8_t rsvd1;
1311 };
1312 
1314 #ifndef __cplusplus
1316  .vni = "\xff\xff\xff",
1317 };
1318 #endif
1319 
1327  union {
1328  struct {
1329  /*
1330  * These are old fields kept for compatibility.
1331  * Please prefer hdr field below.
1332  */
1333  uint8_t flags;
1334  uint8_t rsvd0[2];
1335  uint8_t protocol;
1336  uint8_t vni[3];
1337  uint8_t rsvd1;
1338  };
1339  struct rte_vxlan_gpe_hdr hdr;
1340  };
1341 };
1342 
1344 #ifndef __cplusplus
1346  .hdr.vni = "\xff\xff\xff",
1347 };
1348 #endif
1349 
1357  union {
1358  struct {
1359  /*
1360  * These are old fields kept for compatibility.
1361  * Please prefer hdr field below.
1362  */
1365  uint8_t hln;
1366  uint8_t pln;
1368  struct rte_ether_addr sha;
1370  struct rte_ether_addr tha;
1372  };
1373  struct rte_arp_hdr hdr;
1374  };
1375 };
1376 
1378 #ifndef __cplusplus
1379 static const struct rte_flow_item_arp_eth_ipv4
1381  .hdr.arp_data.arp_sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1382  .hdr.arp_data.arp_sip = RTE_BE32(UINT32_MAX),
1383  .hdr.arp_data.arp_tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1384  .hdr.arp_data.arp_tip = RTE_BE32(UINT32_MAX),
1385 };
1386 #endif
1387 
1399  uint8_t next_hdr;
1400 };
1401 
1403 #ifndef __cplusplus
1404 static const
1406  .next_hdr = 0xff,
1407 };
1408 #endif
1409 
1421  struct rte_ipv6_fragment_ext hdr;
1422 };
1423 
1430  uint8_t type;
1431  uint8_t code;
1432  uint16_t checksum;
1433 };
1434 
1436 #ifndef __cplusplus
1438  .type = 0xff,
1439  .code = 0xff,
1440 };
1441 #endif
1442 
1450  struct rte_icmp_echo_hdr hdr;
1451 };
1452 
1459  uint8_t type;
1460  uint8_t code;
1463  uint8_t target_addr[16];
1464 };
1465 
1467 #ifndef __cplusplus
1468 static const
1470  .target_addr =
1471  "\xff\xff\xff\xff\xff\xff\xff\xff"
1472  "\xff\xff\xff\xff\xff\xff\xff\xff",
1473 };
1474 #endif
1475 
1482  uint8_t type;
1483  uint8_t code;
1490  uint8_t target_addr[16];
1491 };
1492 
1494 #ifndef __cplusplus
1495 static const
1497  .target_addr =
1498  "\xff\xff\xff\xff\xff\xff\xff\xff"
1499  "\xff\xff\xff\xff\xff\xff\xff\xff",
1500 };
1501 #endif
1502 
1515  uint8_t type;
1516  uint8_t length;
1517 };
1518 
1520 #ifndef __cplusplus
1521 static const struct rte_flow_item_icmp6_nd_opt
1523  .type = 0xff,
1524 };
1525 #endif
1526 
1539  uint8_t type;
1540  uint8_t length;
1541  struct rte_ether_addr sla;
1542 };
1543 
1545 #ifndef __cplusplus
1546 static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1548  .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1549 };
1550 #endif
1551 
1564  uint8_t type;
1565  uint8_t length;
1566  struct rte_ether_addr tla;
1567 };
1568 
1570 #ifndef __cplusplus
1571 static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1573  .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1574 };
1575 #endif
1576 
1589  uint32_t data;
1590 };
1591 
1593 #ifndef __cplusplus
1595  .data = UINT32_MAX,
1596 };
1597 #endif
1598 
1606 };
1607 
1609 #ifndef __cplusplus
1610 static const struct rte_flow_item_gtp_psc
1612  .hdr.qfi = 0x3f,
1613 };
1614 #endif
1615 
1625  uint8_t version_type;
1626  uint8_t code;
1629 };
1630 
1645 };
1646 
1648 #ifndef __cplusplus
1649 static const struct rte_flow_item_pppoe_proto_id
1651  .proto_id = RTE_BE16(0xffff),
1652 };
1653 #endif
1654 
1664  uint32_t data;
1665  uint8_t index;
1666 };
1667 
1669 #ifndef __cplusplus
1671  .data = 0xffffffff,
1672  .index = 0xff,
1673 };
1674 #endif
1675 
1683 };
1684 
1686 #ifndef __cplusplus
1688  .session_id = RTE_BE32(UINT32_MAX),
1689 };
1690 #endif
1691 
1692 
1712  uint32_t id;
1713 };
1714 
1716 #ifndef __cplusplus
1718  .id = 0xffffffff,
1719 };
1720 #endif
1721 
1731  uint32_t version:2;
1732  uint32_t oam_pkt:1;
1733  uint32_t reserved:1;
1734  uint32_t ttl:6;
1735  uint32_t length:6;
1736  uint32_t reserved1:4;
1737  uint32_t mdtype:4;
1738  uint32_t next_proto:8;
1739  uint32_t spi:24;
1740  uint32_t sindex:8;
1741 };
1742 
1744 #ifndef __cplusplus
1746  .mdtype = 0xf,
1747  .next_proto = 0xff,
1748  .spi = 0xffffff,
1749  .sindex = 0xff,
1750 };
1751 #endif
1752 
1762  uint32_t type:8;
1763  uint32_t max_resp_time:8;
1764  uint32_t checksum:16;
1765  uint32_t group_addr;
1766 };
1767 
1769 #ifndef __cplusplus
1771  .group_addr = 0xffffffff,
1772 };
1773 #endif
1774 
1784  uint32_t next_hdr:8;
1785  uint32_t payload_len:8;
1786  uint32_t reserved:16;
1787  uint32_t spi;
1788  uint32_t seq_num;
1789 };
1790 
1792 #ifndef __cplusplus
1794  .spi = 0xffffffff,
1795 };
1796 #endif
1797 
1807  uint8_t s_field;
1808  uint8_t msg_type;
1809  rte_be16_t msg_len;
1810  rte_be64_t seid;
1811 };
1812 
1814 #ifndef __cplusplus
1816  .s_field = 0x01,
1817  .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1818 };
1819 #endif
1820 
1830  struct rte_ecpri_combined_msg_hdr hdr;
1831 };
1832 
1834 #ifndef __cplusplus
1836  .hdr = {
1837  .common = {
1838  .u32 = 0x0,
1839  },
1840  },
1841 };
1842 #endif
1843 
1850  rte_be16_t option_class;
1851  uint8_t option_type;
1852  uint8_t option_len;
1853  uint32_t *data;
1854 };
1855 
1857 #ifndef __cplusplus
1858 static const struct rte_flow_item_geneve_opt
1860  .option_type = 0xff,
1861 };
1862 #endif
1863 
1876  uint32_t level;
1877  RTE_STD_C11
1878  union {
1879  __extension__
1880  struct {
1882  uint64_t packet_ok:1;
1884  uint64_t l2_ok:1;
1886  uint64_t l3_ok:1;
1888  uint64_t l4_ok:1;
1890  uint64_t l2_crc_ok:1;
1892  uint64_t ipv4_csum_ok:1;
1894  uint64_t l4_csum_ok:1;
1896  uint64_t l3_len_ok:1;
1897  uint64_t reserved:56;
1898  };
1899  uint64_t value;
1900  };
1901 };
1902 
1903 #ifndef __cplusplus
1904 static const struct rte_flow_item_integrity
1905 rte_flow_item_integrity_mask = {
1906  .level = 0,
1907  .value = 0,
1908 };
1909 #endif
1910 
1914 #define RTE_FLOW_CONNTRACK_PKT_STATE_VALID RTE_BIT32(0)
1915 
1918 #define RTE_FLOW_CONNTRACK_PKT_STATE_CHANGED RTE_BIT32(1)
1919 
1923 #define RTE_FLOW_CONNTRACK_PKT_STATE_INVALID RTE_BIT32(2)
1924 
1928 #define RTE_FLOW_CONNTRACK_PKT_STATE_DISABLED RTE_BIT32(3)
1929 
1933 #define RTE_FLOW_CONNTRACK_PKT_STATE_BAD RTE_BIT32(4)
1934 
1946  uint32_t flags;
1947 };
1948 
1950 #ifndef __cplusplus
1952  .flags = 0xffffffff,
1953 };
1954 #endif
1955 
1962  uint16_t port_id;
1963 };
1964 
1966 #ifndef __cplusplus
1968  .port_id = 0xffff,
1969 };
1970 #endif
1971 
1981  struct rte_l2tpv2_combined_msg_hdr hdr;
1982 };
1983 
1985 #ifndef __cplusplus
1987  /*
1988  * flags and version bit mask
1989  * 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
1990  * T L x x S x O P x x x x V V V V
1991  */
1992  .hdr = {
1993  .common = {
1994  .flags_version = RTE_BE16(0xcb0f),
1995  },
1996  },
1997 };
1998 #endif
1999 
2009  struct rte_ppp_hdr hdr;
2010 };
2011 
2013 #ifndef __cplusplus
2015  .hdr = {
2016  .addr = 0xff,
2017  .ctrl = 0xff,
2018  .proto_id = RTE_BE16(0xffff),
2019  }
2020 };
2021 #endif
2022 
2029  struct rte_ib_bth hdr;
2030 };
2031 
2033 #ifndef __cplusplus
2035  .hdr = {
2036  .opcode = 0xff,
2037  .dst_qp = "\xff\xff\xff",
2038  },
2039 };
2040 #endif
2041 
2077  const void *spec;
2078  const void *last;
2079  const void *mask;
2080 };
2081 
2099  struct rte_flow_item_flex_handle *handle;
2100  uint32_t length;
2101  const uint8_t *pattern;
2102 };
2134 };
2135 
2165 };
2166 
2172 __extension__
2176  uint32_t field_size;
2177  int32_t field_base;
2178  uint32_t offset_base;
2179  uint32_t offset_mask;
2180  int32_t offset_shift;
2181  uint32_t field_id:16;
2182  uint32_t reserved:16;
2183 };
2184 
2195  struct rte_flow_item item;
2200  uint32_t next;
2201 };
2202 
2219  struct rte_flow_item_flex_field next_header;
2224  struct rte_flow_item_flex_field next_protocol;
2232  uint32_t nb_samples;
2242  uint32_t nb_inputs;
2250  uint32_t nb_outputs;
2251 };
2252 
2259  enum rte_color color;
2260 };
2261 
2263 #ifndef __cplusplus
2265  .color = RTE_COLORS,
2266 };
2267 #endif
2268 
2284  uint8_t affinity;
2285 };
2286 
2288 #ifndef __cplusplus
2289 static const struct rte_flow_item_aggr_affinity
2291  .affinity = 0xff,
2292 };
2293 #endif
2294 
2304  uint16_t tx_queue;
2305 };
2306 
2308 #ifndef __cplusplus
2310  .tx_queue = 0xffff,
2311 };
2312 #endif
2313 
2348 
2356 
2364 
2373 
2385 
2397 
2404 
2413 
2424 
2433 
2445 
2457 
2468 
2476 
2484 
2495 
2503 
2511 
2519 
2527 
2535 
2543 
2551 
2560 
2568 
2577 
2584 
2591 
2604 
2617 
2630 
2643 
2657 
2671 
2682 
2692 
2702 
2715 
2728 
2745 
2762 
2779 
2796 
2809 
2819 
2832 
2845 
2858 
2866 
2877 
2888 
2896 
2905 
2913 
2920 
2928 
2936 
2947 
2956 
2966 
2975 
2985 
2992 };
2993 
3006 };
3007 
3018  int64_t quota;
3019 };
3020 
3030  int64_t quota;
3031 };
3032 
3044 };
3045 
3056  int64_t quota;
3057 };
3058 
3070  uint32_t id;
3071 };
3072 
3086  uint32_t group;
3087 };
3088 
3095  uint16_t index;
3096 };
3097 
3112  uint32_t timeout:24;
3113  uint32_t reserved:8;
3115  void *context;
3116 };
3117 
3125  uint32_t reserved:6;
3126  uint32_t aged:1;
3129  uint32_t sec_since_last_hit:24;
3130 };
3131 
3152  uint32_t reserved:6;
3153  uint32_t timeout_valid:1;
3154  uint32_t timeout:24;
3156  uint32_t touch:1;
3157 };
3158 
3177  uint32_t id;
3178 };
3179 
3186  uint32_t reset:1;
3187  uint32_t hits_set:1;
3188  uint32_t bytes_set:1;
3189  uint32_t reserved:29;
3190  uint64_t hits;
3191  uint64_t bytes;
3192 };
3193 
3198  RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
3207  RTE_ETH_HASH_FUNCTION_MAX,
3208 };
3209 
3253  uint32_t level;
3254  uint64_t types;
3255  uint32_t key_len;
3256  uint32_t queue_num;
3257  const uint8_t *key;
3258  const uint16_t *queue;
3259 };
3260 
3278  uint32_t original:1;
3279  uint32_t reserved:31;
3280  uint32_t id;
3281 };
3282 
3295  uint32_t original:1;
3296  uint32_t reserved:31;
3297  uint32_t id;
3298 };
3299 
3309  uint32_t mtr_id;
3310 };
3311 
3344 };
3345 
3354 };
3355 
3364 };
3365 
3373  uint8_t vlan_pcp;
3374 };
3375 
3384 };
3385 
3394 };
3395 
3428 };
3429 
3461 };
3462 
3483  uint8_t *data;
3484  uint8_t *preserve;
3485  size_t size;
3486 };
3487 
3504  uint8_t *data;
3505  size_t size;
3506 };
3507 
3520  rte_be32_t ipv4_addr;
3521 };
3522 
3535  uint8_t ipv6_addr[16];
3536 };
3537 
3551  uint8_t *data;
3552  size_t size;
3553  uint8_t type;
3554 };
3555 
3567  uint8_t type;
3568 };
3569 
3582  rte_be16_t port;
3583 };
3584 
3591  uint8_t ttl_value;
3592 };
3593 
3600  uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
3601 };
3602 
3613  uint32_t data;
3614  uint32_t mask;
3615  uint8_t index;
3616 };
3617 
3638  uint32_t data;
3639  uint32_t mask;
3640 };
3641 
3650  uint8_t dscp;
3651 };
3652 
3670 struct rte_flow_action_handle;
3671 
3688 };
3689 
3700 };
3701 
3713  uint32_t scale:4;
3715  uint32_t close_initiated:1;
3717  uint32_t last_ack_seen:1;
3722  uint32_t data_unacked:1;
3727  uint32_t sent_end;
3732  uint32_t reply_end;
3734  uint32_t max_win;
3736  uint32_t max_ack;
3737 };
3738 
3751  uint16_t peer_port;
3756  uint32_t is_original_dir:1;
3764  uint32_t enable:1;
3766  uint32_t live_connection:1;
3768  uint32_t selective_ack:1;
3775  uint32_t last_direction:1;
3777  uint32_t liberal_mode:1;
3785  struct rte_flow_tcp_dir_param original_dir;
3787  struct rte_flow_tcp_dir_param reply_dir;
3789  uint16_t last_window;
3790  enum rte_flow_conntrack_tcp_last_index last_index;
3792  uint32_t last_seq;
3794  uint32_t last_ack;
3799  uint32_t last_end;
3800 };
3801 
3813  uint32_t direction:1;
3815  uint32_t state:1;
3817  uint32_t reserved:30;
3818 };
3819 
3830  enum rte_color color;
3831 };
3832 
3839  uint16_t port_id;
3840 };
3841 
3886 };
3887 
3895  enum rte_flow_field_id field;
3896  RTE_STD_C11
3897  union {
3898  struct {
3900  union {
3901  struct {
3936  uint8_t level;
3937  union {
3943  uint8_t tag_index;
3950  struct {
3954  uint8_t type;
3959  };
3960  };
3961  };
3962  struct rte_flow_item_flex_handle *flex_handle;
3963  };
3965  uint32_t offset;
3966  };
3973  uint8_t value[16];
3979  void *pvalue;
3980  };
3981 };
3982 
3990 };
3991 
4003  enum rte_flow_modify_op operation;
4006  uint32_t width;
4007 };
4008 
4021 
4023  struct rte_flow_meter_profile *profile;
4025  struct rte_flow_meter_policy *policy;
4029  enum rte_color init_color;
4031  int state;
4032 };
4033 
4041  struct rte_flow_action_meter_mark meter_mark;
4043  uint32_t profile_valid:1;
4045  uint32_t policy_valid:1;
4047  uint32_t color_mode_valid:1;
4049  uint32_t init_color_valid:1;
4051  uint32_t state_valid:1;
4053  uint32_t reserved:27;
4054 };
4055 
4064  enum rte_color init_color;
4065 };
4066 
4067 /* Mbuf dynamic field offset for metadata. */
4068 extern int32_t rte_flow_dynf_metadata_offs;
4069 
4070 /* Mbuf dynamic field flag mask for metadata. */
4071 extern uint64_t rte_flow_dynf_metadata_mask;
4072 
4073 /* Mbuf dynamic field pointer for metadata. */
4074 #define RTE_FLOW_DYNF_METADATA(m) \
4075  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
4076 
4077 /* Mbuf dynamic flags for metadata. */
4078 #define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask)
4079 #define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask)
4080 
4081 __rte_experimental
4082 static inline uint32_t
4083 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
4084 {
4085  return *RTE_FLOW_DYNF_METADATA(m);
4086 }
4087 
4088 __rte_experimental
4089 static inline void
4090 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
4091 {
4092  *RTE_FLOW_DYNF_METADATA(m) = v;
4093 }
4094 
4104  const void *conf;
4105 };
4106 
4113 struct rte_flow;
4114 
4120 struct rte_flow_meter_profile;
4121 
4127 struct rte_flow_meter_policy;
4128 
4146  uint32_t ratio;
4148  const struct rte_flow_action *actions;
4149 };
4150 
4176 };
4177 
4191  const void *cause;
4192  const char *message;
4193 };
4194 
4205  union {
4206  const struct rte_flow_attr *attr_ro;
4208  };
4209  union {
4210  const struct rte_flow_item *pattern_ro;
4212  };
4213  union {
4214  const struct rte_flow_action *actions_ro;
4216  };
4217 };
4218 
4231 
4243 
4255 
4267 
4280 
4293 
4306 
4320 
4334 
4348 
4362 };
4363 
4383 __rte_experimental
4384 int
4385 rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow,
4386  FILE *file, struct rte_flow_error *error);
4387 
4394 __rte_experimental
4395 static inline int
4397 {
4398  return !!rte_flow_dynf_metadata_mask;
4399 }
4400 
4411 __rte_experimental
4412 int
4414 
4467 int
4468 rte_flow_validate(uint16_t port_id,
4469  const struct rte_flow_attr *attr,
4470  const struct rte_flow_item pattern[],
4471  const struct rte_flow_action actions[],
4472  struct rte_flow_error *error);
4473 
4494 struct rte_flow *
4495 rte_flow_create(uint16_t port_id,
4496  const struct rte_flow_attr *attr,
4497  const struct rte_flow_item pattern[],
4498  const struct rte_flow_action actions[],
4499  struct rte_flow_error *error);
4500 
4521 int
4522 rte_flow_destroy(uint16_t port_id,
4523  struct rte_flow *flow,
4524  struct rte_flow_error *error);
4525 
4542 __rte_experimental
4543 int
4544 rte_flow_actions_update(uint16_t port_id,
4545  struct rte_flow *flow,
4546  const struct rte_flow_action actions[],
4547  struct rte_flow_error *error);
4548 
4565 int
4566 rte_flow_flush(uint16_t port_id,
4567  struct rte_flow_error *error);
4568 
4593 int
4594 rte_flow_query(uint16_t port_id,
4595  struct rte_flow *flow,
4596  const struct rte_flow_action *action,
4597  void *data,
4598  struct rte_flow_error *error);
4599 
4645 int
4646 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
4647 
4665 int
4666 rte_flow_error_set(struct rte_flow_error *error,
4667  int code,
4668  enum rte_flow_error_type type,
4669  const void *cause,
4670  const char *message);
4671 
4677  size_t size;
4678  struct rte_flow_attr attr;
4681  uint8_t data[];
4682 };
4683 
4710 __rte_deprecated
4711 size_t
4712 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
4713  const struct rte_flow_attr *attr,
4714  const struct rte_flow_item *items,
4715  const struct rte_flow_action *actions);
4716 
4757 __rte_experimental
4758 int
4760  void *dst,
4761  size_t size,
4762  const void *src,
4763  struct rte_flow_error *error);
4764 
4793 __rte_experimental
4794 int
4795 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
4796  uint32_t nb_contexts, struct rte_flow_error *error);
4797 
4837 __rte_experimental
4838 int
4839 rte_flow_get_q_aged_flows(uint16_t port_id, uint32_t queue_id, void **contexts,
4840  uint32_t nb_contexts, struct rte_flow_error *error);
4841 
4853  uint32_t ingress:1;
4855  uint32_t egress:1;
4860  uint32_t transfer:1;
4861 };
4862 
4890 __rte_experimental
4891 struct rte_flow_action_handle *
4892 rte_flow_action_handle_create(uint16_t port_id,
4893  const struct rte_flow_indir_action_conf *conf,
4894  const struct rte_flow_action *action,
4895  struct rte_flow_error *error);
4896 
4919 __rte_experimental
4920 int
4921 rte_flow_action_handle_destroy(uint16_t port_id,
4922  struct rte_flow_action_handle *handle,
4923  struct rte_flow_error *error);
4924 
4958 __rte_experimental
4959 int
4960 rte_flow_action_handle_update(uint16_t port_id,
4961  struct rte_flow_action_handle *handle,
4962  const void *update,
4963  struct rte_flow_error *error);
4964 
4990 __rte_experimental
4991 int
4992 rte_flow_action_handle_query(uint16_t port_id,
4993  const struct rte_flow_action_handle *handle,
4994  void *data, struct rte_flow_error *error);
4995 
4996 /* Tunnel has a type and the key information. */
4997 struct rte_flow_tunnel {
5002  enum rte_flow_item_type type;
5003  uint64_t tun_id;
5005  RTE_STD_C11
5006  union {
5007  struct {
5010  } ipv4;
5011  struct {
5012  uint8_t src_addr[16];
5013  uint8_t dst_addr[16];
5014  } ipv6;
5015  };
5016  rte_be16_t tp_src;
5017  rte_be16_t tp_dst;
5018  uint16_t tun_flags;
5020  bool is_ipv6;
5026  uint8_t tos;
5027  uint8_t ttl;
5028  uint32_t label;
5029 };
5030 
5034 #define RTE_FLOW_RESTORE_INFO_TUNNEL RTE_BIT64(0)
5035 
5039 #define RTE_FLOW_RESTORE_INFO_ENCAPSULATED RTE_BIT64(1)
5040 
5044 #define RTE_FLOW_RESTORE_INFO_GROUP_ID RTE_BIT64(2)
5045 
5056  uint64_t flags;
5057  uint32_t group_id;
5058  struct rte_flow_tunnel tunnel;
5059 };
5060 
5084 __rte_experimental
5085 int
5086 rte_flow_tunnel_decap_set(uint16_t port_id,
5087  struct rte_flow_tunnel *tunnel,
5088  struct rte_flow_action **actions,
5089  uint32_t *num_of_actions,
5090  struct rte_flow_error *error);
5091 
5115 __rte_experimental
5116 int
5117 rte_flow_tunnel_match(uint16_t port_id,
5118  struct rte_flow_tunnel *tunnel,
5119  struct rte_flow_item **items,
5120  uint32_t *num_of_items,
5121  struct rte_flow_error *error);
5122 
5134 __rte_experimental
5135 uint64_t
5137 
5159 __rte_experimental
5160 int
5161 rte_flow_get_restore_info(uint16_t port_id,
5162  struct rte_mbuf *m,
5163  struct rte_flow_restore_info *info,
5164  struct rte_flow_error *error);
5165 
5182 __rte_experimental
5183 int
5184 rte_flow_tunnel_action_decap_release(uint16_t port_id,
5185  struct rte_flow_action *actions,
5186  uint32_t num_of_actions,
5187  struct rte_flow_error *error);
5188 
5205 __rte_experimental
5206 int
5207 rte_flow_tunnel_item_release(uint16_t port_id,
5208  struct rte_flow_item *items,
5209  uint32_t num_of_items,
5210  struct rte_flow_error *error);
5211 
5237 int
5238 rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
5239  struct rte_flow_error *error);
5240 
5259 __rte_experimental
5260 struct rte_flow_item_flex_handle *
5261 rte_flow_flex_item_create(uint16_t port_id,
5262  const struct rte_flow_item_flex_conf *conf,
5263  struct rte_flow_error *error);
5264 
5279 __rte_experimental
5280 int
5281 rte_flow_flex_item_release(uint16_t port_id,
5282  const struct rte_flow_item_flex_handle *handle,
5283  struct rte_flow_error *error);
5284 
5289 #define RTE_FLOW_PORT_FLAG_STRICT_QUEUE RTE_BIT32(0)
5290 
5302  uint32_t max_nb_queues;
5317  uint32_t max_nb_meters;
5327  uint32_t max_nb_quotas;
5332 };
5333 
5345  uint32_t max_size;
5346 };
5347 
5369 __rte_experimental
5370 int
5371 rte_flow_info_get(uint16_t port_id,
5372  struct rte_flow_port_info *port_info,
5373  struct rte_flow_queue_info *queue_info,
5374  struct rte_flow_error *error);
5375 
5381 #define RTE_FLOW_PORT_FLAG_SHARE_INDIRECT RTE_BIT32(0)
5382 
5395  uint32_t nb_counters;
5405  uint32_t nb_meters;
5410  uint32_t nb_conn_tracks;
5414  uint16_t host_port_id;
5419  uint32_t nb_quotas;
5423  uint32_t flags;
5424 };
5425 
5437  uint32_t size;
5438 };
5439 
5471 __rte_experimental
5472 int
5473 rte_flow_configure(uint16_t port_id,
5474  const struct rte_flow_port_attr *port_attr,
5475  uint16_t nb_queue,
5476  const struct rte_flow_queue_attr *queue_attr[],
5477  struct rte_flow_error *error);
5478 
5483 struct rte_flow_pattern_template;
5484 
5491 __extension__
5500  uint32_t relaxed_matching:1;
5506  uint32_t ingress:1;
5508  uint32_t egress:1;
5510  uint32_t transfer:1;
5511 };
5512 
5540 __rte_experimental
5541 struct rte_flow_pattern_template *
5542 rte_flow_pattern_template_create(uint16_t port_id,
5543  const struct rte_flow_pattern_template_attr *template_attr,
5544  const struct rte_flow_item pattern[],
5545  struct rte_flow_error *error);
5546 
5567 __rte_experimental
5568 int
5569 rte_flow_pattern_template_destroy(uint16_t port_id,
5570  struct rte_flow_pattern_template *pattern_template,
5571  struct rte_flow_error *error);
5572 
5577 struct rte_flow_actions_template;
5578 
5585 __extension__
5592  uint32_t ingress:1;
5594  uint32_t egress:1;
5596  uint32_t transfer:1;
5597 };
5598 
5634 __rte_experimental
5635 struct rte_flow_actions_template *
5636 rte_flow_actions_template_create(uint16_t port_id,
5637  const struct rte_flow_actions_template_attr *template_attr,
5638  const struct rte_flow_action actions[],
5639  const struct rte_flow_action masks[],
5640  struct rte_flow_error *error);
5641 
5662 __rte_experimental
5663 int
5664 rte_flow_actions_template_destroy(uint16_t port_id,
5665  struct rte_flow_actions_template *actions_template,
5666  struct rte_flow_error *error);
5667 
5672 struct rte_flow_template_table;
5673 
5687 #define RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_WIRE_ORIG RTE_BIT32(0)
5688 
5695 #define RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG RTE_BIT32(1)
5696 
5713 };
5714 
5738 };
5739 
5750  struct rte_flow_attr flow_attr;
5754  uint32_t nb_flows;
5763  uint32_t specialize;
5767  enum rte_flow_table_insertion_type insertion_type;
5772 };
5773 
5806 __rte_experimental
5807 struct rte_flow_template_table *
5808 rte_flow_template_table_create(uint16_t port_id,
5809  const struct rte_flow_template_table_attr *table_attr,
5810  struct rte_flow_pattern_template *pattern_templates[],
5811  uint8_t nb_pattern_templates,
5812  struct rte_flow_actions_template *actions_templates[],
5813  uint8_t nb_actions_templates,
5814  struct rte_flow_error *error);
5815 
5836 __rte_experimental
5837 int
5838 rte_flow_template_table_destroy(uint16_t port_id,
5839  struct rte_flow_template_table *template_table,
5840  struct rte_flow_error *error);
5841 
5848 __extension__
5854  uint32_t postpone:1;
5855 };
5856 
5893 __rte_experimental
5894 struct rte_flow *
5895 rte_flow_async_create(uint16_t port_id,
5896  uint32_t queue_id,
5897  const struct rte_flow_op_attr *op_attr,
5898  struct rte_flow_template_table *template_table,
5899  const struct rte_flow_item pattern[],
5900  uint8_t pattern_template_index,
5901  const struct rte_flow_action actions[],
5902  uint8_t actions_template_index,
5903  void *user_data,
5904  struct rte_flow_error *error);
5905 
5938 __rte_experimental
5939 struct rte_flow *
5940 rte_flow_async_create_by_index(uint16_t port_id,
5941  uint32_t queue_id,
5942  const struct rte_flow_op_attr *op_attr,
5943  struct rte_flow_template_table *template_table,
5944  uint32_t rule_index,
5945  const struct rte_flow_action actions[],
5946  uint8_t actions_template_index,
5947  void *user_data,
5948  struct rte_flow_error *error);
5949 
5979 __rte_experimental
5980 int
5981 rte_flow_async_destroy(uint16_t port_id,
5982  uint32_t queue_id,
5983  const struct rte_flow_op_attr *op_attr,
5984  struct rte_flow *flow,
5985  void *user_data,
5986  struct rte_flow_error *error);
5987 
6016 __rte_experimental
6017 int
6018 rte_flow_async_actions_update(uint16_t port_id,
6019  uint32_t queue_id,
6020  const struct rte_flow_op_attr *op_attr,
6021  struct rte_flow *flow,
6022  const struct rte_flow_action actions[],
6023  uint8_t actions_template_index,
6024  void *user_data,
6025  struct rte_flow_error *error);
6026 
6047 __rte_experimental
6048 int
6049 rte_flow_push(uint16_t port_id,
6050  uint32_t queue_id,
6051  struct rte_flow_error *error);
6052 
6068 };
6069 
6076 __extension__
6081  enum rte_flow_op_status status;
6085  void *user_data;
6086 };
6087 
6113 __rte_experimental
6114 int
6115 rte_flow_pull(uint16_t port_id,
6116  uint32_t queue_id,
6117  struct rte_flow_op_result res[],
6118  uint16_t n_res,
6119  struct rte_flow_error *error);
6120 
6147 __rte_experimental
6148 struct rte_flow_action_handle *
6149 rte_flow_async_action_handle_create(uint16_t port_id,
6150  uint32_t queue_id,
6151  const struct rte_flow_op_attr *op_attr,
6152  const struct rte_flow_indir_action_conf *indir_action_conf,
6153  const struct rte_flow_action *action,
6154  void *user_data,
6155  struct rte_flow_error *error);
6156 
6182 __rte_experimental
6183 int
6184 rte_flow_async_action_handle_destroy(uint16_t port_id,
6185  uint32_t queue_id,
6186  const struct rte_flow_op_attr *op_attr,
6187  struct rte_flow_action_handle *action_handle,
6188  void *user_data,
6189  struct rte_flow_error *error);
6190 
6221 __rte_experimental
6222 int
6223 rte_flow_async_action_handle_update(uint16_t port_id,
6224  uint32_t queue_id,
6225  const struct rte_flow_op_attr *op_attr,
6226  struct rte_flow_action_handle *action_handle,
6227  const void *update,
6228  void *user_data,
6229  struct rte_flow_error *error);
6230 
6265 __rte_experimental
6266 int
6267 rte_flow_async_action_handle_query(uint16_t port_id,
6268  uint32_t queue_id,
6269  const struct rte_flow_op_attr *op_attr,
6270  const struct rte_flow_action_handle *action_handle,
6271  void *data,
6272  void *user_data,
6273  struct rte_flow_error *error);
6274 
6287 };
6288 
6322 __rte_experimental
6323 int
6324 rte_flow_action_handle_query_update(uint16_t port_id,
6325  struct rte_flow_action_handle *handle,
6326  const void *update, void *query,
6327  enum rte_flow_query_update_mode mode,
6328  struct rte_flow_error *error);
6329 
6365 __rte_experimental
6366 int
6367 rte_flow_async_action_handle_query_update(uint16_t port_id, uint32_t queue_id,
6368  const struct rte_flow_op_attr *attr,
6369  struct rte_flow_action_handle *handle,
6370  const void *update, void *query,
6371  enum rte_flow_query_update_mode mode,
6372  void *user_data,
6373  struct rte_flow_error *error);
6374 
6375 struct rte_flow_action_list_handle;
6376 
6387  struct rte_flow_action_list_handle *handle;
6396  const void **conf;
6397 };
6398 
6426 __rte_experimental
6427 struct rte_flow_action_list_handle *
6428 rte_flow_action_list_handle_create(uint16_t port_id,
6429  const
6430  struct rte_flow_indir_action_conf *conf,
6431  const struct rte_flow_action *actions,
6432  struct rte_flow_error *error);
6433 
6468 __rte_experimental
6469 struct rte_flow_action_list_handle *
6470 rte_flow_async_action_list_handle_create(uint16_t port_id, uint32_t queue_id,
6471  const struct rte_flow_op_attr *attr,
6472  const struct rte_flow_indir_action_conf *conf,
6473  const struct rte_flow_action *actions,
6474  void *user_data,
6475  struct rte_flow_error *error);
6476 
6498 __rte_experimental
6499 int
6500 rte_flow_action_list_handle_destroy(uint16_t port_id,
6501  struct rte_flow_action_list_handle *handle,
6502  struct rte_flow_error *error);
6503 
6534 __rte_experimental
6535 int
6537  (uint16_t port_id, uint32_t queue_id,
6538  const struct rte_flow_op_attr *op_attr,
6539  struct rte_flow_action_list_handle *handle,
6540  void *user_data, struct rte_flow_error *error);
6541 
6578 __rte_experimental
6579 int
6581  const struct rte_flow_action_list_handle *handle,
6582  const void **update, void **query,
6583  enum rte_flow_query_update_mode mode,
6584  struct rte_flow_error *error);
6585 
6629 __rte_experimental
6630 int
6631 rte_flow_async_action_list_handle_query_update(uint16_t port_id, uint32_t queue_id,
6632  const struct rte_flow_op_attr *attr,
6633  const struct rte_flow_action_list_handle *handle,
6634  const void **update, void **query,
6635  enum rte_flow_query_update_mode mode,
6636  void *user_data,
6637  struct rte_flow_error *error);
6638 
6639 #ifdef __cplusplus
6640 }
6641 #endif
6642 
6643 #endif /* RTE_FLOW_H_ */
uint32_t reserved
Definition: rte_flow.h:129
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
Definition: rte_flow.h:1547
rte_be32_t u32
Definition: rte_ecpri.h:72
uint32_t nb_quotas
Definition: rte_flow.h:5419
uint8_t addr
Definition: rte_ppp.h:25
rte_flow_field_id
Definition: rte_flow.h:3845
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:1185
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1307
__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:968
static const struct rte_flow_item_quota rte_flow_item_quota_mask
Definition: rte_flow.h:719
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:5312
struct rte_ether_addr src_addr
Definition: rte_ether.h:269
struct rte_flow_action * actions
Definition: rte_flow.h:4215
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1496
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:973
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:1115
__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)
struct rte_flow_action_list_handle * handle
Definition: rte_flow.h:6387
rte_be16_t protocol
Definition: rte_flow.h:1308
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
Definition: rte_flow.h:1815
__rte_experimental struct rte_flow_action_list_handle * rte_flow_async_action_list_handle_create(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *attr, const struct rte_flow_indir_action_conf *conf, const struct rte_flow_action *actions, void *user_data, struct rte_flow_error *error)
uint32_t has_auth_ext
Definition: rte_flow.h:956
uint32_t nb_counters
Definition: rte_flow.h:5395
struct rte_ib_bth hdr
Definition: rte_flow.h:2029
struct rte_ether_addr arp_sha
Definition: rte_arp.h:25
uint32_t num
Definition: rte_flow.h:758
__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:4207
uint32_t has_mobil_ext
Definition: rte_flow.h:962
uint32_t sec_since_last_hit
Definition: rte_flow.h:3129
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_update_quota_op
Definition: rte_flow.h:3041
__rte_experimental int rte_flow_async_action_list_handle_destroy(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_action_list_handle *handle, void *user_data, struct rte_flow_error *error)
rte_flow_item_flex_tunnel_mode
Definition: rte_flow.h:2139
uint32_t original
Definition: rte_flow.h:3278
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:2240
uint32_t group
Definition: rte_flow.h:101
__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:5400
struct rte_flow_item * definition
Definition: rte_flow.h:3427
uint32_t nb_meters
Definition: rte_flow.h:5405
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:1191
struct rte_flow_meter_profile * profile
Definition: rte_flow.h:4023
rte_be16_t msg_len
Definition: rte_flow.h:1265
__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:1274
uint32_t postpone
Definition: rte_flow.h:5854
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:1008
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:1315
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:4206
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:1065
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:763
__rte_experimental int rte_flow_action_handle_query_update(uint16_t port_id, struct rte_flow_action_handle *handle, const void *update, void *query, enum rte_flow_query_update_mode mode, struct rte_flow_error *error)
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1594
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1290
rte_flow_conntrack_state
Definition: rte_flow.h:3675
__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:1003
__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:1263
struct rte_ether_addr tla
Definition: rte_flow.h:1566
rte_flow_item_flex_field_mode
Definition: rte_flow.h:2106
rte_be16_t protocol
Definition: rte_flow.h:1143
uint32_t reserved
Definition: rte_flow.h:814
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:2264
static const struct rte_flow_item_conntrack rte_flow_item_conntrack_mask
Definition: rte_flow.h:1951
static const struct rte_flow_item_geneve_opt rte_flow_item_geneve_opt_mask
Definition: rte_flow.h:1859
static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask
Definition: rte_flow.h:1437
rte_be16_t src_port
Definition: rte_sctp.h:29
struct rte_flow_action * actions
Definition: rte_flow.h:4680
uint32_t nb_conn_tracks
Definition: rte_flow.h:5410
uint32_t max_nb_conn_tracks
Definition: rte_flow.h:5322
enum rte_color color
Definition: rte_flow.h:2259
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:927
rte_be32_t teid
Definition: rte_gtp.h:54
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1717
uint32_t reserved
Definition: rte_flow.h:3125
struct rte_flow_item_flex_field * sample_data
Definition: rte_flow.h:2230
rte_be32_t src_addr
Definition: rte_ip.h:63
static const struct rte_flow_item_ib_bth rte_flow_item_ib_bth_mask
Definition: rte_flow.h:2034
static const struct rte_flow_item_icmp6_nd_opt rte_flow_item_icmp6_nd_opt_mask
Definition: rte_flow.h:1522
struct rte_gtp_hdr hdr
Definition: rte_flow.h:1268
__rte_experimental int rte_flow_actions_update(uint16_t port_id, struct rte_flow *flow, const struct rte_flow_action actions[], struct rte_flow_error *error)
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:1097
#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:788
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:736
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:1150
uint64_t rte_be64_t
uint8_t vni[3]
Definition: rte_vxlan.h:43
const void * mask
Definition: rte_flow.h:2079
struct rte_flow_item * pattern
Definition: rte_flow.h:4211
static const struct rte_flow_item_aggr_affinity rte_flow_item_aggr_affinity_mask
Definition: rte_flow.h:2290
__rte_experimental struct rte_flow * rte_flow_async_create_by_index(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_template_table *template_table, uint32_t rule_index, const struct rte_flow_action actions[], uint8_t actions_template_index, void *user_data, struct rte_flow_error *error)
rte_be16_t type
Definition: rte_flow.h:861
const void * cause
Definition: rte_flow.h:4191
__rte_experimental int rte_flow_async_action_handle_query_update(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *attr, struct rte_flow_action_handle *handle, const void *update, void *query, enum rte_flow_query_update_mode mode, void *user_data, struct rte_flow_error *error)
__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:1986
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:1027
__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:1285
rte_flow_error_type
Definition: rte_flow.h:4157
uint32_t has_esp_ext
Definition: rte_flow.h:958
rte_flow_conv_op
Definition: rte_flow.h:4224
rte_be16_t src_port
Definition: rte_udp.h:29
__rte_experimental uint64_t rte_flow_restore_info_dynflag(void)
uint32_t has_shim6_ext
Definition: rte_flow.h:966
__rte_experimental int rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow, FILE *file, struct rte_flow_error *error)
uint32_t max_nb_quotas
Definition: rte_flow.h:5327
uint32_t has_route_ext
Definition: rte_flow.h:952
__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:818
uint32_t search
Definition: rte_flow.h:813
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:1117
rte_flow_quota_state
Definition: rte_flow.h:701
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:823
uint16_t limit
Definition: rte_flow.h:816
rte_flow_conntrack_tcp_last_index
Definition: rte_flow.h:3693
__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:1605
uint32_t max_nb_queues
Definition: rte_flow.h:5302
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:1170
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1469
__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:4104
const char * message
Definition: rte_flow.h:4192
rte_eth_hash_function
Definition: rte_flow.h:3197
uint8_t opcode
Definition: rte_ib.h:30
uint32_t close_initiated
Definition: rte_flow.h:3715
__rte_experimental struct rte_flow_action_list_handle * rte_flow_action_list_handle_create(uint16_t port_id, const struct rte_flow_indir_action_conf *conf, const struct rte_flow_action *actions, struct rte_flow_error *error)
uint16_t length
Definition: rte_flow.h:817
const void * last
Definition: rte_flow.h:2078
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1572
rte_be32_t teid
Definition: rte_flow.h:1266
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
uint32_t ingress
Definition: rte_flow.h:106
rte_be16_t tci
Definition: rte_flow.h:901
struct rte_arp_hdr hdr
Definition: rte_flow.h:1373
uint32_t max_nb_meters
Definition: rte_flow.h:5317
__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:932
size_t size
Definition: rte_flow.h:4677
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:1142
static const struct rte_flow_item_ppp rte_flow_item_ppp_mask
Definition: rte_flow.h:2014
const uint8_t * pattern
Definition: rte_flow.h:2101
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1611
uint32_t supported_flags
Definition: rte_flow.h:5331
rte_flow_table_hash_func
Definition: rte_flow.h:5721
rte_be16_t length
Definition: rte_flow.h:1628
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:4214
uint32_t has_vlan
Definition: rte_flow.h:865
uint32_t has_more_vlan
Definition: rte_flow.h:907
struct rte_flow_item * items
Definition: rte_flow.h:4679
__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:3153
rte_flow_action_type
Definition: rte_flow.h:2340
struct rte_ether_addr sla
Definition: rte_flow.h:1541
rte_flow_query_update_mode
Definition: rte_flow.h:6284
rte_flow_quota_mode
Definition: rte_flow.h:3002
struct rte_flow_item_flex_link * output_link
Definition: rte_flow.h:2248
__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:3986
uint32_t has_hop_ext
Definition: rte_flow.h:950
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_flow_table_insertion_type
Definition: rte_flow.h:5704
__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:1687
rte_color
Definition: rte_meter.h:32
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1770
const void * spec
Definition: rte_flow.h:2077
uint8_t label_tc_s[3]
Definition: rte_flow.h:1164
static const struct rte_flow_item_tx_queue rte_flow_item_tx_queue_mask
Definition: rte_flow.h:2309
__rte_experimental int rte_flow_action_list_handle_query_update(uint16_t port_id, const struct rte_flow_action_list_handle *handle, const void **update, void **query, enum rte_flow_query_update_mode mode, struct rte_flow_error *error)
uint8_t version_type
Definition: rte_flow.h:1625
#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:3257
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1380
uint32_t has_hip_ext
Definition: rte_flow.h:964
const struct rte_flow_action * actions
Definition: rte_flow.h:4148
__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:3128
rte_be16_t vlan_tci
Definition: rte_ether.h:285
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:871
rte_flow_op_status
Definition: rte_flow.h:6059
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:1967
__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:954
uint32_t reserved
Definition: rte_flow.h:3279
__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:1793
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1670
uint32_t priority
Definition: rte_flow.h:102
uint32_t has_dest_ext
Definition: rte_flow.h:960
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1405
uint32_t max_nb_counters
Definition: rte_flow.h:5307
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:948
static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask
Definition: rte_flow.h:1835
__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:1186
uint32_t queue_num
Definition: rte_flow.h:3256
uint8_t tni[3]
Definition: rte_flow.h:1144
struct rte_tcp_hdr hdr
Definition: rte_flow.h:1041
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1650
uint32_t transfer
Definition: rte_flow.h:128
struct rte_flow_item * definition
Definition: rte_flow.h:3460
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:913
uint8_t msg_type
Definition: rte_flow.h:1264
uint32_t reserved
Definition: rte_flow.h:908
uint32_t egress
Definition: rte_flow.h:110
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
Definition: rte_flow.h:1125
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:4396
__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)
uint16_t host_port_id
Definition: rte_flow.h:5414
__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:1046
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1239
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:61
rte_be16_t inner_type
Definition: rte_flow.h:902
uint8_t vni[3]
Definition: rte_vxlan.h:72
__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)
__rte_experimental int rte_flow_action_list_handle_destroy(uint16_t port_id, struct rte_flow_action_list_handle *handle, struct rte_flow_error *error)
struct rte_udp_hdr hdr
Definition: rte_flow.h:1022
__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:3258
rte_flow_item_type
Definition: rte_flow.h:148
__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:812
int32_t offset
Definition: rte_flow.h:815
__rte_experimental int rte_flow_async_action_list_handle_query_update(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *attr, const struct rte_flow_action_list_handle *handle, const void **update, void **query, enum rte_flow_query_update_mode mode, void *user_data, struct rte_flow_error *error)
rte_be16_t inner_type
Definition: rte_flow.h:1120
__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:2099
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:4210
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1345
rte_be16_t session_id
Definition: rte_flow.h:1627
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1745
__rte_experimental int rte_flow_async_actions_update(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow *flow, const struct rte_flow_action actions[], uint8_t actions_template_index, void *user_data, struct rte_flow_error *error)
__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:1060
uint32_t reserved
Definition: rte_flow.h:866