DPDK  22.03.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_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 
3693 };
3694 
3702  enum rte_flow_field_id field;
3703  RTE_STD_C11
3704  union {
3705  struct {
3707  uint32_t level;
3709  uint32_t offset;
3710  };
3717  uint8_t value[16];
3723  void *pvalue;
3724  };
3725 };
3726 
3734 };
3735 
3747  enum rte_flow_modify_op operation;
3750  uint32_t width;
3751 };
3752 
3753 /* Mbuf dynamic field offset for metadata. */
3754 extern int32_t rte_flow_dynf_metadata_offs;
3755 
3756 /* Mbuf dynamic field flag mask for metadata. */
3757 extern uint64_t rte_flow_dynf_metadata_mask;
3758 
3759 /* Mbuf dynamic field pointer for metadata. */
3760 #define RTE_FLOW_DYNF_METADATA(m) \
3761  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
3762 
3763 /* Mbuf dynamic flags for metadata. */
3764 #define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask)
3765 #define PKT_RX_DYNF_METADATA RTE_DEPRECATED(PKT_RX_DYNF_METADATA) \
3766  RTE_MBUF_DYNFLAG_RX_METADATA
3767 #define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask)
3768 #define PKT_TX_DYNF_METADATA RTE_DEPRECATED(PKT_TX_DYNF_METADATA) \
3769  RTE_MBUF_DYNFLAG_TX_METADATA
3770 
3771 __rte_experimental
3772 static inline uint32_t
3773 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
3774 {
3775  return *RTE_FLOW_DYNF_METADATA(m);
3776 }
3777 
3778 __rte_experimental
3779 static inline void
3780 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
3781 {
3782  *RTE_FLOW_DYNF_METADATA(m) = v;
3783 }
3784 
3794  const void *conf;
3795 };
3796 
3803 struct rte_flow;
3804 
3822  uint32_t ratio;
3824  const struct rte_flow_action *actions;
3825 };
3826 
3852 };
3853 
3867  const void *cause;
3868  const char *message;
3869 };
3870 
3881  union {
3882  const struct rte_flow_attr *attr_ro;
3884  };
3885  union {
3886  const struct rte_flow_item *pattern_ro;
3888  };
3889  union {
3890  const struct rte_flow_action *actions_ro;
3892  };
3893 };
3894 
3907 
3919 
3931 
3943 
3956 
3969 
3982 
3996 
4010 
4024 
4038 };
4039 
4059 __rte_experimental
4060 int
4061 rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow,
4062  FILE *file, struct rte_flow_error *error);
4063 
4070 __rte_experimental
4071 static inline int
4073 {
4074  return !!rte_flow_dynf_metadata_mask;
4075 }
4076 
4087 __rte_experimental
4088 int
4090 
4143 int
4144 rte_flow_validate(uint16_t port_id,
4145  const struct rte_flow_attr *attr,
4146  const struct rte_flow_item pattern[],
4147  const struct rte_flow_action actions[],
4148  struct rte_flow_error *error);
4149 
4170 struct rte_flow *
4171 rte_flow_create(uint16_t port_id,
4172  const struct rte_flow_attr *attr,
4173  const struct rte_flow_item pattern[],
4174  const struct rte_flow_action actions[],
4175  struct rte_flow_error *error);
4176 
4197 int
4198 rte_flow_destroy(uint16_t port_id,
4199  struct rte_flow *flow,
4200  struct rte_flow_error *error);
4201 
4218 int
4219 rte_flow_flush(uint16_t port_id,
4220  struct rte_flow_error *error);
4221 
4246 int
4247 rte_flow_query(uint16_t port_id,
4248  struct rte_flow *flow,
4249  const struct rte_flow_action *action,
4250  void *data,
4251  struct rte_flow_error *error);
4252 
4294 int
4295 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
4296 
4314 int
4315 rte_flow_error_set(struct rte_flow_error *error,
4316  int code,
4317  enum rte_flow_error_type type,
4318  const void *cause,
4319  const char *message);
4320 
4326  size_t size;
4327  struct rte_flow_attr attr;
4330  uint8_t data[];
4331 };
4332 
4359 __rte_deprecated
4360 size_t
4361 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
4362  const struct rte_flow_attr *attr,
4363  const struct rte_flow_item *items,
4364  const struct rte_flow_action *actions);
4365 
4406 __rte_experimental
4407 int
4409  void *dst,
4410  size_t size,
4411  const void *src,
4412  struct rte_flow_error *error);
4413 
4442 __rte_experimental
4443 int
4444 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
4445  uint32_t nb_contexts, struct rte_flow_error *error);
4446 
4458  uint32_t ingress:1;
4460  uint32_t egress:1;
4465  uint32_t transfer:1;
4466 };
4467 
4495 __rte_experimental
4496 struct rte_flow_action_handle *
4497 rte_flow_action_handle_create(uint16_t port_id,
4498  const struct rte_flow_indir_action_conf *conf,
4499  const struct rte_flow_action *action,
4500  struct rte_flow_error *error);
4501 
4524 __rte_experimental
4525 int
4526 rte_flow_action_handle_destroy(uint16_t port_id,
4527  struct rte_flow_action_handle *handle,
4528  struct rte_flow_error *error);
4529 
4563 __rte_experimental
4564 int
4565 rte_flow_action_handle_update(uint16_t port_id,
4566  struct rte_flow_action_handle *handle,
4567  const void *update,
4568  struct rte_flow_error *error);
4569 
4595 __rte_experimental
4596 int
4597 rte_flow_action_handle_query(uint16_t port_id,
4598  const struct rte_flow_action_handle *handle,
4599  void *data, struct rte_flow_error *error);
4600 
4601 /* Tunnel has a type and the key information. */
4602 struct rte_flow_tunnel {
4607  enum rte_flow_item_type type;
4608  uint64_t tun_id;
4610  RTE_STD_C11
4611  union {
4612  struct {
4615  } ipv4;
4616  struct {
4617  uint8_t src_addr[16];
4618  uint8_t dst_addr[16];
4619  } ipv6;
4620  };
4621  rte_be16_t tp_src;
4622  rte_be16_t tp_dst;
4623  uint16_t tun_flags;
4625  bool is_ipv6;
4631  uint8_t tos;
4632  uint8_t ttl;
4633  uint32_t label;
4634 };
4635 
4639 #define RTE_FLOW_RESTORE_INFO_TUNNEL RTE_BIT64(0)
4640 
4644 #define RTE_FLOW_RESTORE_INFO_ENCAPSULATED RTE_BIT64(1)
4645 
4649 #define RTE_FLOW_RESTORE_INFO_GROUP_ID RTE_BIT64(2)
4650 
4661  uint64_t flags;
4662  uint32_t group_id;
4663  struct rte_flow_tunnel tunnel;
4664 };
4665 
4689 __rte_experimental
4690 int
4691 rte_flow_tunnel_decap_set(uint16_t port_id,
4692  struct rte_flow_tunnel *tunnel,
4693  struct rte_flow_action **actions,
4694  uint32_t *num_of_actions,
4695  struct rte_flow_error *error);
4696 
4720 __rte_experimental
4721 int
4722 rte_flow_tunnel_match(uint16_t port_id,
4723  struct rte_flow_tunnel *tunnel,
4724  struct rte_flow_item **items,
4725  uint32_t *num_of_items,
4726  struct rte_flow_error *error);
4727 
4748 __rte_experimental
4749 int
4750 rte_flow_get_restore_info(uint16_t port_id,
4751  struct rte_mbuf *m,
4752  struct rte_flow_restore_info *info,
4753  struct rte_flow_error *error);
4754 
4771 __rte_experimental
4772 int
4773 rte_flow_tunnel_action_decap_release(uint16_t port_id,
4774  struct rte_flow_action *actions,
4775  uint32_t num_of_actions,
4776  struct rte_flow_error *error);
4777 
4794 __rte_experimental
4795 int
4796 rte_flow_tunnel_item_release(uint16_t port_id,
4797  struct rte_flow_item *items,
4798  uint32_t num_of_items,
4799  struct rte_flow_error *error);
4800 
4829 __rte_experimental
4830 int
4831 rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
4832  struct rte_flow_error *error);
4833 
4852 __rte_experimental
4853 struct rte_flow_item_flex_handle *
4854 rte_flow_flex_item_create(uint16_t port_id,
4855  const struct rte_flow_item_flex_conf *conf,
4856  struct rte_flow_error *error);
4857 
4872 __rte_experimental
4873 int
4874 rte_flow_flex_item_release(uint16_t port_id,
4875  const struct rte_flow_item_flex_handle *handle,
4876  struct rte_flow_error *error);
4877 
4890  uint32_t max_nb_queues;
4905  uint32_t max_nb_meters;
4906 };
4907 
4920  uint32_t max_size;
4921 };
4922 
4944 __rte_experimental
4945 int
4946 rte_flow_info_get(uint16_t port_id,
4947  struct rte_flow_port_info *port_info,
4948  struct rte_flow_queue_info *queue_info,
4949  struct rte_flow_error *error);
4950 
4964  uint32_t nb_counters;
4974  uint32_t nb_meters;
4975 };
4976 
4989  uint32_t size;
4990 };
4991 
5023 __rte_experimental
5024 int
5025 rte_flow_configure(uint16_t port_id,
5026  const struct rte_flow_port_attr *port_attr,
5027  uint16_t nb_queue,
5028  const struct rte_flow_queue_attr *queue_attr[],
5029  struct rte_flow_error *error);
5030 
5035 struct rte_flow_pattern_template;
5036 
5043 __extension__
5052  uint32_t relaxed_matching:1;
5058  uint32_t ingress:1;
5060  uint32_t egress:1;
5062  uint32_t transfer:1;
5063 };
5064 
5092 __rte_experimental
5093 struct rte_flow_pattern_template *
5094 rte_flow_pattern_template_create(uint16_t port_id,
5095  const struct rte_flow_pattern_template_attr *template_attr,
5096  const struct rte_flow_item pattern[],
5097  struct rte_flow_error *error);
5098 
5119 __rte_experimental
5120 int
5121 rte_flow_pattern_template_destroy(uint16_t port_id,
5122  struct rte_flow_pattern_template *pattern_template,
5123  struct rte_flow_error *error);
5124 
5129 struct rte_flow_actions_template;
5130 
5137 __extension__
5144  uint32_t ingress:1;
5146  uint32_t egress:1;
5148  uint32_t transfer:1;
5149 };
5150 
5186 __rte_experimental
5187 struct rte_flow_actions_template *
5188 rte_flow_actions_template_create(uint16_t port_id,
5189  const struct rte_flow_actions_template_attr *template_attr,
5190  const struct rte_flow_action actions[],
5191  const struct rte_flow_action masks[],
5192  struct rte_flow_error *error);
5193 
5214 __rte_experimental
5215 int
5216 rte_flow_actions_template_destroy(uint16_t port_id,
5217  struct rte_flow_actions_template *actions_template,
5218  struct rte_flow_error *error);
5219 
5224 struct rte_flow_template_table;
5225 
5236  struct rte_flow_attr flow_attr;
5240  uint32_t nb_flows;
5241 };
5242 
5275 __rte_experimental
5276 struct rte_flow_template_table *
5277 rte_flow_template_table_create(uint16_t port_id,
5278  const struct rte_flow_template_table_attr *table_attr,
5279  struct rte_flow_pattern_template *pattern_templates[],
5280  uint8_t nb_pattern_templates,
5281  struct rte_flow_actions_template *actions_templates[],
5282  uint8_t nb_actions_templates,
5283  struct rte_flow_error *error);
5284 
5305 __rte_experimental
5306 int
5307 rte_flow_template_table_destroy(uint16_t port_id,
5308  struct rte_flow_template_table *template_table,
5309  struct rte_flow_error *error);
5310 
5317 __extension__
5323  uint32_t postpone:1;
5324 };
5325 
5362 __rte_experimental
5363 struct rte_flow *
5364 rte_flow_async_create(uint16_t port_id,
5365  uint32_t queue_id,
5366  const struct rte_flow_op_attr *op_attr,
5367  struct rte_flow_template_table *template_table,
5368  const struct rte_flow_item pattern[],
5369  uint8_t pattern_template_index,
5370  const struct rte_flow_action actions[],
5371  uint8_t actions_template_index,
5372  void *user_data,
5373  struct rte_flow_error *error);
5374 
5404 __rte_experimental
5405 int
5406 rte_flow_async_destroy(uint16_t port_id,
5407  uint32_t queue_id,
5408  const struct rte_flow_op_attr *op_attr,
5409  struct rte_flow *flow,
5410  void *user_data,
5411  struct rte_flow_error *error);
5412 
5433 __rte_experimental
5434 int
5435 rte_flow_push(uint16_t port_id,
5436  uint32_t queue_id,
5437  struct rte_flow_error *error);
5438 
5454 };
5455 
5462 __extension__
5467  enum rte_flow_op_status status;
5471  void *user_data;
5472 };
5473 
5499 __rte_experimental
5500 int
5501 rte_flow_pull(uint16_t port_id,
5502  uint32_t queue_id,
5503  struct rte_flow_op_result res[],
5504  uint16_t n_res,
5505  struct rte_flow_error *error);
5506 
5533 __rte_experimental
5534 struct rte_flow_action_handle *
5535 rte_flow_async_action_handle_create(uint16_t port_id,
5536  uint32_t queue_id,
5537  const struct rte_flow_op_attr *op_attr,
5538  const struct rte_flow_indir_action_conf *indir_action_conf,
5539  const struct rte_flow_action *action,
5540  void *user_data,
5541  struct rte_flow_error *error);
5542 
5568 __rte_experimental
5569 int
5570 rte_flow_async_action_handle_destroy(uint16_t port_id,
5571  uint32_t queue_id,
5572  const struct rte_flow_op_attr *op_attr,
5573  struct rte_flow_action_handle *action_handle,
5574  void *user_data,
5575  struct rte_flow_error *error);
5576 
5607 __rte_experimental
5608 int
5609 rte_flow_async_action_handle_update(uint16_t port_id,
5610  uint32_t queue_id,
5611  const struct rte_flow_op_attr *op_attr,
5612  struct rte_flow_action_handle *action_handle,
5613  const void *update,
5614  void *user_data,
5615  struct rte_flow_error *error);
5616 #ifdef __cplusplus
5617 }
5618 #endif
5619 
5620 #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:4900
struct rte_ether_addr src_addr
Definition: rte_ether.h:269
struct rte_flow_action * actions
Definition: rte_flow.h:3891
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:4964
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:3883
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:4969
struct rte_flow_item * definition
Definition: rte_flow.h:3273
uint32_t nb_meters
Definition: rte_flow.h:4974
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:5323
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:3882
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:4329
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:530
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:3887
rte_be16_t type
Definition: rte_flow.h:886
const void * cause
Definition: rte_flow.h:3867
__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:3833
uint32_t has_esp_ext
Definition: rte_flow.h:983
rte_flow_conv_op
Definition: rte_flow.h:3900
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:4890
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:3794
const char * message
Definition: rte_flow.h:3868
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:4905
__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:4326
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:3890
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:4328
__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:3730
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:3824
__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:5445
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:4895
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:4072
__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:3886
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