DPDK  22.07.0-rc1
rte_flow.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2016 6WIND S.A.
3  * Copyright 2016 Mellanox Technologies, Ltd
4  */
5 
6 #ifndef RTE_FLOW_H_
7 #define RTE_FLOW_H_
8 
17 #include <stddef.h>
18 #include <stdint.h>
19 
20 #include <rte_arp.h>
21 #include <rte_common.h>
22 #include <rte_ether.h>
23 #include <rte_icmp.h>
24 #include <rte_ip.h>
25 #include <rte_sctp.h>
26 #include <rte_tcp.h>
27 #include <rte_udp.h>
28 #include <rte_vxlan.h>
29 #include <rte_byteorder.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.h>
35 #include <rte_mbuf_dyn.h>
36 #include <rte_meter.h>
37 #include <rte_gtp.h>
38 #include <rte_l2tpv2.h>
39 #include <rte_ppp.h>
40 #include <rte_gre.h>
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #define RTE_FLOW_LOG(level, ...) \
47  rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, "" __VA_ARGS__)
48 
89 struct rte_flow_attr {
90  uint32_t group;
91  uint32_t priority;
104  uint32_t ingress:1;
117  uint32_t egress:1;
135  uint32_t transfer:1;
136  uint32_t reserved:29;
137 };
138 
165 
175 
185 
193 
207 
221 
235 
249 
256 
263 
270 
277 
284 
291 
298 
305 
312 
319 
326 
333 
340 
347 
359 
368 
377 
386 
393 
400 
407 
414 
421 
428 
435 
442 
449 
457 
465 
472 
481 
494 
503 
512 
521 
530 
537 
544 
551 
557 
566 
575 
582 
591 
598 
605 
616 
625 
634 
644 
653 
660 
667 
674 };
675 
683  struct rte_higig2_hdr hdr;
684 };
685 
687 #ifndef __cplusplus
689  .hdr = {
690  .ppt1 = {
691  .classification = 0xffff,
692  .vid = 0xfff,
693  },
694  },
695 };
696 #endif
697 
710  uint32_t num;
711 };
712 
714 #ifndef __cplusplus
716  .num = 0x00000000,
717 };
718 #endif
719 
743  uint32_t id;
744 };
745 
747 #ifndef __cplusplus
749  .id = 0x00000000,
750 };
751 #endif
752 
778  uint32_t index;
779 };
780 
782 #ifndef __cplusplus
784  .index = 0x00000000,
785 };
786 #endif
787 
808  uint32_t id;
809 };
810 
812 #ifndef __cplusplus
814  .id = 0xffffffff,
815 };
816 #endif
817 
837  uint32_t relative:1;
838  uint32_t search:1;
839  uint32_t reserved:30;
840  int32_t offset;
841  uint16_t limit;
842  uint16_t length;
843  const uint8_t *pattern;
844 };
845 
847 #ifndef __cplusplus
849  .relative = 1,
850  .search = 1,
851  .reserved = 0x3fffffff,
852  .offset = 0xffffffff,
853  .limit = 0xffff,
854  .length = 0xffff,
855  .pattern = NULL,
856 };
857 #endif
858 
878  union {
879  struct {
880  /*
881  * These fields are retained for compatibility.
882  * Please switch to the new header field below.
883  */
884  struct rte_ether_addr dst;
885  struct rte_ether_addr src;
887  };
888  struct rte_ether_hdr hdr;
889  };
890  uint32_t has_vlan:1;
891  uint32_t reserved:31;
892 };
893 
895 #ifndef __cplusplus
897  .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
898  .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
899  .hdr.ether_type = RTE_BE16(0x0000),
900 };
901 #endif
902 
920  union {
921  struct {
922  /*
923  * These fields are retained for compatibility.
924  * Please switch to the new header field below.
925  */
928  };
929  struct rte_vlan_hdr hdr;
930  };
932  uint32_t has_more_vlan:1;
933  uint32_t reserved:31;
934 };
935 
937 #ifndef __cplusplus
939  .hdr.vlan_tci = RTE_BE16(0x0fff),
940  .hdr.eth_proto = RTE_BE16(0x0000),
941 };
942 #endif
943 
952  struct rte_ipv4_hdr hdr;
953 };
954 
956 #ifndef __cplusplus
958  .hdr = {
959  .src_addr = RTE_BE32(0xffffffff),
960  .dst_addr = RTE_BE32(0xffffffff),
961  },
962 };
963 #endif
964 
973  struct rte_ipv6_hdr hdr;
975  uint32_t has_hop_ext:1;
977  uint32_t has_route_ext:1;
979  uint32_t has_frag_ext:1;
981  uint32_t has_auth_ext:1;
983  uint32_t has_esp_ext:1;
985  uint32_t has_dest_ext:1;
987  uint32_t has_mobil_ext:1;
989  uint32_t has_hip_ext:1;
991  uint32_t has_shim6_ext:1;
993  uint32_t reserved:23;
994 };
995 
997 #ifndef __cplusplus
999  .hdr = {
1000  .src_addr =
1001  "\xff\xff\xff\xff\xff\xff\xff\xff"
1002  "\xff\xff\xff\xff\xff\xff\xff\xff",
1003  .dst_addr =
1004  "\xff\xff\xff\xff\xff\xff\xff\xff"
1005  "\xff\xff\xff\xff\xff\xff\xff\xff",
1006  },
1007 };
1008 #endif
1009 
1016  struct rte_icmp_hdr hdr;
1017 };
1018 
1020 #ifndef __cplusplus
1022  .hdr = {
1023  .icmp_type = 0xff,
1024  .icmp_code = 0xff,
1025  },
1026 };
1027 #endif
1028 
1035  struct rte_udp_hdr hdr;
1036 };
1037 
1039 #ifndef __cplusplus
1041  .hdr = {
1042  .src_port = RTE_BE16(0xffff),
1043  .dst_port = RTE_BE16(0xffff),
1044  },
1045 };
1046 #endif
1047 
1054  struct rte_tcp_hdr hdr;
1055 };
1056 
1058 #ifndef __cplusplus
1060  .hdr = {
1061  .src_port = RTE_BE16(0xffff),
1062  .dst_port = RTE_BE16(0xffff),
1063  },
1064 };
1065 #endif
1066 
1073  struct rte_sctp_hdr hdr;
1074 };
1075 
1077 #ifndef __cplusplus
1079  .hdr = {
1080  .src_port = RTE_BE16(0xffff),
1081  .dst_port = RTE_BE16(0xffff),
1082  },
1083 };
1084 #endif
1085 
1093  union {
1094  struct {
1095  /*
1096  * These fields are retained for compatibility.
1097  * Please switch to the new header field below.
1098  */
1099  uint8_t flags;
1100  uint8_t rsvd0[3];
1101  uint8_t vni[3];
1102  uint8_t rsvd1;
1103  };
1104  struct rte_vxlan_hdr hdr;
1105  };
1106 };
1107 
1109 #ifndef __cplusplus
1111  .hdr.vx_vni = RTE_BE32(0xffffff00), /* (0xffffff << 8) */
1112 };
1113 #endif
1114 
1131  uint8_t in_ecid_e;
1132  uint8_t ecid_e;
1134 };
1135 
1137 #ifndef __cplusplus
1139  .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
1140 };
1141 #endif
1142 
1157  uint8_t tni[3];
1158  uint8_t flow_id;
1159 };
1160 
1162 #ifndef __cplusplus
1164  .tni = "\xff\xff\xff",
1165 };
1166 #endif
1167 
1177  uint8_t label_tc_s[3];
1178  uint8_t ttl;
1179 };
1180 
1182 #ifndef __cplusplus
1184  .label_tc_s = "\xff\xff\xf0",
1185 };
1186 #endif
1187 
1200 };
1201 
1203 #ifndef __cplusplus
1205  .protocol = RTE_BE16(0xffff),
1206 };
1207 #endif
1208 
1215  struct rte_gre_hdr_opt_checksum_rsvd checksum_rsvd;
1216  struct rte_gre_hdr_opt_key key;
1217  struct rte_gre_hdr_opt_sequence sequence;
1218 };
1219 
1238  uint32_t thresh;
1239 };
1240 
1242 #ifndef __cplusplus
1244  .thresh = 0xffffffff,
1245 };
1246 #endif
1247 
1261  uint8_t msg_type;
1264 };
1265 
1267 #ifndef __cplusplus
1269  .teid = RTE_BE32(0xffffffff),
1270 };
1271 #endif
1272 
1279  struct rte_esp_hdr hdr;
1280 };
1281 
1283 #ifndef __cplusplus
1285  .hdr = {
1286  .spi = RTE_BE32(0xffffffff),
1287  },
1288 };
1289 #endif
1290 
1303  uint8_t vni[3];
1304  uint8_t rsvd1;
1305 };
1306 
1308 #ifndef __cplusplus
1310  .vni = "\xff\xff\xff",
1311 };
1312 #endif
1313 
1320  uint8_t flags;
1321  uint8_t rsvd0[2];
1322  uint8_t protocol;
1323  uint8_t vni[3];
1324  uint8_t rsvd1;
1325 };
1326 
1328 #ifndef __cplusplus
1330  .vni = "\xff\xff\xff",
1331 };
1332 #endif
1333 
1342  uint8_t hln;
1343  uint8_t pln;
1345  struct rte_ether_addr sha;
1347  struct rte_ether_addr tha;
1349 };
1350 
1352 #ifndef __cplusplus
1353 static const struct rte_flow_item_arp_eth_ipv4
1355  .sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1356  .spa = RTE_BE32(0xffffffff),
1357  .tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1358  .tpa = RTE_BE32(0xffffffff),
1359 };
1360 #endif
1361 
1373  uint8_t next_hdr;
1374 };
1375 
1377 #ifndef __cplusplus
1378 static const
1380  .next_hdr = 0xff,
1381 };
1382 #endif
1383 
1395  struct rte_ipv6_fragment_ext hdr;
1396 };
1397 
1404  uint8_t type;
1405  uint8_t code;
1406  uint16_t checksum;
1407 };
1408 
1410 #ifndef __cplusplus
1412  .type = 0xff,
1413  .code = 0xff,
1414 };
1415 #endif
1416 
1423  uint8_t type;
1424  uint8_t code;
1427  uint8_t target_addr[16];
1428 };
1429 
1431 #ifndef __cplusplus
1432 static const
1434  .target_addr =
1435  "\xff\xff\xff\xff\xff\xff\xff\xff"
1436  "\xff\xff\xff\xff\xff\xff\xff\xff",
1437 };
1438 #endif
1439 
1446  uint8_t type;
1447  uint8_t code;
1454  uint8_t target_addr[16];
1455 };
1456 
1458 #ifndef __cplusplus
1459 static const
1461  .target_addr =
1462  "\xff\xff\xff\xff\xff\xff\xff\xff"
1463  "\xff\xff\xff\xff\xff\xff\xff\xff",
1464 };
1465 #endif
1466 
1479  uint8_t type;
1480  uint8_t length;
1481 };
1482 
1484 #ifndef __cplusplus
1485 static const struct rte_flow_item_icmp6_nd_opt
1487  .type = 0xff,
1488 };
1489 #endif
1490 
1503  uint8_t type;
1504  uint8_t length;
1505  struct rte_ether_addr sla;
1506 };
1507 
1509 #ifndef __cplusplus
1510 static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1512  .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1513 };
1514 #endif
1515 
1528  uint8_t type;
1529  uint8_t length;
1530  struct rte_ether_addr tla;
1531 };
1532 
1534 #ifndef __cplusplus
1535 static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1537  .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1538 };
1539 #endif
1540 
1553  uint32_t data;
1554 };
1555 
1557 #ifndef __cplusplus
1559  .data = UINT32_MAX,
1560 };
1561 #endif
1562 
1570 };
1571 
1573 #ifndef __cplusplus
1574 static const struct rte_flow_item_gtp_psc
1576  .hdr.qfi = 0x3f,
1577 };
1578 #endif
1579 
1589  uint8_t version_type;
1590  uint8_t code;
1593 };
1594 
1609 };
1610 
1612 #ifndef __cplusplus
1613 static const struct rte_flow_item_pppoe_proto_id
1615  .proto_id = RTE_BE16(0xffff),
1616 };
1617 #endif
1618 
1628  uint32_t data;
1629  uint8_t index;
1630 };
1631 
1633 #ifndef __cplusplus
1635  .data = 0xffffffff,
1636  .index = 0xff,
1637 };
1638 #endif
1639 
1647 };
1648 
1650 #ifndef __cplusplus
1652  .session_id = RTE_BE32(UINT32_MAX),
1653 };
1654 #endif
1655 
1656 
1676  uint32_t id;
1677 };
1678 
1680 #ifndef __cplusplus
1682  .id = 0xffffffff,
1683 };
1684 #endif
1685 
1696  uint32_t version:2;
1697  uint32_t oam_pkt:1;
1698  uint32_t reserved:1;
1699  uint32_t ttl:6;
1700  uint32_t length:6;
1701  uint32_t reserved1:4;
1702  uint32_t mdtype:4;
1703  uint32_t next_proto:8;
1704  uint32_t spi:24;
1705  uint32_t sindex:8;
1706 };
1707 
1709 #ifndef __cplusplus
1711  .mdtype = 0xf,
1712  .next_proto = 0xff,
1713  .spi = 0xffffff,
1714  .sindex = 0xff,
1715 };
1716 #endif
1717 
1728  uint32_t type:8;
1729  uint32_t max_resp_time:8;
1730  uint32_t checksum:16;
1731  uint32_t group_addr;
1732 };
1733 
1735 #ifndef __cplusplus
1737  .group_addr = 0xffffffff,
1738 };
1739 #endif
1740 
1751  uint32_t next_hdr:8;
1752  uint32_t payload_len:8;
1753  uint32_t reserved:16;
1754  uint32_t spi;
1755  uint32_t seq_num;
1756 };
1757 
1759 #ifndef __cplusplus
1761  .spi = 0xffffffff,
1762 };
1763 #endif
1764 
1774  uint8_t s_field;
1775  uint8_t msg_type;
1776  rte_be16_t msg_len;
1777  rte_be64_t seid;
1778 };
1779 
1781 #ifndef __cplusplus
1783  .s_field = 0x01,
1784  .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1785 };
1786 #endif
1787 
1797  struct rte_ecpri_combined_msg_hdr hdr;
1798 };
1799 
1801 #ifndef __cplusplus
1803  .hdr = {
1804  .common = {
1805  .u32 = 0x0,
1806  },
1807  },
1808 };
1809 #endif
1810 
1817  rte_be16_t option_class;
1818  uint8_t option_type;
1819  uint8_t option_len;
1820  uint32_t *data;
1821 };
1822 
1824 #ifndef __cplusplus
1825 static const struct rte_flow_item_geneve_opt
1827  .option_type = 0xff,
1828 };
1829 #endif
1830 
1843  uint32_t level;
1844  RTE_STD_C11
1845  union {
1846  __extension__
1847  struct {
1849  uint64_t packet_ok:1;
1851  uint64_t l2_ok:1;
1853  uint64_t l3_ok:1;
1855  uint64_t l4_ok:1;
1857  uint64_t l2_crc_ok:1;
1859  uint64_t ipv4_csum_ok:1;
1861  uint64_t l4_csum_ok:1;
1863  uint64_t l3_len_ok:1;
1864  uint64_t reserved:56;
1865  };
1866  uint64_t value;
1867  };
1868 };
1869 
1870 #ifndef __cplusplus
1871 static const struct rte_flow_item_integrity
1872 rte_flow_item_integrity_mask = {
1873  .level = 0,
1874  .value = 0,
1875 };
1876 #endif
1877 
1881 #define RTE_FLOW_CONNTRACK_PKT_STATE_VALID RTE_BIT32(0)
1882 
1885 #define RTE_FLOW_CONNTRACK_PKT_STATE_CHANGED RTE_BIT32(1)
1886 
1890 #define RTE_FLOW_CONNTRACK_PKT_STATE_INVALID RTE_BIT32(2)
1891 
1895 #define RTE_FLOW_CONNTRACK_PKT_STATE_DISABLED RTE_BIT32(3)
1896 
1900 #define RTE_FLOW_CONNTRACK_PKT_STATE_BAD RTE_BIT32(4)
1901 
1913  uint32_t flags;
1914 };
1915 
1917 #ifndef __cplusplus
1919  .flags = 0xffffffff,
1920 };
1921 #endif
1922 
1932  uint16_t port_id;
1933 };
1934 
1936 #ifndef __cplusplus
1938  .port_id = 0xffff,
1939 };
1940 #endif
1941 
1951  struct rte_l2tpv2_combined_msg_hdr hdr;
1952 };
1953 
1955 #ifndef __cplusplus
1957  /*
1958  * flags and version bit mask
1959  * 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
1960  * T L x x S x O P x x x x V V V V
1961  */
1962  .hdr = {
1963  .common = {
1964  .flags_version = RTE_BE16(0xcb0f),
1965  },
1966  },
1967 };
1968 #endif
1969 
1979  struct rte_ppp_hdr hdr;
1980 };
1981 
1983 #ifndef __cplusplus
1985  .hdr = {
1986  .addr = 0xff,
1987  .ctrl = 0xff,
1988  .proto_id = RTE_BE16(0xffff),
1989  }
1990 };
1991 #endif
1992 
2028  const void *spec;
2029  const void *last;
2030  const void *mask;
2031 };
2032 
2050  struct rte_flow_item_flex_handle *handle;
2051  uint32_t length;
2052  const uint8_t *pattern;
2053 };
2085 };
2086 
2116 };
2117 
2123 __extension__
2127  uint32_t field_size;
2128  int32_t field_base;
2129  uint32_t offset_base;
2130  uint32_t offset_mask;
2131  int32_t offset_shift;
2132  uint32_t field_id:16;
2133  uint32_t reserved:16;
2134 };
2135 
2146  struct rte_flow_item item;
2151  uint32_t next;
2152 };
2153 
2170  struct rte_flow_item_flex_field next_header;
2175  struct rte_flow_item_flex_field next_protocol;
2183  uint32_t nb_samples;
2193  uint32_t nb_inputs;
2201  uint32_t nb_outputs;
2202 };
2203 
2238 
2246 
2254 
2263 
2275 
2287 
2294 
2303 
2314 
2323 
2335 
2347 
2359 
2370 
2378 
2386 
2397 
2408 
2419 
2430 
2442 
2454 
2462 
2470 
2478 
2486 
2494 
2502 
2510 
2519 
2527 
2536 
2543 
2550 
2563 
2576 
2589 
2602 
2616 
2630 
2641 
2651 
2661 
2674 
2687 
2704 
2721 
2738 
2755 
2768 
2778 
2791 
2804 
2815 
2823 
2834 
2845 
2853 
2862 
2870 
2877 
2885 };
2886 
2898  uint32_t id;
2899 };
2900 
2914  uint32_t group;
2915 };
2916 
2923  uint16_t index;
2924 };
2925 
2940  uint32_t timeout:24;
2941  uint32_t reserved:8;
2943  void *context;
2944 };
2945 
2953  uint32_t reserved:6;
2954  uint32_t aged:1;
2957  uint32_t sec_since_last_hit:24;
2958 };
2959 
2978  uint32_t id;
2979 };
2980 
2987  uint32_t reset:1;
2988  uint32_t hits_set:1;
2989  uint32_t bytes_set:1;
2990  uint32_t reserved:29;
2991  uint64_t hits;
2992  uint64_t bytes;
2993 };
2994 
2999  RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
3008  RTE_ETH_HASH_FUNCTION_MAX,
3009 };
3010 
3054  uint32_t level;
3055  uint64_t types;
3056  uint32_t key_len;
3057  uint32_t queue_num;
3058  const uint8_t *key;
3059  const uint16_t *queue;
3060 };
3061 
3079  uint32_t original:1;
3080  uint32_t reserved:31;
3081  uint32_t id;
3082 };
3083 
3097  uint32_t original:1;
3098  uint32_t reserved:31;
3099  uint32_t index;
3100 };
3101 
3114  uint32_t original:1;
3115  uint32_t reserved:31;
3116  uint32_t id;
3117 };
3118 
3128  uint32_t mtr_id;
3129 };
3130 
3163 };
3164 
3175  uint8_t mpls_ttl;
3176 };
3177 
3188  uint8_t nw_ttl;
3189 };
3190 
3199 };
3200 
3209 };
3210 
3218  uint8_t vlan_pcp;
3219 };
3220 
3229 };
3230 
3239 };
3240 
3274 };
3275 
3308 };
3309 
3330  uint8_t *data;
3331  uint8_t *preserve;
3332  size_t size;
3333 };
3334 
3351  uint8_t *data;
3352  size_t size;
3353 };
3354 
3367  rte_be32_t ipv4_addr;
3368 };
3369 
3382  uint8_t ipv6_addr[16];
3383 };
3384 
3397  rte_be16_t port;
3398 };
3399 
3406  uint8_t ttl_value;
3407 };
3408 
3415  uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
3416 };
3417 
3428  uint32_t data;
3429  uint32_t mask;
3430  uint8_t index;
3431 };
3432 
3453  uint32_t data;
3454  uint32_t mask;
3455 };
3456 
3465  uint8_t dscp;
3466 };
3467 
3485 struct rte_flow_action_handle;
3486 
3503 };
3504 
3515 };
3516 
3528  uint32_t scale:4;
3530  uint32_t close_initiated:1;
3532  uint32_t last_ack_seen:1;
3537  uint32_t data_unacked:1;
3542  uint32_t sent_end;
3547  uint32_t reply_end;
3549  uint32_t max_win;
3551  uint32_t max_ack;
3552 };
3553 
3566  uint16_t peer_port;
3571  uint32_t is_original_dir:1;
3579  uint32_t enable:1;
3581  uint32_t live_connection:1;
3583  uint32_t selective_ack:1;
3590  uint32_t last_direction:1;
3592  uint32_t liberal_mode:1;
3600  struct rte_flow_tcp_dir_param original_dir;
3602  struct rte_flow_tcp_dir_param reply_dir;
3604  uint16_t last_window;
3605  enum rte_flow_conntrack_tcp_last_index last_index;
3607  uint32_t last_seq;
3609  uint32_t last_ack;
3614  uint32_t last_end;
3615 };
3616 
3628  uint32_t direction:1;
3630  uint32_t state:1;
3632  uint32_t reserved:30;
3633 };
3634 
3645  enum rte_color color;
3646 };
3647 
3657  uint16_t port_id;
3658 };
3659 
3695 };
3696 
3704  enum rte_flow_field_id field;
3705  RTE_STD_C11
3706  union {
3707  struct {
3709  uint32_t level;
3711  uint32_t offset;
3712  };
3719  uint8_t value[16];
3725  void *pvalue;
3726  };
3727 };
3728 
3736 };
3737 
3749  enum rte_flow_modify_op operation;
3752  uint32_t width;
3753 };
3754 
3755 /* Mbuf dynamic field offset for metadata. */
3756 extern int32_t rte_flow_dynf_metadata_offs;
3757 
3758 /* Mbuf dynamic field flag mask for metadata. */
3759 extern uint64_t rte_flow_dynf_metadata_mask;
3760 
3761 /* Mbuf dynamic field pointer for metadata. */
3762 #define RTE_FLOW_DYNF_METADATA(m) \
3763  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
3764 
3765 /* Mbuf dynamic flags for metadata. */
3766 #define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask)
3767 #define PKT_RX_DYNF_METADATA RTE_DEPRECATED(PKT_RX_DYNF_METADATA) \
3768  RTE_MBUF_DYNFLAG_RX_METADATA
3769 #define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask)
3770 #define PKT_TX_DYNF_METADATA RTE_DEPRECATED(PKT_TX_DYNF_METADATA) \
3771  RTE_MBUF_DYNFLAG_TX_METADATA
3772 
3773 __rte_experimental
3774 static inline uint32_t
3775 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
3776 {
3777  return *RTE_FLOW_DYNF_METADATA(m);
3778 }
3779 
3780 __rte_experimental
3781 static inline void
3782 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
3783 {
3784  *RTE_FLOW_DYNF_METADATA(m) = v;
3785 }
3786 
3796  const void *conf;
3797 };
3798 
3805 struct rte_flow;
3806 
3824  uint32_t ratio;
3826  const struct rte_flow_action *actions;
3827 };
3828 
3854 };
3855 
3869  const void *cause;
3870  const char *message;
3871 };
3872 
3883  union {
3884  const struct rte_flow_attr *attr_ro;
3886  };
3887  union {
3888  const struct rte_flow_item *pattern_ro;
3890  };
3891  union {
3892  const struct rte_flow_action *actions_ro;
3894  };
3895 };
3896 
3909 
3921 
3933 
3945 
3958 
3971 
3984 
3998 
4012 
4026 
4040 };
4041 
4061 __rte_experimental
4062 int
4063 rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow,
4064  FILE *file, struct rte_flow_error *error);
4065 
4072 __rte_experimental
4073 static inline int
4075 {
4076  return !!rte_flow_dynf_metadata_mask;
4077 }
4078 
4089 __rte_experimental
4090 int
4092 
4145 int
4146 rte_flow_validate(uint16_t port_id,
4147  const struct rte_flow_attr *attr,
4148  const struct rte_flow_item pattern[],
4149  const struct rte_flow_action actions[],
4150  struct rte_flow_error *error);
4151 
4172 struct rte_flow *
4173 rte_flow_create(uint16_t port_id,
4174  const struct rte_flow_attr *attr,
4175  const struct rte_flow_item pattern[],
4176  const struct rte_flow_action actions[],
4177  struct rte_flow_error *error);
4178 
4199 int
4200 rte_flow_destroy(uint16_t port_id,
4201  struct rte_flow *flow,
4202  struct rte_flow_error *error);
4203 
4220 int
4221 rte_flow_flush(uint16_t port_id,
4222  struct rte_flow_error *error);
4223 
4248 int
4249 rte_flow_query(uint16_t port_id,
4250  struct rte_flow *flow,
4251  const struct rte_flow_action *action,
4252  void *data,
4253  struct rte_flow_error *error);
4254 
4296 int
4297 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
4298 
4316 int
4317 rte_flow_error_set(struct rte_flow_error *error,
4318  int code,
4319  enum rte_flow_error_type type,
4320  const void *cause,
4321  const char *message);
4322 
4328  size_t size;
4329  struct rte_flow_attr attr;
4332  uint8_t data[];
4333 };
4334 
4361 __rte_deprecated
4362 size_t
4363 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
4364  const struct rte_flow_attr *attr,
4365  const struct rte_flow_item *items,
4366  const struct rte_flow_action *actions);
4367 
4408 __rte_experimental
4409 int
4411  void *dst,
4412  size_t size,
4413  const void *src,
4414  struct rte_flow_error *error);
4415 
4444 __rte_experimental
4445 int
4446 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
4447  uint32_t nb_contexts, struct rte_flow_error *error);
4448 
4460  uint32_t ingress:1;
4462  uint32_t egress:1;
4467  uint32_t transfer:1;
4468 };
4469 
4497 __rte_experimental
4498 struct rte_flow_action_handle *
4499 rte_flow_action_handle_create(uint16_t port_id,
4500  const struct rte_flow_indir_action_conf *conf,
4501  const struct rte_flow_action *action,
4502  struct rte_flow_error *error);
4503 
4526 __rte_experimental
4527 int
4528 rte_flow_action_handle_destroy(uint16_t port_id,
4529  struct rte_flow_action_handle *handle,
4530  struct rte_flow_error *error);
4531 
4565 __rte_experimental
4566 int
4567 rte_flow_action_handle_update(uint16_t port_id,
4568  struct rte_flow_action_handle *handle,
4569  const void *update,
4570  struct rte_flow_error *error);
4571 
4597 __rte_experimental
4598 int
4599 rte_flow_action_handle_query(uint16_t port_id,
4600  const struct rte_flow_action_handle *handle,
4601  void *data, struct rte_flow_error *error);
4602 
4603 /* Tunnel has a type and the key information. */
4604 struct rte_flow_tunnel {
4609  enum rte_flow_item_type type;
4610  uint64_t tun_id;
4612  RTE_STD_C11
4613  union {
4614  struct {
4617  } ipv4;
4618  struct {
4619  uint8_t src_addr[16];
4620  uint8_t dst_addr[16];
4621  } ipv6;
4622  };
4623  rte_be16_t tp_src;
4624  rte_be16_t tp_dst;
4625  uint16_t tun_flags;
4627  bool is_ipv6;
4633  uint8_t tos;
4634  uint8_t ttl;
4635  uint32_t label;
4636 };
4637 
4641 #define RTE_FLOW_RESTORE_INFO_TUNNEL RTE_BIT64(0)
4642 
4646 #define RTE_FLOW_RESTORE_INFO_ENCAPSULATED RTE_BIT64(1)
4647 
4651 #define RTE_FLOW_RESTORE_INFO_GROUP_ID RTE_BIT64(2)
4652 
4663  uint64_t flags;
4664  uint32_t group_id;
4665  struct rte_flow_tunnel tunnel;
4666 };
4667 
4691 __rte_experimental
4692 int
4693 rte_flow_tunnel_decap_set(uint16_t port_id,
4694  struct rte_flow_tunnel *tunnel,
4695  struct rte_flow_action **actions,
4696  uint32_t *num_of_actions,
4697  struct rte_flow_error *error);
4698 
4722 __rte_experimental
4723 int
4724 rte_flow_tunnel_match(uint16_t port_id,
4725  struct rte_flow_tunnel *tunnel,
4726  struct rte_flow_item **items,
4727  uint32_t *num_of_items,
4728  struct rte_flow_error *error);
4729 
4750 __rte_experimental
4751 int
4752 rte_flow_get_restore_info(uint16_t port_id,
4753  struct rte_mbuf *m,
4754  struct rte_flow_restore_info *info,
4755  struct rte_flow_error *error);
4756 
4773 __rte_experimental
4774 int
4775 rte_flow_tunnel_action_decap_release(uint16_t port_id,
4776  struct rte_flow_action *actions,
4777  uint32_t num_of_actions,
4778  struct rte_flow_error *error);
4779 
4796 __rte_experimental
4797 int
4798 rte_flow_tunnel_item_release(uint16_t port_id,
4799  struct rte_flow_item *items,
4800  uint32_t num_of_items,
4801  struct rte_flow_error *error);
4802 
4831 __rte_experimental
4832 int
4833 rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
4834  struct rte_flow_error *error);
4835 
4854 __rte_experimental
4855 struct rte_flow_item_flex_handle *
4856 rte_flow_flex_item_create(uint16_t port_id,
4857  const struct rte_flow_item_flex_conf *conf,
4858  struct rte_flow_error *error);
4859 
4874 __rte_experimental
4875 int
4876 rte_flow_flex_item_release(uint16_t port_id,
4877  const struct rte_flow_item_flex_handle *handle,
4878  struct rte_flow_error *error);
4879 
4892  uint32_t max_nb_queues;
4907  uint32_t max_nb_meters;
4908 };
4909 
4922  uint32_t max_size;
4923 };
4924 
4946 __rte_experimental
4947 int
4948 rte_flow_info_get(uint16_t port_id,
4949  struct rte_flow_port_info *port_info,
4950  struct rte_flow_queue_info *queue_info,
4951  struct rte_flow_error *error);
4952 
4966  uint32_t nb_counters;
4976  uint32_t nb_meters;
4977 };
4978 
4991  uint32_t size;
4992 };
4993 
5025 __rte_experimental
5026 int
5027 rte_flow_configure(uint16_t port_id,
5028  const struct rte_flow_port_attr *port_attr,
5029  uint16_t nb_queue,
5030  const struct rte_flow_queue_attr *queue_attr[],
5031  struct rte_flow_error *error);
5032 
5037 struct rte_flow_pattern_template;
5038 
5045 __extension__
5054  uint32_t relaxed_matching:1;
5060  uint32_t ingress:1;
5062  uint32_t egress:1;
5064  uint32_t transfer:1;
5065 };
5066 
5094 __rte_experimental
5095 struct rte_flow_pattern_template *
5096 rte_flow_pattern_template_create(uint16_t port_id,
5097  const struct rte_flow_pattern_template_attr *template_attr,
5098  const struct rte_flow_item pattern[],
5099  struct rte_flow_error *error);
5100 
5121 __rte_experimental
5122 int
5123 rte_flow_pattern_template_destroy(uint16_t port_id,
5124  struct rte_flow_pattern_template *pattern_template,
5125  struct rte_flow_error *error);
5126 
5131 struct rte_flow_actions_template;
5132 
5139 __extension__
5146  uint32_t ingress:1;
5148  uint32_t egress:1;
5150  uint32_t transfer:1;
5151 };
5152 
5188 __rte_experimental
5189 struct rte_flow_actions_template *
5190 rte_flow_actions_template_create(uint16_t port_id,
5191  const struct rte_flow_actions_template_attr *template_attr,
5192  const struct rte_flow_action actions[],
5193  const struct rte_flow_action masks[],
5194  struct rte_flow_error *error);
5195 
5216 __rte_experimental
5217 int
5218 rte_flow_actions_template_destroy(uint16_t port_id,
5219  struct rte_flow_actions_template *actions_template,
5220  struct rte_flow_error *error);
5221 
5226 struct rte_flow_template_table;
5227 
5238  struct rte_flow_attr flow_attr;
5242  uint32_t nb_flows;
5243 };
5244 
5277 __rte_experimental
5278 struct rte_flow_template_table *
5279 rte_flow_template_table_create(uint16_t port_id,
5280  const struct rte_flow_template_table_attr *table_attr,
5281  struct rte_flow_pattern_template *pattern_templates[],
5282  uint8_t nb_pattern_templates,
5283  struct rte_flow_actions_template *actions_templates[],
5284  uint8_t nb_actions_templates,
5285  struct rte_flow_error *error);
5286 
5307 __rte_experimental
5308 int
5309 rte_flow_template_table_destroy(uint16_t port_id,
5310  struct rte_flow_template_table *template_table,
5311  struct rte_flow_error *error);
5312 
5319 __extension__
5325  uint32_t postpone:1;
5326 };
5327 
5364 __rte_experimental
5365 struct rte_flow *
5366 rte_flow_async_create(uint16_t port_id,
5367  uint32_t queue_id,
5368  const struct rte_flow_op_attr *op_attr,
5369  struct rte_flow_template_table *template_table,
5370  const struct rte_flow_item pattern[],
5371  uint8_t pattern_template_index,
5372  const struct rte_flow_action actions[],
5373  uint8_t actions_template_index,
5374  void *user_data,
5375  struct rte_flow_error *error);
5376 
5406 __rte_experimental
5407 int
5408 rte_flow_async_destroy(uint16_t port_id,
5409  uint32_t queue_id,
5410  const struct rte_flow_op_attr *op_attr,
5411  struct rte_flow *flow,
5412  void *user_data,
5413  struct rte_flow_error *error);
5414 
5435 __rte_experimental
5436 int
5437 rte_flow_push(uint16_t port_id,
5438  uint32_t queue_id,
5439  struct rte_flow_error *error);
5440 
5456 };
5457 
5464 __extension__
5469  enum rte_flow_op_status status;
5473  void *user_data;
5474 };
5475 
5501 __rte_experimental
5502 int
5503 rte_flow_pull(uint16_t port_id,
5504  uint32_t queue_id,
5505  struct rte_flow_op_result res[],
5506  uint16_t n_res,
5507  struct rte_flow_error *error);
5508 
5535 __rte_experimental
5536 struct rte_flow_action_handle *
5537 rte_flow_async_action_handle_create(uint16_t port_id,
5538  uint32_t queue_id,
5539  const struct rte_flow_op_attr *op_attr,
5540  const struct rte_flow_indir_action_conf *indir_action_conf,
5541  const struct rte_flow_action *action,
5542  void *user_data,
5543  struct rte_flow_error *error);
5544 
5570 __rte_experimental
5571 int
5572 rte_flow_async_action_handle_destroy(uint16_t port_id,
5573  uint32_t queue_id,
5574  const struct rte_flow_op_attr *op_attr,
5575  struct rte_flow_action_handle *action_handle,
5576  void *user_data,
5577  struct rte_flow_error *error);
5578 
5609 __rte_experimental
5610 int
5611 rte_flow_async_action_handle_update(uint16_t port_id,
5612  uint32_t queue_id,
5613  const struct rte_flow_op_attr *op_attr,
5614  struct rte_flow_action_handle *action_handle,
5615  const void *update,
5616  void *user_data,
5617  struct rte_flow_error *error);
5618 #ifdef __cplusplus
5619 }
5620 #endif
5621 
5622 #endif /* RTE_FLOW_H_ */
uint32_t reserved
Definition: rte_flow.h:136
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
Definition: rte_flow.h:1511
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:3663
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:1198
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1301
__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:993
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:4902
struct rte_ether_addr src_addr
Definition: rte_ether.h:269
struct rte_flow_action * actions
Definition: rte_flow.h:3893
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1460
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:998
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:1128
__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:1302
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
Definition: rte_flow.h:1782
uint32_t has_auth_ext
Definition: rte_flow.h:981
uint32_t nb_counters
Definition: rte_flow.h:4966
uint32_t num
Definition: rte_flow.h:710
__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:3885
uint32_t has_mobil_ext
Definition: rte_flow.h:987
uint32_t sec_since_last_hit
Definition: rte_flow.h:2957
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:2090
uint32_t original
Definition: rte_flow.h:3079
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:2191
uint32_t group
Definition: rte_flow.h:90
__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:4971
struct rte_flow_item * definition
Definition: rte_flow.h:3273
uint32_t nb_meters
Definition: rte_flow.h:4976
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:1204
rte_be16_t msg_len
Definition: rte_flow.h:1262
__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:1268
uint32_t postpone
Definition: rte_flow.h:5325
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:1021
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:1309
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:3884
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:1078
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:715
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1558
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1284
rte_flow_conntrack_state
Definition: rte_flow.h:3490
__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:1016
__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:1260
struct rte_ether_addr tla
Definition: rte_flow.h:1530
rte_flow_item_flex_field_mode
Definition: rte_flow.h:2057
rte_be16_t protocol
Definition: rte_flow.h:1156
uint32_t reserved
Definition: rte_flow.h:839
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:1918
static const struct rte_flow_item_geneve_opt rte_flow_item_geneve_opt_mask
Definition: rte_flow.h:1826
static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask
Definition: rte_flow.h:1411
rte_be16_t src_port
Definition: rte_sctp.h:29
struct rte_flow_action * actions
Definition: rte_flow.h:4331
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:952
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1681
uint32_t reserved
Definition: rte_flow.h:2953
struct rte_flow_item_flex_field * sample_data
Definition: rte_flow.h:2181
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:1486
static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask
Definition: rte_flow.h:783
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:1110
#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:813
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:688
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:1163
uint64_t rte_be64_t
const void * mask
Definition: rte_flow.h:2030
struct rte_flow_item * pattern
Definition: rte_flow.h:3889
rte_be16_t type
Definition: rte_flow.h:886
const void * cause
Definition: rte_flow.h:3869
__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:1956
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:1040
struct rte_esp_hdr hdr
Definition: rte_flow.h:1279
rte_flow_error_type
Definition: rte_flow.h:3835
uint32_t has_esp_ext
Definition: rte_flow.h:983
rte_flow_conv_op
Definition: rte_flow.h:3902
rte_be16_t src_port
Definition: rte_udp.h:29
uint32_t has_shim6_ext
Definition: rte_flow.h:991
__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:977
__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:743
const uint8_t * pattern
Definition: rte_flow.h:843
uint32_t search
Definition: rte_flow.h:838
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:1130
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:848
uint16_t limit
Definition: rte_flow.h:841
rte_flow_conntrack_tcp_last_index
Definition: rte_flow.h:3508
__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:1569
uint32_t max_nb_queues
Definition: rte_flow.h:4892
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:1183
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1433
__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:3796
const char * message
Definition: rte_flow.h:3870
rte_eth_hash_function
Definition: rte_flow.h:2998
uint32_t close_initiated
Definition: rte_flow.h:3530
uint16_t length
Definition: rte_flow.h:842
const void * last
Definition: rte_flow.h:2029
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1536
rte_be32_t teid
Definition: rte_flow.h:1263
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
uint32_t ingress
Definition: rte_flow.h:104
rte_be16_t tci
Definition: rte_flow.h:926
rte_be32_t vx_vni
Definition: rte_vxlan.h:35
uint32_t max_nb_meters
Definition: rte_flow.h:4907
__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:957
size_t size
Definition: rte_flow.h:4328
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:1155
static const struct rte_flow_item_ppp rte_flow_item_ppp_mask
Definition: rte_flow.h:1984
const uint8_t * pattern
Definition: rte_flow.h:2052
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1575
rte_be16_t length
Definition: rte_flow.h:1592
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:3892
uint32_t has_vlan
Definition: rte_flow.h:890
uint32_t has_more_vlan
Definition: rte_flow.h:932
struct rte_flow_item * items
Definition: rte_flow.h:4330
__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:2230
struct rte_ether_addr sla
Definition: rte_flow.h:1505
struct rte_flow_item_flex_link * output_link
Definition: rte_flow.h:2199
__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:3732
uint32_t has_hop_ext
Definition: rte_flow.h:975
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:1651
rte_color
Definition: rte_meter.h:36
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1736
const void * spec
Definition: rte_flow.h:2028
uint8_t label_tc_s[3]
Definition: rte_flow.h:1177
uint8_t version_type
Definition: rte_flow.h:1589
#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:3058
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1354
uint32_t has_hip_ext
Definition: rte_flow.h:989
const struct rte_flow_action * actions
Definition: rte_flow.h:3826
__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:2956
rte_be16_t vlan_tci
Definition: rte_ether.h:285
struct rte_ether_addr sha
Definition: rte_flow.h:1345
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:896
rte_flow_op_status
Definition: rte_flow.h:5447
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:1937
__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:979
uint32_t reserved
Definition: rte_flow.h:3080
__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:1760
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1634
uint32_t priority
Definition: rte_flow.h:91
uint32_t has_dest_ext
Definition: rte_flow.h:985
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1379
static const struct rte_flow_item_vf rte_flow_item_vf_mask
Definition: rte_flow.h:748
uint32_t max_nb_counters
Definition: rte_flow.h:4897
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:973
static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask
Definition: rte_flow.h:1802
__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:1199
uint32_t queue_num
Definition: rte_flow.h:3057
uint8_t tni[3]
Definition: rte_flow.h:1157
struct rte_tcp_hdr hdr
Definition: rte_flow.h:1054
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1614
uint32_t transfer
Definition: rte_flow.h:135
struct rte_flow_item * definition
Definition: rte_flow.h:3307
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:938
uint8_t msg_type
Definition: rte_flow.h:1261
uint32_t reserved
Definition: rte_flow.h:933
uint32_t egress
Definition: rte_flow.h:117
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
Definition: rte_flow.h:1138
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:4074
__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:1059
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1243
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:61
rte_be16_t inner_type
Definition: rte_flow.h:927
__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:1035
__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:3059
rte_flow_item_type
Definition: rte_flow.h:155
__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:837
int32_t offset
Definition: rte_flow.h:840
rte_be16_t inner_type
Definition: rte_flow.h:1133
__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:2050
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:3888
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1329
rte_be16_t session_id
Definition: rte_flow.h:1591
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1710
__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:1073
uint32_t reserved
Definition: rte_flow.h:891