DPDK  22.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_common.h>
21 #include <rte_ether.h>
22 #include <rte_icmp.h>
23 #include <rte_ip.h>
24 #include <rte_sctp.h>
25 #include <rte_tcp.h>
26 #include <rte_udp.h>
27 #include <rte_vxlan.h>
28 #include <rte_esp.h>
29 #include <rte_higig.h>
30 #include <rte_ecpri.h>
31 #include <rte_bitops.h>
32 #include <rte_mbuf_dyn.h>
33 #include <rte_meter.h>
34 #include <rte_gtp.h>
35 #include <rte_l2tpv2.h>
36 #include <rte_ppp.h>
37 #include <rte_gre.h>
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 #define RTE_FLOW_LOG(level, ...) \
44  rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, "" __VA_ARGS__)
45 
86 struct rte_flow_attr {
87  uint32_t group;
88  uint32_t priority;
101  uint32_t ingress:1;
114  uint32_t egress:1;
132  uint32_t transfer:1;
133  uint32_t reserved:29;
134 };
135 
162 
172 
182 
190 
204 
218 
232 
246 
253 
260 
267 
274 
281 
288 
295 
302 
309 
316 
323 
330 
337 
344 
356 
365 
374 
383 
390 
397 
404 
411 
418 
425 
432 
439 
446 
454 
462 
469 
478 
491 
500 
509 
518 
527 
534 
541 
548 
554 
563 
572 
579 
588 
595 
602 
613 
622 
631 
641 
650 
657 
664 
671 };
672 
680  struct rte_higig2_hdr hdr;
681 };
682 
684 #ifndef __cplusplus
686  .hdr = {
687  .ppt1 = {
688  .classification = 0xffff,
689  .vid = 0xfff,
690  },
691  },
692 };
693 #endif
694 
707  uint32_t num;
708 };
709 
711 #ifndef __cplusplus
713  .num = 0x00000000,
714 };
715 #endif
716 
740  uint32_t id;
741 };
742 
744 #ifndef __cplusplus
746  .id = 0x00000000,
747 };
748 #endif
749 
775  uint32_t index;
776 };
777 
779 #ifndef __cplusplus
781  .index = 0x00000000,
782 };
783 #endif
784 
805  uint32_t id;
806 };
807 
809 #ifndef __cplusplus
811  .id = 0xffffffff,
812 };
813 #endif
814 
834  uint32_t relative:1;
835  uint32_t search:1;
836  uint32_t reserved:30;
837  int32_t offset;
838  uint16_t limit;
839  uint16_t length;
840  const uint8_t *pattern;
841 };
842 
844 #ifndef __cplusplus
846  .relative = 1,
847  .search = 1,
848  .reserved = 0x3fffffff,
849  .offset = 0xffffffff,
850  .limit = 0xffff,
851  .length = 0xffff,
852  .pattern = NULL,
853 };
854 #endif
855 
875  union {
876  struct {
877  /*
878  * These fields are retained for compatibility.
879  * Please switch to the new header field below.
880  */
881  struct rte_ether_addr dst;
882  struct rte_ether_addr src;
884  };
885  struct rte_ether_hdr hdr;
886  };
887  uint32_t has_vlan:1;
888  uint32_t reserved:31;
889 };
890 
892 #ifndef __cplusplus
894  .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
895  .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
896  .hdr.ether_type = RTE_BE16(0x0000),
897 };
898 #endif
899 
917  union {
918  struct {
919  /*
920  * These fields are retained for compatibility.
921  * Please switch to the new header field below.
922  */
925  };
926  struct rte_vlan_hdr hdr;
927  };
929  uint32_t has_more_vlan:1;
930  uint32_t reserved:31;
931 };
932 
934 #ifndef __cplusplus
936  .hdr.vlan_tci = RTE_BE16(0x0fff),
937  .hdr.eth_proto = RTE_BE16(0x0000),
938 };
939 #endif
940 
949  struct rte_ipv4_hdr hdr;
950 };
951 
953 #ifndef __cplusplus
955  .hdr = {
956  .src_addr = RTE_BE32(0xffffffff),
957  .dst_addr = RTE_BE32(0xffffffff),
958  },
959 };
960 #endif
961 
970  struct rte_ipv6_hdr hdr;
972  uint32_t has_hop_ext:1;
974  uint32_t has_route_ext:1;
976  uint32_t has_frag_ext:1;
978  uint32_t has_auth_ext:1;
980  uint32_t has_esp_ext:1;
982  uint32_t has_dest_ext:1;
984  uint32_t has_mobil_ext:1;
986  uint32_t has_hip_ext:1;
988  uint32_t has_shim6_ext:1;
990  uint32_t reserved:23;
991 };
992 
994 #ifndef __cplusplus
996  .hdr = {
997  .src_addr =
998  "\xff\xff\xff\xff\xff\xff\xff\xff"
999  "\xff\xff\xff\xff\xff\xff\xff\xff",
1000  .dst_addr =
1001  "\xff\xff\xff\xff\xff\xff\xff\xff"
1002  "\xff\xff\xff\xff\xff\xff\xff\xff",
1003  },
1004 };
1005 #endif
1006 
1013  struct rte_icmp_hdr hdr;
1014 };
1015 
1017 #ifndef __cplusplus
1019  .hdr = {
1020  .icmp_type = 0xff,
1021  .icmp_code = 0xff,
1022  },
1023 };
1024 #endif
1025 
1032  struct rte_udp_hdr hdr;
1033 };
1034 
1036 #ifndef __cplusplus
1038  .hdr = {
1039  .src_port = RTE_BE16(0xffff),
1040  .dst_port = RTE_BE16(0xffff),
1041  },
1042 };
1043 #endif
1044 
1051  struct rte_tcp_hdr hdr;
1052 };
1053 
1055 #ifndef __cplusplus
1057  .hdr = {
1058  .src_port = RTE_BE16(0xffff),
1059  .dst_port = RTE_BE16(0xffff),
1060  },
1061 };
1062 #endif
1063 
1070  struct rte_sctp_hdr hdr;
1071 };
1072 
1074 #ifndef __cplusplus
1076  .hdr = {
1077  .src_port = RTE_BE16(0xffff),
1078  .dst_port = RTE_BE16(0xffff),
1079  },
1080 };
1081 #endif
1082 
1090  union {
1091  struct {
1092  /*
1093  * These fields are retained for compatibility.
1094  * Please switch to the new header field below.
1095  */
1096  uint8_t flags;
1097  uint8_t rsvd0[3];
1098  uint8_t vni[3];
1099  uint8_t rsvd1;
1100  };
1101  struct rte_vxlan_hdr hdr;
1102  };
1103 };
1104 
1106 #ifndef __cplusplus
1108  .hdr.vx_vni = RTE_BE32(0xffffff00), /* (0xffffff << 8) */
1109 };
1110 #endif
1111 
1128  uint8_t in_ecid_e;
1129  uint8_t ecid_e;
1131 };
1132 
1134 #ifndef __cplusplus
1136  .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
1137 };
1138 #endif
1139 
1154  uint8_t tni[3];
1155  uint8_t flow_id;
1156 };
1157 
1159 #ifndef __cplusplus
1161  .tni = "\xff\xff\xff",
1162 };
1163 #endif
1164 
1174  uint8_t label_tc_s[3];
1175  uint8_t ttl;
1176 };
1177 
1179 #ifndef __cplusplus
1181  .label_tc_s = "\xff\xff\xf0",
1182 };
1183 #endif
1184 
1197 };
1198 
1200 #ifndef __cplusplus
1202  .protocol = RTE_BE16(0xffff),
1203 };
1204 #endif
1205 
1212  struct rte_gre_hdr_opt_checksum_rsvd checksum_rsvd;
1213  struct rte_gre_hdr_opt_key key;
1214  struct rte_gre_hdr_opt_sequence sequence;
1215 };
1216 
1235  uint32_t thresh;
1236 };
1237 
1239 #ifndef __cplusplus
1241  .thresh = 0xffffffff,
1242 };
1243 #endif
1244 
1258  uint8_t msg_type;
1261 };
1262 
1264 #ifndef __cplusplus
1266  .teid = RTE_BE32(0xffffffff),
1267 };
1268 #endif
1269 
1276  struct rte_esp_hdr hdr;
1277 };
1278 
1280 #ifndef __cplusplus
1282  .hdr = {
1283  .spi = RTE_BE32(0xffffffff),
1284  },
1285 };
1286 #endif
1287 
1300  uint8_t vni[3];
1301  uint8_t rsvd1;
1302 };
1303 
1305 #ifndef __cplusplus
1307  .vni = "\xff\xff\xff",
1308 };
1309 #endif
1310 
1317  uint8_t flags;
1318  uint8_t rsvd0[2];
1319  uint8_t protocol;
1320  uint8_t vni[3];
1321  uint8_t rsvd1;
1322 };
1323 
1325 #ifndef __cplusplus
1327  .vni = "\xff\xff\xff",
1328 };
1329 #endif
1330 
1339  uint8_t hln;
1340  uint8_t pln;
1342  struct rte_ether_addr sha;
1344  struct rte_ether_addr tha;
1346 };
1347 
1349 #ifndef __cplusplus
1350 static const struct rte_flow_item_arp_eth_ipv4
1352  .sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1353  .spa = RTE_BE32(0xffffffff),
1354  .tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1355  .tpa = RTE_BE32(0xffffffff),
1356 };
1357 #endif
1358 
1370  uint8_t next_hdr;
1371 };
1372 
1374 #ifndef __cplusplus
1375 static const
1377  .next_hdr = 0xff,
1378 };
1379 #endif
1380 
1392  struct rte_ipv6_fragment_ext hdr;
1393 };
1394 
1401  uint8_t type;
1402  uint8_t code;
1403  uint16_t checksum;
1404 };
1405 
1407 #ifndef __cplusplus
1409  .type = 0xff,
1410  .code = 0xff,
1411 };
1412 #endif
1413 
1420  uint8_t type;
1421  uint8_t code;
1424  uint8_t target_addr[16];
1425 };
1426 
1428 #ifndef __cplusplus
1429 static const
1431  .target_addr =
1432  "\xff\xff\xff\xff\xff\xff\xff\xff"
1433  "\xff\xff\xff\xff\xff\xff\xff\xff",
1434 };
1435 #endif
1436 
1443  uint8_t type;
1444  uint8_t code;
1451  uint8_t target_addr[16];
1452 };
1453 
1455 #ifndef __cplusplus
1456 static const
1458  .target_addr =
1459  "\xff\xff\xff\xff\xff\xff\xff\xff"
1460  "\xff\xff\xff\xff\xff\xff\xff\xff",
1461 };
1462 #endif
1463 
1476  uint8_t type;
1477  uint8_t length;
1478 };
1479 
1481 #ifndef __cplusplus
1482 static const struct rte_flow_item_icmp6_nd_opt
1484  .type = 0xff,
1485 };
1486 #endif
1487 
1500  uint8_t type;
1501  uint8_t length;
1502  struct rte_ether_addr sla;
1503 };
1504 
1506 #ifndef __cplusplus
1507 static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1509  .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1510 };
1511 #endif
1512 
1525  uint8_t type;
1526  uint8_t length;
1527  struct rte_ether_addr tla;
1528 };
1529 
1531 #ifndef __cplusplus
1532 static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1534  .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1535 };
1536 #endif
1537 
1550  uint32_t data;
1551 };
1552 
1554 #ifndef __cplusplus
1556  .data = UINT32_MAX,
1557 };
1558 #endif
1559 
1567 };
1568 
1570 #ifndef __cplusplus
1571 static const struct rte_flow_item_gtp_psc
1573  .hdr.qfi = 0x3f,
1574 };
1575 #endif
1576 
1586  uint8_t version_type;
1587  uint8_t code;
1590 };
1591 
1606 };
1607 
1609 #ifndef __cplusplus
1610 static const struct rte_flow_item_pppoe_proto_id
1612  .proto_id = RTE_BE16(0xffff),
1613 };
1614 #endif
1615 
1625  uint32_t data;
1626  uint8_t index;
1627 };
1628 
1630 #ifndef __cplusplus
1632  .data = 0xffffffff,
1633  .index = 0xff,
1634 };
1635 #endif
1636 
1644 };
1645 
1647 #ifndef __cplusplus
1649  .session_id = RTE_BE32(UINT32_MAX),
1650 };
1651 #endif
1652 
1653 
1673  uint32_t id;
1674 };
1675 
1677 #ifndef __cplusplus
1679  .id = 0xffffffff,
1680 };
1681 #endif
1682 
1693  uint32_t version:2;
1694  uint32_t oam_pkt:1;
1695  uint32_t reserved:1;
1696  uint32_t ttl:6;
1697  uint32_t length:6;
1698  uint32_t reserved1:4;
1699  uint32_t mdtype:4;
1700  uint32_t next_proto:8;
1701  uint32_t spi:24;
1702  uint32_t sindex:8;
1703 };
1704 
1706 #ifndef __cplusplus
1708  .mdtype = 0xf,
1709  .next_proto = 0xff,
1710  .spi = 0xffffff,
1711  .sindex = 0xff,
1712 };
1713 #endif
1714 
1725  uint32_t type:8;
1726  uint32_t max_resp_time:8;
1727  uint32_t checksum:16;
1728  uint32_t group_addr;
1729 };
1730 
1732 #ifndef __cplusplus
1734  .group_addr = 0xffffffff,
1735 };
1736 #endif
1737 
1748  uint32_t next_hdr:8;
1749  uint32_t payload_len:8;
1750  uint32_t reserved:16;
1751  uint32_t spi;
1752  uint32_t seq_num;
1753 };
1754 
1756 #ifndef __cplusplus
1758  .spi = 0xffffffff,
1759 };
1760 #endif
1761 
1771  uint8_t s_field;
1772  uint8_t msg_type;
1773  rte_be16_t msg_len;
1774  rte_be64_t seid;
1775 };
1776 
1778 #ifndef __cplusplus
1780  .s_field = 0x01,
1781  .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1782 };
1783 #endif
1784 
1794  struct rte_ecpri_combined_msg_hdr hdr;
1795 };
1796 
1798 #ifndef __cplusplus
1800  .hdr = {
1801  .common = {
1802  .u32 = 0x0,
1803  },
1804  },
1805 };
1806 #endif
1807 
1814  rte_be16_t option_class;
1815  uint8_t option_type;
1816  uint8_t option_len;
1817  uint32_t *data;
1818 };
1819 
1821 #ifndef __cplusplus
1822 static const struct rte_flow_item_geneve_opt
1824  .option_type = 0xff,
1825 };
1826 #endif
1827 
1840  uint32_t level;
1841  RTE_STD_C11
1842  union {
1843  __extension__
1844  struct {
1846  uint64_t packet_ok:1;
1848  uint64_t l2_ok:1;
1850  uint64_t l3_ok:1;
1852  uint64_t l4_ok:1;
1854  uint64_t l2_crc_ok:1;
1856  uint64_t ipv4_csum_ok:1;
1858  uint64_t l4_csum_ok:1;
1860  uint64_t l3_len_ok:1;
1861  uint64_t reserved:56;
1862  };
1863  uint64_t value;
1864  };
1865 };
1866 
1867 #ifndef __cplusplus
1868 static const struct rte_flow_item_integrity
1869 rte_flow_item_integrity_mask = {
1870  .level = 0,
1871  .value = 0,
1872 };
1873 #endif
1874 
1878 #define RTE_FLOW_CONNTRACK_PKT_STATE_VALID RTE_BIT32(0)
1879 
1882 #define RTE_FLOW_CONNTRACK_PKT_STATE_CHANGED RTE_BIT32(1)
1883 
1887 #define RTE_FLOW_CONNTRACK_PKT_STATE_INVALID RTE_BIT32(2)
1888 
1892 #define RTE_FLOW_CONNTRACK_PKT_STATE_DISABLED RTE_BIT32(3)
1893 
1897 #define RTE_FLOW_CONNTRACK_PKT_STATE_BAD RTE_BIT32(4)
1898 
1910  uint32_t flags;
1911 };
1912 
1914 #ifndef __cplusplus
1916  .flags = 0xffffffff,
1917 };
1918 #endif
1919 
1929  uint16_t port_id;
1930 };
1931 
1933 #ifndef __cplusplus
1935  .port_id = 0xffff,
1936 };
1937 #endif
1938 
1948  struct rte_l2tpv2_combined_msg_hdr hdr;
1949 };
1950 
1952 #ifndef __cplusplus
1954  /*
1955  * flags and version bit mask
1956  * 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
1957  * T L x x S x O P x x x x V V V V
1958  */
1959  .hdr = {
1960  .common = {
1961  .flags_version = RTE_BE16(0xcb0f),
1962  },
1963  },
1964 };
1965 #endif
1966 
1976  struct rte_ppp_hdr hdr;
1977 };
1978 
1980 #ifndef __cplusplus
1982  .hdr = {
1983  .addr = 0xff,
1984  .ctrl = 0xff,
1985  .proto_id = RTE_BE16(0xffff),
1986  }
1987 };
1988 #endif
1989 
2025  const void *spec;
2026  const void *last;
2027  const void *mask;
2028 };
2029 
2047  struct rte_flow_item_flex_handle *handle;
2048  uint32_t length;
2049  const uint8_t *pattern;
2050 };
2082 };
2083 
2113 };
2114 
2120 __extension__
2124  uint32_t field_size;
2125  int32_t field_base;
2126  uint32_t offset_base;
2127  uint32_t offset_mask;
2128  int32_t offset_shift;
2129  uint32_t field_id:16;
2130  uint32_t reserved:16;
2131 };
2132 
2143  struct rte_flow_item item;
2148  uint32_t next;
2149 };
2150 
2167  struct rte_flow_item_flex_field next_header;
2172  struct rte_flow_item_flex_field next_protocol;
2180  uint32_t nb_samples;
2190  uint32_t nb_inputs;
2198  uint32_t nb_outputs;
2199 };
2200 
2235 
2243 
2251 
2260 
2272 
2284 
2291 
2300 
2311 
2320 
2332 
2344 
2356 
2367 
2375 
2383 
2394 
2405 
2416 
2427 
2439 
2451 
2459 
2467 
2475 
2483 
2491 
2499 
2507 
2516 
2524 
2533 
2540 
2547 
2560 
2573 
2586 
2599 
2613 
2627 
2638 
2648 
2658 
2671 
2684 
2701 
2718 
2735 
2752 
2765 
2775 
2788 
2801 
2812 
2820 
2831 
2842 
2850 
2859 
2867 
2874 
2882 };
2883 
2895  uint32_t id;
2896 };
2897 
2911  uint32_t group;
2912 };
2913 
2920  uint16_t index;
2921 };
2922 
2937  uint32_t timeout:24;
2938  uint32_t reserved:8;
2940  void *context;
2941 };
2942 
2950  uint32_t reserved:6;
2951  uint32_t aged:1;
2954  uint32_t sec_since_last_hit:24;
2955 };
2956 
2975  uint32_t id;
2976 };
2977 
2984  uint32_t reset:1;
2985  uint32_t hits_set:1;
2986  uint32_t bytes_set:1;
2987  uint32_t reserved:29;
2988  uint64_t hits;
2989  uint64_t bytes;
2990 };
2991 
2996  RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
3005  RTE_ETH_HASH_FUNCTION_MAX,
3006 };
3007 
3051  uint32_t level;
3052  uint64_t types;
3053  uint32_t key_len;
3054  uint32_t queue_num;
3055  const uint8_t *key;
3056  const uint16_t *queue;
3057 };
3058 
3076  uint32_t original:1;
3077  uint32_t reserved:31;
3078  uint32_t id;
3079 };
3080 
3094  uint32_t original:1;
3095  uint32_t reserved:31;
3096  uint32_t index;
3097 };
3098 
3111  uint32_t original:1;
3112  uint32_t reserved:31;
3113  uint32_t id;
3114 };
3115 
3125  uint32_t mtr_id;
3126 };
3127 
3160 };
3161 
3172  uint8_t mpls_ttl;
3173 };
3174 
3185  uint8_t nw_ttl;
3186 };
3187 
3196 };
3197 
3206 };
3207 
3215  uint8_t vlan_pcp;
3216 };
3217 
3226 };
3227 
3236 };
3237 
3271 };
3272 
3305 };
3306 
3327  uint8_t *data;
3328  uint8_t *preserve;
3329  size_t size;
3330 };
3331 
3348  uint8_t *data;
3349  size_t size;
3350 };
3351 
3364  rte_be32_t ipv4_addr;
3365 };
3366 
3379  uint8_t ipv6_addr[16];
3380 };
3381 
3394  rte_be16_t port;
3395 };
3396 
3403  uint8_t ttl_value;
3404 };
3405 
3412  uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
3413 };
3414 
3425  uint32_t data;
3426  uint32_t mask;
3427  uint8_t index;
3428 };
3429 
3450  uint32_t data;
3451  uint32_t mask;
3452 };
3453 
3462  uint8_t dscp;
3463 };
3464 
3482 struct rte_flow_action_handle;
3483 
3500 };
3501 
3512 };
3513 
3525  uint32_t scale:4;
3527  uint32_t close_initiated:1;
3529  uint32_t last_ack_seen:1;
3534  uint32_t data_unacked:1;
3539  uint32_t sent_end;
3544  uint32_t reply_end;
3546  uint32_t max_win;
3548  uint32_t max_ack;
3549 };
3550 
3563  uint16_t peer_port;
3568  uint32_t is_original_dir:1;
3576  uint32_t enable:1;
3578  uint32_t live_connection:1;
3580  uint32_t selective_ack:1;
3587  uint32_t last_direction:1;
3589  uint32_t liberal_mode:1;
3597  struct rte_flow_tcp_dir_param original_dir;
3599  struct rte_flow_tcp_dir_param reply_dir;
3601  uint16_t last_window;
3602  enum rte_flow_conntrack_tcp_last_index last_index;
3604  uint32_t last_seq;
3606  uint32_t last_ack;
3611  uint32_t last_end;
3612 };
3613 
3625  uint32_t direction:1;
3627  uint32_t state:1;
3629  uint32_t reserved:30;
3630 };
3631 
3642  enum rte_color color;
3643 };
3644 
3654  uint16_t port_id;
3655 };
3656 
3692 };
3693 
3701  enum rte_flow_field_id field;
3702  RTE_STD_C11
3703  union {
3704  struct {
3706  uint32_t level;
3708  uint32_t offset;
3709  };
3716  uint8_t value[16];
3722  void *pvalue;
3723  };
3724 };
3725 
3733 };
3734 
3746  enum rte_flow_modify_op operation;
3749  uint32_t width;
3750 };
3751 
3752 /* Mbuf dynamic field offset for metadata. */
3753 extern int32_t rte_flow_dynf_metadata_offs;
3754 
3755 /* Mbuf dynamic field flag mask for metadata. */
3756 extern uint64_t rte_flow_dynf_metadata_mask;
3757 
3758 /* Mbuf dynamic field pointer for metadata. */
3759 #define RTE_FLOW_DYNF_METADATA(m) \
3760  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
3761 
3762 /* Mbuf dynamic flags for metadata. */
3763 #define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask)
3764 #define PKT_RX_DYNF_METADATA RTE_DEPRECATED(PKT_RX_DYNF_METADATA) \
3765  RTE_MBUF_DYNFLAG_RX_METADATA
3766 #define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask)
3767 #define PKT_TX_DYNF_METADATA RTE_DEPRECATED(PKT_TX_DYNF_METADATA) \
3768  RTE_MBUF_DYNFLAG_TX_METADATA
3769 
3770 __rte_experimental
3771 static inline uint32_t
3772 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
3773 {
3774  return *RTE_FLOW_DYNF_METADATA(m);
3775 }
3776 
3777 __rte_experimental
3778 static inline void
3779 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
3780 {
3781  *RTE_FLOW_DYNF_METADATA(m) = v;
3782 }
3783 
3793  const void *conf;
3794 };
3795 
3802 struct rte_flow;
3803 
3821  uint32_t ratio;
3823  const struct rte_flow_action *actions;
3824 };
3825 
3851 };
3852 
3866  const void *cause;
3867  const char *message;
3868 };
3869 
3880  union {
3881  const struct rte_flow_attr *attr_ro;
3883  };
3884  union {
3885  const struct rte_flow_item *pattern_ro;
3887  };
3888  union {
3889  const struct rte_flow_action *actions_ro;
3891  };
3892 };
3893 
3906 
3918 
3930 
3942 
3955 
3968 
3981 
3995 
4009 
4023 
4037 };
4038 
4058 __rte_experimental
4059 int
4060 rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow,
4061  FILE *file, struct rte_flow_error *error);
4062 
4069 __rte_experimental
4070 static inline int
4072 {
4073  return !!rte_flow_dynf_metadata_mask;
4074 }
4075 
4086 __rte_experimental
4087 int
4089 
4142 int
4143 rte_flow_validate(uint16_t port_id,
4144  const struct rte_flow_attr *attr,
4145  const struct rte_flow_item pattern[],
4146  const struct rte_flow_action actions[],
4147  struct rte_flow_error *error);
4148 
4169 struct rte_flow *
4170 rte_flow_create(uint16_t port_id,
4171  const struct rte_flow_attr *attr,
4172  const struct rte_flow_item pattern[],
4173  const struct rte_flow_action actions[],
4174  struct rte_flow_error *error);
4175 
4196 int
4197 rte_flow_destroy(uint16_t port_id,
4198  struct rte_flow *flow,
4199  struct rte_flow_error *error);
4200 
4217 int
4218 rte_flow_flush(uint16_t port_id,
4219  struct rte_flow_error *error);
4220 
4245 int
4246 rte_flow_query(uint16_t port_id,
4247  struct rte_flow *flow,
4248  const struct rte_flow_action *action,
4249  void *data,
4250  struct rte_flow_error *error);
4251 
4293 int
4294 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
4295 
4313 int
4314 rte_flow_error_set(struct rte_flow_error *error,
4315  int code,
4316  enum rte_flow_error_type type,
4317  const void *cause,
4318  const char *message);
4319 
4325  size_t size;
4326  struct rte_flow_attr attr;
4329  uint8_t data[];
4330 };
4331 
4358 __rte_deprecated
4359 size_t
4360 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
4361  const struct rte_flow_attr *attr,
4362  const struct rte_flow_item *items,
4363  const struct rte_flow_action *actions);
4364 
4405 __rte_experimental
4406 int
4408  void *dst,
4409  size_t size,
4410  const void *src,
4411  struct rte_flow_error *error);
4412 
4441 __rte_experimental
4442 int
4443 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
4444  uint32_t nb_contexts, struct rte_flow_error *error);
4445 
4457  uint32_t ingress:1;
4459  uint32_t egress:1;
4464  uint32_t transfer:1;
4465 };
4466 
4494 __rte_experimental
4495 struct rte_flow_action_handle *
4496 rte_flow_action_handle_create(uint16_t port_id,
4497  const struct rte_flow_indir_action_conf *conf,
4498  const struct rte_flow_action *action,
4499  struct rte_flow_error *error);
4500 
4523 __rte_experimental
4524 int
4525 rte_flow_action_handle_destroy(uint16_t port_id,
4526  struct rte_flow_action_handle *handle,
4527  struct rte_flow_error *error);
4528 
4562 __rte_experimental
4563 int
4564 rte_flow_action_handle_update(uint16_t port_id,
4565  struct rte_flow_action_handle *handle,
4566  const void *update,
4567  struct rte_flow_error *error);
4568 
4594 __rte_experimental
4595 int
4596 rte_flow_action_handle_query(uint16_t port_id,
4597  const struct rte_flow_action_handle *handle,
4598  void *data, struct rte_flow_error *error);
4599 
4600 /* Tunnel has a type and the key information. */
4601 struct rte_flow_tunnel {
4606  enum rte_flow_item_type type;
4607  uint64_t tun_id;
4609  RTE_STD_C11
4610  union {
4611  struct {
4614  } ipv4;
4615  struct {
4616  uint8_t src_addr[16];
4617  uint8_t dst_addr[16];
4618  } ipv6;
4619  };
4620  rte_be16_t tp_src;
4621  rte_be16_t tp_dst;
4622  uint16_t tun_flags;
4624  bool is_ipv6;
4630  uint8_t tos;
4631  uint8_t ttl;
4632  uint32_t label;
4633 };
4634 
4638 #define RTE_FLOW_RESTORE_INFO_TUNNEL RTE_BIT64(0)
4639 
4643 #define RTE_FLOW_RESTORE_INFO_ENCAPSULATED RTE_BIT64(1)
4644 
4648 #define RTE_FLOW_RESTORE_INFO_GROUP_ID RTE_BIT64(2)
4649 
4660  uint64_t flags;
4661  uint32_t group_id;
4662  struct rte_flow_tunnel tunnel;
4663 };
4664 
4688 __rte_experimental
4689 int
4690 rte_flow_tunnel_decap_set(uint16_t port_id,
4691  struct rte_flow_tunnel *tunnel,
4692  struct rte_flow_action **actions,
4693  uint32_t *num_of_actions,
4694  struct rte_flow_error *error);
4695 
4719 __rte_experimental
4720 int
4721 rte_flow_tunnel_match(uint16_t port_id,
4722  struct rte_flow_tunnel *tunnel,
4723  struct rte_flow_item **items,
4724  uint32_t *num_of_items,
4725  struct rte_flow_error *error);
4726 
4747 __rte_experimental
4748 int
4749 rte_flow_get_restore_info(uint16_t port_id,
4750  struct rte_mbuf *m,
4751  struct rte_flow_restore_info *info,
4752  struct rte_flow_error *error);
4753 
4770 __rte_experimental
4771 int
4772 rte_flow_tunnel_action_decap_release(uint16_t port_id,
4773  struct rte_flow_action *actions,
4774  uint32_t num_of_actions,
4775  struct rte_flow_error *error);
4776 
4793 __rte_experimental
4794 int
4795 rte_flow_tunnel_item_release(uint16_t port_id,
4796  struct rte_flow_item *items,
4797  uint32_t num_of_items,
4798  struct rte_flow_error *error);
4799 
4828 __rte_experimental
4829 int
4830 rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
4831  struct rte_flow_error *error);
4832 
4851 __rte_experimental
4852 struct rte_flow_item_flex_handle *
4853 rte_flow_flex_item_create(uint16_t port_id,
4854  const struct rte_flow_item_flex_conf *conf,
4855  struct rte_flow_error *error);
4856 
4871 __rte_experimental
4872 int
4873 rte_flow_flex_item_release(uint16_t port_id,
4874  const struct rte_flow_item_flex_handle *handle,
4875  struct rte_flow_error *error);
4876 
4889  uint32_t max_nb_queues;
4904  uint32_t max_nb_meters;
4905 };
4906 
4919  uint32_t max_size;
4920 };
4921 
4943 __rte_experimental
4944 int
4945 rte_flow_info_get(uint16_t port_id,
4946  struct rte_flow_port_info *port_info,
4947  struct rte_flow_queue_info *queue_info,
4948  struct rte_flow_error *error);
4949 
4963  uint32_t nb_counters;
4973  uint32_t nb_meters;
4974 };
4975 
4988  uint32_t size;
4989 };
4990 
5022 __rte_experimental
5023 int
5024 rte_flow_configure(uint16_t port_id,
5025  const struct rte_flow_port_attr *port_attr,
5026  uint16_t nb_queue,
5027  const struct rte_flow_queue_attr *queue_attr[],
5028  struct rte_flow_error *error);
5029 
5034 struct rte_flow_pattern_template;
5035 
5042 __extension__
5051  uint32_t relaxed_matching:1;
5057  uint32_t ingress:1;
5059  uint32_t egress:1;
5061  uint32_t transfer:1;
5062 };
5063 
5091 __rte_experimental
5092 struct rte_flow_pattern_template *
5093 rte_flow_pattern_template_create(uint16_t port_id,
5094  const struct rte_flow_pattern_template_attr *template_attr,
5095  const struct rte_flow_item pattern[],
5096  struct rte_flow_error *error);
5097 
5118 __rte_experimental
5119 int
5120 rte_flow_pattern_template_destroy(uint16_t port_id,
5121  struct rte_flow_pattern_template *pattern_template,
5122  struct rte_flow_error *error);
5123 
5128 struct rte_flow_actions_template;
5129 
5136 __extension__
5143  uint32_t ingress:1;
5145  uint32_t egress:1;
5147  uint32_t transfer:1;
5148 };
5149 
5185 __rte_experimental
5186 struct rte_flow_actions_template *
5187 rte_flow_actions_template_create(uint16_t port_id,
5188  const struct rte_flow_actions_template_attr *template_attr,
5189  const struct rte_flow_action actions[],
5190  const struct rte_flow_action masks[],
5191  struct rte_flow_error *error);
5192 
5213 __rte_experimental
5214 int
5215 rte_flow_actions_template_destroy(uint16_t port_id,
5216  struct rte_flow_actions_template *actions_template,
5217  struct rte_flow_error *error);
5218 
5223 struct rte_flow_template_table;
5224 
5235  struct rte_flow_attr flow_attr;
5239  uint32_t nb_flows;
5240 };
5241 
5274 __rte_experimental
5275 struct rte_flow_template_table *
5276 rte_flow_template_table_create(uint16_t port_id,
5277  const struct rte_flow_template_table_attr *table_attr,
5278  struct rte_flow_pattern_template *pattern_templates[],
5279  uint8_t nb_pattern_templates,
5280  struct rte_flow_actions_template *actions_templates[],
5281  uint8_t nb_actions_templates,
5282  struct rte_flow_error *error);
5283 
5304 __rte_experimental
5305 int
5306 rte_flow_template_table_destroy(uint16_t port_id,
5307  struct rte_flow_template_table *template_table,
5308  struct rte_flow_error *error);
5309 
5316 __extension__
5322  uint32_t postpone:1;
5323 };
5324 
5361 __rte_experimental
5362 struct rte_flow *
5363 rte_flow_async_create(uint16_t port_id,
5364  uint32_t queue_id,
5365  const struct rte_flow_op_attr *op_attr,
5366  struct rte_flow_template_table *template_table,
5367  const struct rte_flow_item pattern[],
5368  uint8_t pattern_template_index,
5369  const struct rte_flow_action actions[],
5370  uint8_t actions_template_index,
5371  void *user_data,
5372  struct rte_flow_error *error);
5373 
5403 __rte_experimental
5404 int
5405 rte_flow_async_destroy(uint16_t port_id,
5406  uint32_t queue_id,
5407  const struct rte_flow_op_attr *op_attr,
5408  struct rte_flow *flow,
5409  void *user_data,
5410  struct rte_flow_error *error);
5411 
5432 __rte_experimental
5433 int
5434 rte_flow_push(uint16_t port_id,
5435  uint32_t queue_id,
5436  struct rte_flow_error *error);
5437 
5453 };
5454 
5461 __extension__
5466  enum rte_flow_op_status status;
5470  void *user_data;
5471 };
5472 
5498 __rte_experimental
5499 int
5500 rte_flow_pull(uint16_t port_id,
5501  uint32_t queue_id,
5502  struct rte_flow_op_result res[],
5503  uint16_t n_res,
5504  struct rte_flow_error *error);
5505 
5532 __rte_experimental
5533 struct rte_flow_action_handle *
5534 rte_flow_async_action_handle_create(uint16_t port_id,
5535  uint32_t queue_id,
5536  const struct rte_flow_op_attr *op_attr,
5537  const struct rte_flow_indir_action_conf *indir_action_conf,
5538  const struct rte_flow_action *action,
5539  void *user_data,
5540  struct rte_flow_error *error);
5541 
5567 __rte_experimental
5568 int
5569 rte_flow_async_action_handle_destroy(uint16_t port_id,
5570  uint32_t queue_id,
5571  const struct rte_flow_op_attr *op_attr,
5572  struct rte_flow_action_handle *action_handle,
5573  void *user_data,
5574  struct rte_flow_error *error);
5575 
5606 __rte_experimental
5607 int
5608 rte_flow_async_action_handle_update(uint16_t port_id,
5609  uint32_t queue_id,
5610  const struct rte_flow_op_attr *op_attr,
5611  struct rte_flow_action_handle *action_handle,
5612  const void *update,
5613  void *user_data,
5614  struct rte_flow_error *error);
5615 #ifdef __cplusplus
5616 }
5617 #endif
5618 
5619 #endif /* RTE_FLOW_H_ */
uint32_t reserved
Definition: rte_flow.h:133
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
Definition: rte_flow.h:1508
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:3660
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:1195
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1298
__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)
uint32_t reserved
Definition: rte_flow.h:990
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:4899
struct rte_ether_addr src_addr
Definition: rte_ether.h:269
struct rte_flow_action * actions
Definition: rte_flow.h:3890
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1457
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:995
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:1125
__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:1299
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
Definition: rte_flow.h:1779
uint32_t has_auth_ext
Definition: rte_flow.h:978
uint32_t nb_counters
Definition: rte_flow.h:4963
uint32_t num
Definition: rte_flow.h:707
__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:3882
uint32_t has_mobil_ext
Definition: rte_flow.h:984
uint32_t sec_since_last_hit
Definition: rte_flow.h:2954
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:2087
uint32_t original
Definition: rte_flow.h:3076
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:2188
uint32_t group
Definition: rte_flow.h:87
__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:4968
struct rte_flow_item * definition
Definition: rte_flow.h:3270
uint32_t nb_meters
Definition: rte_flow.h:4973
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:1201
rte_be16_t msg_len
Definition: rte_flow.h:1259
__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:1265
uint32_t postpone
Definition: rte_flow.h:5322
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:1018
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:1306
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:3881
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:1075
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:712
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1555
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1281
rte_flow_conntrack_state
Definition: rte_flow.h:3487
__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:1013
__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:1257
struct rte_ether_addr tla
Definition: rte_flow.h:1527
rte_flow_item_flex_field_mode
Definition: rte_flow.h:2054
rte_be16_t protocol
Definition: rte_flow.h:1153
uint32_t reserved
Definition: rte_flow.h:836
rte_be32_t spi
Definition: rte_esp.h:24
static const struct rte_flow_item_conntrack rte_flow_item_conntrack_mask
Definition: rte_flow.h:1915
static const struct rte_flow_item_geneve_opt rte_flow_item_geneve_opt_mask
Definition: rte_flow.h:1823
static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask
Definition: rte_flow.h:1408
rte_be16_t src_port
Definition: rte_sctp.h:29
struct rte_flow_action * actions
Definition: rte_flow.h:4328
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:949
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1678
uint32_t reserved
Definition: rte_flow.h:2950
struct rte_flow_item_flex_field * sample_data
Definition: rte_flow.h:2178
rte_be32_t src_addr
Definition: rte_ip.h:62
static const struct rte_flow_item_icmp6_nd_opt rte_flow_item_icmp6_nd_opt_mask
Definition: rte_flow.h:1483
static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask
Definition: rte_flow.h:780
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:1107
#define RTE_BIT32(nr)
Definition: rte_bitops.h:38
__rte_experimental int rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id, struct rte_flow_error *error)
uint8_t src_addr[16]
Definition: rte_ip.h:536
static const struct rte_flow_item_port_id rte_flow_item_port_id_mask
Definition: rte_flow.h:810
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:685
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:1160
uint64_t rte_be64_t
const void * mask
Definition: rte_flow.h:2027
struct rte_flow_item * pattern
Definition: rte_flow.h:3886
rte_be16_t type
Definition: rte_flow.h:883
const void * cause
Definition: rte_flow.h:3866
__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:1953
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:1037
struct rte_esp_hdr hdr
Definition: rte_flow.h:1276
rte_flow_error_type
Definition: rte_flow.h:3832
uint32_t has_esp_ext
Definition: rte_flow.h:980
rte_flow_conv_op
Definition: rte_flow.h:3899
rte_be16_t src_port
Definition: rte_udp.h:29
uint32_t has_shim6_ext
Definition: rte_flow.h:988
__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:974
__rte_experimental int rte_flow_actions_template_destroy(uint16_t port_id, struct rte_flow_actions_template *actions_template, struct rte_flow_error *error)
uint32_t id
Definition: rte_flow.h:740
const uint8_t * pattern
Definition: rte_flow.h:840
uint32_t search
Definition: rte_flow.h:835
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:1127
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:845
uint16_t limit
Definition: rte_flow.h:838
rte_flow_conntrack_tcp_last_index
Definition: rte_flow.h:3505
__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:1566
uint32_t max_nb_queues
Definition: rte_flow.h:4889
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:1180
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1430
__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:3793
const char * message
Definition: rte_flow.h:3867
rte_eth_hash_function
Definition: rte_flow.h:2995
uint32_t close_initiated
Definition: rte_flow.h:3527
uint16_t length
Definition: rte_flow.h:839
const void * last
Definition: rte_flow.h:2026
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1533
rte_be32_t teid
Definition: rte_flow.h:1260
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
uint32_t ingress
Definition: rte_flow.h:101
rte_be16_t tci
Definition: rte_flow.h:923
rte_be32_t vx_vni
Definition: rte_vxlan.h:35
uint32_t max_nb_meters
Definition: rte_flow.h:4904
__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:954
size_t size
Definition: rte_flow.h:4325
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:1152
static const struct rte_flow_item_ppp rte_flow_item_ppp_mask
Definition: rte_flow.h:1981
const uint8_t * pattern
Definition: rte_flow.h:2049
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1572
rte_be16_t length
Definition: rte_flow.h:1589
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:3889
uint32_t has_vlan
Definition: rte_flow.h:887
uint32_t has_more_vlan
Definition: rte_flow.h:929
struct rte_flow_item * items
Definition: rte_flow.h:4327
__rte_experimental int rte_flow_get_aged_flows(uint16_t port_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
rte_flow_action_type
Definition: rte_flow.h:2227
struct rte_ether_addr sla
Definition: rte_flow.h:1502
struct rte_flow_item_flex_link * output_link
Definition: rte_flow.h:2196
__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:3729
uint32_t has_hop_ext
Definition: rte_flow.h:972
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:1648
rte_color
Definition: rte_meter.h:36
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1733
const void * spec
Definition: rte_flow.h:2025
uint8_t label_tc_s[3]
Definition: rte_flow.h:1174
uint8_t version_type
Definition: rte_flow.h:1586
#define RTE_STD_C11
Definition: rte_common.h:42
__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:3055
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1351
uint32_t has_hip_ext
Definition: rte_flow.h:986
const struct rte_flow_action * actions
Definition: rte_flow.h:3823
__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:2953
rte_be16_t vlan_tci
Definition: rte_ether.h:285
struct rte_ether_addr sha
Definition: rte_flow.h:1342
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:893
rte_flow_op_status
Definition: rte_flow.h:5444
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:1934
__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:976
uint32_t reserved
Definition: rte_flow.h:3077
__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:1757
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1631
uint32_t priority
Definition: rte_flow.h:88
uint32_t has_dest_ext
Definition: rte_flow.h:982
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1376
static const struct rte_flow_item_vf rte_flow_item_vf_mask
Definition: rte_flow.h:745
uint32_t max_nb_counters
Definition: rte_flow.h:4894
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:970
static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask
Definition: rte_flow.h:1799
__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:1196
uint32_t queue_num
Definition: rte_flow.h:3054
uint8_t tni[3]
Definition: rte_flow.h:1154
struct rte_tcp_hdr hdr
Definition: rte_flow.h:1051
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1611
uint32_t transfer
Definition: rte_flow.h:132
struct rte_flow_item * definition
Definition: rte_flow.h:3304
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:935
uint8_t msg_type
Definition: rte_flow.h:1258
uint32_t reserved
Definition: rte_flow.h:930
uint32_t egress
Definition: rte_flow.h:114
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
Definition: rte_flow.h:1135
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:4071
__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:1056
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1240
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:61
rte_be16_t inner_type
Definition: rte_flow.h:924
__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:1032
__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:3056
rte_flow_item_type
Definition: rte_flow.h:152
__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:834
int32_t offset
Definition: rte_flow.h:837
rte_be16_t inner_type
Definition: rte_flow.h:1130
__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:2047
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:3885
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1326
rte_be16_t session_id
Definition: rte_flow.h:1588
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1707
__rte_experimental int rte_flow_push(uint16_t port_id, uint32_t queue_id, struct rte_flow_error *error)
struct rte_sctp_hdr hdr
Definition: rte_flow.h:1070
uint32_t reserved
Definition: rte_flow.h:888