DPDK  22.11.10
rte_flow.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2016 6WIND S.A.
3  * Copyright 2016 Mellanox Technologies, Ltd
4  */
5 
6 #ifndef RTE_FLOW_H_
7 #define RTE_FLOW_H_
8 
17 #include <stddef.h>
18 #include <stdint.h>
19 
20 #include <rte_compat.h>
21 #include <rte_common.h>
22 #include <rte_ether.h>
23 #include <rte_icmp.h>
24 #include <rte_ip.h>
25 #include <rte_sctp.h>
26 #include <rte_tcp.h>
27 #include <rte_udp.h>
28 #include <rte_vxlan.h>
29 #include <rte_esp.h>
30 #include <rte_higig.h>
31 #include <rte_ecpri.h>
32 #include <rte_bitops.h>
33 #include <rte_mbuf_dyn.h>
34 #include <rte_meter.h>
35 #include <rte_gtp.h>
36 #include <rte_l2tpv2.h>
37 #include <rte_ppp.h>
38 #include <rte_gre.h>
39 #include <rte_macsec.h>
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 #define RTE_FLOW_LOG(level, ...) \
46  rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, "" __VA_ARGS__)
47 
88 struct rte_flow_attr {
89  uint32_t group;
90  uint32_t priority;
94  uint32_t ingress:1;
98  uint32_t egress:1;
116  uint32_t transfer:1;
117  uint32_t reserved:29;
118 };
119 
146 
156 
166 
174 
188 
195 
202 
209 
216 
223 
230 
237 
244 
251 
258 
265 
272 
279 
286 
298 
307 
316 
325 
332 
339 
346 
353 
360 
367 
374 
381 
388 
396 
404 
411 
420 
433 
442 
451 
460 
469 
476 
483 
490 
496 
505 
514 
521 
530 
537 
544 
555 
564 
573 
583 
592 
599 
606 
613 
620 
627 };
628 
636  struct rte_higig2_hdr hdr;
637 };
638 
640 #ifndef __cplusplus
642  .hdr = {
643  .ppt1 = {
644  .classification = 0xffff,
645  .vid = 0xfff,
646  },
647  },
648 };
649 #endif
650 
663  uint32_t num;
664 };
665 
667 #ifndef __cplusplus
669  .num = 0x00000000,
670 };
671 #endif
672 
688  uint32_t id;
689 };
690 
692 #ifndef __cplusplus
694  .id = 0xffffffff,
695 };
696 #endif
697 
717  uint32_t relative:1;
718  uint32_t search:1;
719  uint32_t reserved:30;
720  int32_t offset;
721  uint16_t limit;
722  uint16_t length;
723  const uint8_t *pattern;
724 };
725 
727 #ifndef __cplusplus
729  .relative = 1,
730  .search = 1,
731  .reserved = 0x3fffffff,
732  .offset = 0xffffffff,
733  .limit = 0xffff,
734  .length = 0xffff,
735  .pattern = NULL,
736 };
737 #endif
738 
758  union {
759  struct {
760  /*
761  * These fields are retained for compatibility.
762  * Please switch to the new header field below.
763  */
767  };
768  struct rte_ether_hdr hdr;
769  };
770  uint32_t has_vlan:1;
771  uint32_t reserved:31;
772 };
773 
775 #ifndef __cplusplus
777  .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
778  .hdr.src_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
779  .hdr.ether_type = RTE_BE16(0x0000),
780 };
781 #endif
782 
800  union {
801  struct {
802  /*
803  * These fields are retained for compatibility.
804  * Please switch to the new header field below.
805  */
808  };
809  struct rte_vlan_hdr hdr;
810  };
812  uint32_t has_more_vlan:1;
813  uint32_t reserved:31;
814 };
815 
817 #ifndef __cplusplus
819  .hdr.vlan_tci = RTE_BE16(0x0fff),
820  .hdr.eth_proto = RTE_BE16(0x0000),
821 };
822 #endif
823 
832  struct rte_ipv4_hdr hdr;
833 };
834 
836 #ifndef __cplusplus
838  .hdr = {
839  .src_addr = RTE_BE32(0xffffffff),
840  .dst_addr = RTE_BE32(0xffffffff),
841  },
842 };
843 #endif
844 
853  struct rte_ipv6_hdr hdr;
855  uint32_t has_hop_ext:1;
857  uint32_t has_route_ext:1;
859  uint32_t has_frag_ext:1;
861  uint32_t has_auth_ext:1;
863  uint32_t has_esp_ext:1;
865  uint32_t has_dest_ext:1;
867  uint32_t has_mobil_ext:1;
869  uint32_t has_hip_ext:1;
871  uint32_t has_shim6_ext:1;
873  uint32_t reserved:23;
874 };
875 
877 #ifndef __cplusplus
879  .hdr = {
880  .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
881  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
882  .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
883  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
884  },
885 };
886 #endif
887 
894  struct rte_icmp_hdr hdr;
895 };
896 
898 #ifndef __cplusplus
900  .hdr = {
901  .icmp_type = 0xff,
902  .icmp_code = 0xff,
903  },
904 };
905 #endif
906 
913  struct rte_udp_hdr hdr;
914 };
915 
917 #ifndef __cplusplus
919  .hdr = {
920  .src_port = RTE_BE16(0xffff),
921  .dst_port = RTE_BE16(0xffff),
922  },
923 };
924 #endif
925 
932  struct rte_tcp_hdr hdr;
933 };
934 
936 #ifndef __cplusplus
938  .hdr = {
939  .src_port = RTE_BE16(0xffff),
940  .dst_port = RTE_BE16(0xffff),
941  },
942 };
943 #endif
944 
951  struct rte_sctp_hdr hdr;
952 };
953 
955 #ifndef __cplusplus
957  .hdr = {
958  .src_port = RTE_BE16(0xffff),
959  .dst_port = RTE_BE16(0xffff),
960  },
961 };
962 #endif
963 
971  union {
972  struct {
973  /*
974  * These fields are retained for compatibility.
975  * Please switch to the new header field below.
976  */
977  uint8_t flags;
978  uint8_t rsvd0[3];
979  uint8_t vni[3];
980  uint8_t rsvd1;
981  };
982  struct rte_vxlan_hdr hdr;
983  };
984 };
985 
987 #ifndef __cplusplus
989  .hdr.vx_vni = RTE_BE32(0xffffff00), /* (0xffffff << 8) */
990 };
991 #endif
992 
1009  uint8_t in_ecid_e;
1010  uint8_t ecid_e;
1012 };
1013 
1015 #ifndef __cplusplus
1017  .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
1018 };
1019 #endif
1020 
1035  uint8_t tni[3];
1036  uint8_t flow_id;
1037 };
1038 
1040 #ifndef __cplusplus
1042  .tni = { 0xff, 0xff, 0xff },
1043 };
1044 #endif
1045 
1055  uint8_t label_tc_s[3];
1056  uint8_t ttl;
1057 };
1058 
1060 #ifndef __cplusplus
1062  .label_tc_s = { 0xff, 0xff, 0xf0 },
1063 };
1064 #endif
1065 
1078 };
1079 
1081 #ifndef __cplusplus
1083  .protocol = RTE_BE16(0xffff),
1084 };
1085 #endif
1086 
1093  struct rte_gre_hdr_opt_checksum_rsvd checksum_rsvd;
1094  struct rte_gre_hdr_opt_key key;
1095  struct rte_gre_hdr_opt_sequence sequence;
1096 };
1097 
1104  struct rte_macsec_hdr macsec_hdr;
1105 };
1106 
1125  uint32_t thresh;
1126 };
1127 
1129 #ifndef __cplusplus
1131  .thresh = 0xffffffff,
1132 };
1133 #endif
1134 
1148  uint8_t msg_type;
1151 };
1152 
1154 #ifndef __cplusplus
1156  .teid = RTE_BE32(0xffffffff),
1157 };
1158 #endif
1159 
1166  struct rte_esp_hdr hdr;
1167 };
1168 
1170 #ifndef __cplusplus
1172  .hdr = {
1173  .spi = RTE_BE32(0xffffffff),
1174  },
1175 };
1176 #endif
1177 
1190  uint8_t vni[3];
1191  uint8_t rsvd1;
1192 };
1193 
1195 #ifndef __cplusplus
1197  .vni = { 0xff, 0xff, 0xff },
1198 };
1199 #endif
1200 
1207  uint8_t flags;
1208  uint8_t rsvd0[2];
1209  uint8_t protocol;
1210  uint8_t vni[3];
1211  uint8_t rsvd1;
1212 };
1213 
1215 #ifndef __cplusplus
1217  .vni = { 0xff, 0xff, 0xff },
1218 };
1219 #endif
1220 
1229  uint8_t hln;
1230  uint8_t pln;
1236 };
1237 
1239 #ifndef __cplusplus
1240 static const struct rte_flow_item_arp_eth_ipv4
1242  .sha.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
1243  .spa = RTE_BE32(UINT32_MAX),
1244  .tha.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
1245  .tpa = RTE_BE32(UINT32_MAX),
1246 };
1247 #endif
1248 
1260  uint8_t next_hdr;
1261 };
1262 
1264 #ifndef __cplusplus
1265 static const
1267  .next_hdr = 0xff,
1268 };
1269 #endif
1270 
1282  struct rte_ipv6_fragment_ext hdr;
1283 };
1284 
1291  uint8_t type;
1292  uint8_t code;
1293  uint16_t checksum;
1294 };
1295 
1297 #ifndef __cplusplus
1299  .type = 0xff,
1300  .code = 0xff,
1301 };
1302 #endif
1303 
1310  uint8_t type;
1311  uint8_t code;
1314  uint8_t target_addr[16];
1315 };
1316 
1318 #ifndef __cplusplus
1319 static const
1321  .target_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1322  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
1323 };
1324 #endif
1325 
1332  uint8_t type;
1333  uint8_t code;
1340  uint8_t target_addr[16];
1341 };
1342 
1344 #ifndef __cplusplus
1345 static const
1347  .target_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1348  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
1349 };
1350 #endif
1351 
1364  uint8_t type;
1365  uint8_t length;
1366 };
1367 
1369 #ifndef __cplusplus
1370 static const struct rte_flow_item_icmp6_nd_opt
1372  .type = 0xff,
1373 };
1374 #endif
1375 
1388  uint8_t type;
1389  uint8_t length;
1391 };
1392 
1394 #ifndef __cplusplus
1395 static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1397  .sla.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
1398 };
1399 #endif
1400 
1413  uint8_t type;
1414  uint8_t length;
1416 };
1417 
1419 #ifndef __cplusplus
1420 static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1422  .tla.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
1423 };
1424 #endif
1425 
1438  uint32_t data;
1439 };
1440 
1442 #ifndef __cplusplus
1444  .data = UINT32_MAX,
1445 };
1446 #endif
1447 
1455 };
1456 
1458 #ifndef __cplusplus
1459 static const struct rte_flow_item_gtp_psc
1461  .hdr.qfi = 0x3f,
1462 };
1463 #endif
1464 
1474  uint8_t version_type;
1475  uint8_t code;
1478 };
1479 
1494 };
1495 
1497 #ifndef __cplusplus
1498 static const struct rte_flow_item_pppoe_proto_id
1500  .proto_id = RTE_BE16(0xffff),
1501 };
1502 #endif
1503 
1513  uint32_t data;
1514  uint8_t index;
1515 };
1516 
1518 #ifndef __cplusplus
1520  .data = 0xffffffff,
1521  .index = 0xff,
1522 };
1523 #endif
1524 
1532 };
1533 
1535 #ifndef __cplusplus
1537  .session_id = RTE_BE32(UINT32_MAX),
1538 };
1539 #endif
1540 
1541 
1561  uint32_t id;
1562 };
1563 
1565 #ifndef __cplusplus
1567  .id = 0xffffffff,
1568 };
1569 #endif
1570 
1581  uint32_t version:2;
1582  uint32_t oam_pkt:1;
1583  uint32_t reserved:1;
1584  uint32_t ttl:6;
1585  uint32_t length:6;
1586  uint32_t reserved1:4;
1587  uint32_t mdtype:4;
1588  uint32_t next_proto:8;
1589  uint32_t spi:24;
1590  uint32_t sindex:8;
1591 };
1592 
1594 #ifndef __cplusplus
1596  .mdtype = 0xf,
1597  .next_proto = 0xff,
1598  .spi = 0xffffff,
1599  .sindex = 0xff,
1600 };
1601 #endif
1602 
1613  uint32_t type:8;
1614  uint32_t max_resp_time:8;
1615  uint32_t checksum:16;
1616  uint32_t group_addr;
1617 };
1618 
1620 #ifndef __cplusplus
1622  .group_addr = 0xffffffff,
1623 };
1624 #endif
1625 
1636  uint32_t next_hdr:8;
1637  uint32_t payload_len:8;
1638  uint32_t reserved:16;
1639  uint32_t spi;
1640  uint32_t seq_num;
1641 };
1642 
1644 #ifndef __cplusplus
1646  .spi = 0xffffffff,
1647 };
1648 #endif
1649 
1659  uint8_t s_field;
1660  uint8_t msg_type;
1661  rte_be16_t msg_len;
1662  rte_be64_t seid;
1663 };
1664 
1666 #ifndef __cplusplus
1668  .s_field = 0x01,
1669  .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1670 };
1671 #endif
1672 
1682  struct rte_ecpri_combined_msg_hdr hdr;
1683 };
1684 
1686 #ifndef __cplusplus
1688  .hdr = {
1689  .common = {
1690  .u32 = 0x0,
1691  },
1692  },
1693 };
1694 #endif
1695 
1702  rte_be16_t option_class;
1703  uint8_t option_type;
1704  uint8_t option_len;
1705  uint32_t *data;
1706 };
1707 
1709 #ifndef __cplusplus
1710 static const struct rte_flow_item_geneve_opt
1712  .option_type = 0xff,
1713 };
1714 #endif
1715 
1728  uint32_t level;
1729  RTE_STD_C11
1730  union {
1731  __extension__
1732  struct {
1734  uint64_t packet_ok:1;
1736  uint64_t l2_ok:1;
1738  uint64_t l3_ok:1;
1740  uint64_t l4_ok:1;
1742  uint64_t l2_crc_ok:1;
1744  uint64_t ipv4_csum_ok:1;
1746  uint64_t l4_csum_ok:1;
1748  uint64_t l3_len_ok:1;
1749  uint64_t reserved:56;
1750  };
1751  uint64_t value;
1752  };
1753 };
1754 
1755 #ifndef __cplusplus
1756 static const struct rte_flow_item_integrity
1757 rte_flow_item_integrity_mask = {
1758  .level = 0,
1759  .value = 0,
1760 };
1761 #endif
1762 
1766 #define RTE_FLOW_CONNTRACK_PKT_STATE_VALID RTE_BIT32(0)
1767 
1770 #define RTE_FLOW_CONNTRACK_PKT_STATE_CHANGED RTE_BIT32(1)
1771 
1775 #define RTE_FLOW_CONNTRACK_PKT_STATE_INVALID RTE_BIT32(2)
1776 
1780 #define RTE_FLOW_CONNTRACK_PKT_STATE_DISABLED RTE_BIT32(3)
1781 
1785 #define RTE_FLOW_CONNTRACK_PKT_STATE_BAD RTE_BIT32(4)
1786 
1798  uint32_t flags;
1799 };
1800 
1802 #ifndef __cplusplus
1804  .flags = 0xffffffff,
1805 };
1806 #endif
1807 
1814  uint16_t port_id;
1815 };
1816 
1818 #ifndef __cplusplus
1820  .port_id = 0xffff,
1821 };
1822 #endif
1823 
1833  struct rte_l2tpv2_combined_msg_hdr hdr;
1834 };
1835 
1837 #ifndef __cplusplus
1839  /*
1840  * flags and version bit mask
1841  * 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
1842  * T L x x S x O P x x x x V V V V
1843  */
1844  .hdr = {
1845  .common = {
1846  .flags_version = RTE_BE16(0xcb0f),
1847  },
1848  },
1849 };
1850 #endif
1851 
1861  struct rte_ppp_hdr hdr;
1862 };
1863 
1865 #ifndef __cplusplus
1867  .hdr = {
1868  .addr = 0xff,
1869  .ctrl = 0xff,
1870  .proto_id = RTE_BE16(0xffff),
1871  }
1872 };
1873 #endif
1874 
1910  const void *spec;
1911  const void *last;
1912  const void *mask;
1913 };
1914 
1932  struct rte_flow_item_flex_handle *handle;
1933  uint32_t length;
1934  const uint8_t *pattern;
1935 };
1967 };
1968 
1998 };
1999 
2005 __extension__
2009  uint32_t field_size;
2010  int32_t field_base;
2011  uint32_t offset_base;
2012  uint32_t offset_mask;
2013  int32_t offset_shift;
2014  uint32_t field_id:16;
2015  uint32_t reserved:16;
2016 };
2017 
2033  uint32_t next;
2034 };
2035 
2065  uint32_t nb_samples;
2075  uint32_t nb_inputs;
2083  uint32_t nb_outputs;
2084 };
2085 
2093 };
2094 
2096 #ifndef __cplusplus
2098  .color = RTE_COLORS,
2099 };
2100 #endif
2101 
2136 
2144 
2152 
2161 
2173 
2185 
2192 
2201 
2212 
2221 
2233 
2245 
2256 
2264 
2272 
2283 
2291 
2299 
2307 
2315 
2323 
2331 
2339 
2348 
2356 
2365 
2372 
2379 
2392 
2405 
2418 
2431 
2445 
2459 
2470 
2480 
2490 
2503 
2516 
2533 
2550 
2567 
2584 
2597 
2607 
2620 
2633 
2646 
2654 
2665 
2676 
2684 
2693 
2701 
2708 
2716 
2724 
2735 };
2736 
2748  uint32_t id;
2749 };
2750 
2764  uint32_t group;
2765 };
2766 
2773  uint16_t index;
2774 };
2775 
2790  uint32_t timeout:24;
2791  uint32_t reserved:8;
2793  void *context;
2794 };
2795 
2803  uint32_t reserved:6;
2804  uint32_t aged:1;
2807  uint32_t sec_since_last_hit:24;
2808 };
2809 
2830  uint32_t reserved:6;
2831  uint32_t timeout_valid:1;
2832  uint32_t timeout:24;
2834  uint32_t touch:1;
2835 };
2836 
2855  uint32_t id;
2856 };
2857 
2864  uint32_t reset:1;
2865  uint32_t hits_set:1;
2866  uint32_t bytes_set:1;
2867  uint32_t reserved:29;
2868  uint64_t hits;
2869  uint64_t bytes;
2870 };
2871 
2876  RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
2885  RTE_ETH_HASH_FUNCTION_MAX,
2886 };
2887 
2931  uint32_t level;
2932  uint64_t types;
2933  uint32_t key_len;
2934  uint32_t queue_num;
2935  const uint8_t *key;
2936  const uint16_t *queue;
2937 };
2938 
2956  uint32_t original:1;
2957  uint32_t reserved:31;
2958  uint32_t id;
2959 };
2960 
2973  uint32_t original:1;
2974  uint32_t reserved:31;
2975  uint32_t id;
2976 };
2977 
2987  uint32_t mtr_id;
2988 };
2989 
3022 };
3023 
3032 };
3033 
3042 };
3043 
3051  uint8_t vlan_pcp;
3052 };
3053 
3062 };
3063 
3072 };
3073 
3107 };
3108 
3141 };
3142 
3163  uint8_t *data;
3164  uint8_t *preserve;
3165  size_t size;
3166 };
3167 
3184  uint8_t *data;
3185  size_t size;
3186 };
3187 
3200  rte_be32_t ipv4_addr;
3201 };
3202 
3215  uint8_t ipv6_addr[16];
3216 };
3217 
3230  rte_be16_t port;
3231 };
3232 
3239  uint8_t ttl_value;
3240 };
3241 
3248  uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
3249 };
3250 
3261  uint32_t data;
3262  uint32_t mask;
3263  uint8_t index;
3264 };
3265 
3286  uint32_t data;
3287  uint32_t mask;
3288 };
3289 
3298  uint8_t dscp;
3299 };
3300 
3318 struct rte_flow_action_handle;
3319 
3336 };
3337 
3348 };
3349 
3361  uint32_t scale:4;
3363  uint32_t close_initiated:1;
3365  uint32_t last_ack_seen:1;
3370  uint32_t data_unacked:1;
3375  uint32_t sent_end;
3380  uint32_t reply_end;
3382  uint32_t max_win;
3384  uint32_t max_ack;
3385 };
3386 
3399  uint16_t peer_port;
3404  uint32_t is_original_dir:1;
3412  uint32_t enable:1;
3414  uint32_t live_connection:1;
3416  uint32_t selective_ack:1;
3423  uint32_t last_direction:1;
3425  uint32_t liberal_mode:1;
3437  uint16_t last_window;
3438  enum rte_flow_conntrack_tcp_last_index last_index;
3440  uint32_t last_seq;
3442  uint32_t last_ack;
3447  uint32_t last_end;
3448 };
3449 
3461  uint32_t direction:1;
3463  uint32_t state:1;
3465  uint32_t reserved:30;
3466 };
3467 
3479 };
3480 
3487  uint16_t port_id;
3488 };
3489 
3527 };
3528 
3537  RTE_STD_C11
3538  union {
3539  struct {
3541  uint32_t level;
3543  uint32_t offset;
3544  };
3551  uint8_t value[16];
3557  void *pvalue;
3558  };
3559 };
3560 
3568 };
3569 
3584  uint32_t width;
3585 };
3586 
3599 
3601  struct rte_flow_meter_profile *profile;
3603  struct rte_flow_meter_policy *policy;
3609  int state;
3610 };
3611 
3622  uint32_t profile_valid:1;
3624  uint32_t policy_valid:1;
3626  uint32_t color_mode_valid:1;
3628  uint32_t init_color_valid:1;
3630  uint32_t state_valid:1;
3632  uint32_t reserved:27;
3633 };
3634 
3635 /* Mbuf dynamic field offset for metadata. */
3636 extern int32_t rte_flow_dynf_metadata_offs;
3637 
3638 /* Mbuf dynamic field flag mask for metadata. */
3639 extern uint64_t rte_flow_dynf_metadata_mask;
3640 
3641 /* Mbuf dynamic field pointer for metadata. */
3642 #define RTE_FLOW_DYNF_METADATA(m) \
3643  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
3644 
3645 /* Mbuf dynamic flags for metadata. */
3646 #define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask)
3647 #define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask)
3648 
3649 __rte_experimental
3650 static inline uint32_t
3651 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
3652 {
3653  return *RTE_FLOW_DYNF_METADATA(m);
3654 }
3655 
3656 __rte_experimental
3657 static inline void
3658 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
3659 {
3660  *RTE_FLOW_DYNF_METADATA(m) = v;
3661 }
3662 
3672  const void *conf;
3673 };
3674 
3681 struct rte_flow;
3682 
3688 struct rte_flow_meter_profile;
3689 
3695 struct rte_flow_meter_policy;
3696 
3714  uint32_t ratio;
3716  const struct rte_flow_action *actions;
3717 };
3718 
3744 };
3745 
3759  const void *cause;
3760  const char *message;
3761 };
3762 
3773  union {
3774  const struct rte_flow_attr *attr_ro;
3776  };
3777  union {
3778  const struct rte_flow_item *pattern_ro;
3780  };
3781  union {
3782  const struct rte_flow_action *actions_ro;
3784  };
3785 };
3786 
3799 
3811 
3823 
3835 
3848 
3861 
3874 
3888 
3902 
3916 
3930 };
3931 
3951 __rte_experimental
3952 int
3953 rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow,
3954  FILE *file, struct rte_flow_error *error);
3955 
3962 __rte_experimental
3963 static inline int
3965 {
3966  return !!rte_flow_dynf_metadata_mask;
3967 }
3968 
3979 __rte_experimental
3980 int
3982 
4035 int
4036 rte_flow_validate(uint16_t port_id,
4037  const struct rte_flow_attr *attr,
4038  const struct rte_flow_item pattern[],
4039  const struct rte_flow_action actions[],
4040  struct rte_flow_error *error);
4041 
4062 struct rte_flow *
4063 rte_flow_create(uint16_t port_id,
4064  const struct rte_flow_attr *attr,
4065  const struct rte_flow_item pattern[],
4066  const struct rte_flow_action actions[],
4067  struct rte_flow_error *error);
4068 
4089 int
4090 rte_flow_destroy(uint16_t port_id,
4091  struct rte_flow *flow,
4092  struct rte_flow_error *error);
4093 
4110 int
4111 rte_flow_flush(uint16_t port_id,
4112  struct rte_flow_error *error);
4113 
4138 int
4139 rte_flow_query(uint16_t port_id,
4140  struct rte_flow *flow,
4141  const struct rte_flow_action *action,
4142  void *data,
4143  struct rte_flow_error *error);
4144 
4190 int
4191 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
4192 
4210 int
4211 rte_flow_error_set(struct rte_flow_error *error,
4212  int code,
4213  enum rte_flow_error_type type,
4214  const void *cause,
4215  const char *message);
4216 
4222  size_t size;
4226  uint8_t data[];
4227 };
4228 
4255 __rte_deprecated
4256 size_t
4257 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
4258  const struct rte_flow_attr *attr,
4259  const struct rte_flow_item *items,
4260  const struct rte_flow_action *actions);
4261 
4302 __rte_experimental
4303 int
4305  void *dst,
4306  size_t size,
4307  const void *src,
4308  struct rte_flow_error *error);
4309 
4338 __rte_experimental
4339 int
4340 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
4341  uint32_t nb_contexts, struct rte_flow_error *error);
4342 
4382 __rte_experimental
4383 int
4384 rte_flow_get_q_aged_flows(uint16_t port_id, uint32_t queue_id, void **contexts,
4385  uint32_t nb_contexts, struct rte_flow_error *error);
4386 
4398  uint32_t ingress:1;
4400  uint32_t egress:1;
4405  uint32_t transfer:1;
4406 };
4407 
4435 __rte_experimental
4436 struct rte_flow_action_handle *
4437 rte_flow_action_handle_create(uint16_t port_id,
4438  const struct rte_flow_indir_action_conf *conf,
4439  const struct rte_flow_action *action,
4440  struct rte_flow_error *error);
4441 
4464 __rte_experimental
4465 int
4466 rte_flow_action_handle_destroy(uint16_t port_id,
4467  struct rte_flow_action_handle *handle,
4468  struct rte_flow_error *error);
4469 
4503 __rte_experimental
4504 int
4505 rte_flow_action_handle_update(uint16_t port_id,
4506  struct rte_flow_action_handle *handle,
4507  const void *update,
4508  struct rte_flow_error *error);
4509 
4535 __rte_experimental
4536 int
4537 rte_flow_action_handle_query(uint16_t port_id,
4538  const struct rte_flow_action_handle *handle,
4539  void *data, struct rte_flow_error *error);
4540 
4541 /* Tunnel has a type and the key information. */
4542 struct rte_flow_tunnel {
4547  enum rte_flow_item_type type;
4548  uint64_t tun_id;
4550  RTE_STD_C11
4551  union {
4552  struct {
4555  } ipv4;
4556  struct {
4557  uint8_t src_addr[16];
4558  uint8_t dst_addr[16];
4559  } ipv6;
4560  };
4561  rte_be16_t tp_src;
4562  rte_be16_t tp_dst;
4563  uint16_t tun_flags;
4565  bool is_ipv6;
4571  uint8_t tos;
4572  uint8_t ttl;
4573  uint32_t label;
4574 };
4575 
4579 #define RTE_FLOW_RESTORE_INFO_TUNNEL RTE_BIT64(0)
4580 
4584 #define RTE_FLOW_RESTORE_INFO_ENCAPSULATED RTE_BIT64(1)
4585 
4589 #define RTE_FLOW_RESTORE_INFO_GROUP_ID RTE_BIT64(2)
4590 
4601  uint64_t flags;
4602  uint32_t group_id;
4603  struct rte_flow_tunnel tunnel;
4604 };
4605 
4629 __rte_experimental
4630 int
4631 rte_flow_tunnel_decap_set(uint16_t port_id,
4632  struct rte_flow_tunnel *tunnel,
4633  struct rte_flow_action **actions,
4634  uint32_t *num_of_actions,
4635  struct rte_flow_error *error);
4636 
4660 __rte_experimental
4661 int
4662 rte_flow_tunnel_match(uint16_t port_id,
4663  struct rte_flow_tunnel *tunnel,
4664  struct rte_flow_item **items,
4665  uint32_t *num_of_items,
4666  struct rte_flow_error *error);
4667 
4688 __rte_experimental
4689 int
4690 rte_flow_get_restore_info(uint16_t port_id,
4691  struct rte_mbuf *m,
4692  struct rte_flow_restore_info *info,
4693  struct rte_flow_error *error);
4694 
4711 __rte_experimental
4712 int
4713 rte_flow_tunnel_action_decap_release(uint16_t port_id,
4714  struct rte_flow_action *actions,
4715  uint32_t num_of_actions,
4716  struct rte_flow_error *error);
4717 
4734 __rte_experimental
4735 int
4736 rte_flow_tunnel_item_release(uint16_t port_id,
4737  struct rte_flow_item *items,
4738  uint32_t num_of_items,
4739  struct rte_flow_error *error);
4740 
4766 int
4767 rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
4768  struct rte_flow_error *error);
4769 
4788 __rte_experimental
4789 struct rte_flow_item_flex_handle *
4790 rte_flow_flex_item_create(uint16_t port_id,
4791  const struct rte_flow_item_flex_conf *conf,
4792  struct rte_flow_error *error);
4793 
4808 __rte_experimental
4809 int
4810 rte_flow_flex_item_release(uint16_t port_id,
4811  const struct rte_flow_item_flex_handle *handle,
4812  struct rte_flow_error *error);
4813 
4818 #define RTE_FLOW_PORT_FLAG_STRICT_QUEUE RTE_BIT32(0)
4819 
4832  uint32_t max_nb_queues;
4847  uint32_t max_nb_meters;
4857 };
4858 
4871  uint32_t max_size;
4872 };
4873 
4895 __rte_experimental
4896 int
4897 rte_flow_info_get(uint16_t port_id,
4898  struct rte_flow_port_info *port_info,
4899  struct rte_flow_queue_info *queue_info,
4900  struct rte_flow_error *error);
4901 
4915  uint32_t nb_counters;
4925  uint32_t nb_meters;
4930  uint32_t nb_conn_tracks;
4934  uint32_t flags;
4935 };
4936 
4949  uint32_t size;
4950 };
4951 
4983 __rte_experimental
4984 int
4985 rte_flow_configure(uint16_t port_id,
4986  const struct rte_flow_port_attr *port_attr,
4987  uint16_t nb_queue,
4988  const struct rte_flow_queue_attr *queue_attr[],
4989  struct rte_flow_error *error);
4990 
4995 struct rte_flow_pattern_template;
4996 
5003 __extension__
5012  uint32_t relaxed_matching:1;
5018  uint32_t ingress:1;
5020  uint32_t egress:1;
5022  uint32_t transfer:1;
5023 };
5024 
5052 __rte_experimental
5053 struct rte_flow_pattern_template *
5054 rte_flow_pattern_template_create(uint16_t port_id,
5055  const struct rte_flow_pattern_template_attr *template_attr,
5056  const struct rte_flow_item pattern[],
5057  struct rte_flow_error *error);
5058 
5079 __rte_experimental
5080 int
5081 rte_flow_pattern_template_destroy(uint16_t port_id,
5082  struct rte_flow_pattern_template *pattern_template,
5083  struct rte_flow_error *error);
5084 
5089 struct rte_flow_actions_template;
5090 
5097 __extension__
5104  uint32_t ingress:1;
5106  uint32_t egress:1;
5108  uint32_t transfer:1;
5109 };
5110 
5146 __rte_experimental
5147 struct rte_flow_actions_template *
5148 rte_flow_actions_template_create(uint16_t port_id,
5149  const struct rte_flow_actions_template_attr *template_attr,
5150  const struct rte_flow_action actions[],
5151  const struct rte_flow_action masks[],
5152  struct rte_flow_error *error);
5153 
5174 __rte_experimental
5175 int
5176 rte_flow_actions_template_destroy(uint16_t port_id,
5177  struct rte_flow_actions_template *actions_template,
5178  struct rte_flow_error *error);
5179 
5184 struct rte_flow_template_table;
5185 
5200  uint32_t nb_flows;
5201 };
5202 
5235 __rte_experimental
5236 struct rte_flow_template_table *
5237 rte_flow_template_table_create(uint16_t port_id,
5238  const struct rte_flow_template_table_attr *table_attr,
5239  struct rte_flow_pattern_template *pattern_templates[],
5240  uint8_t nb_pattern_templates,
5241  struct rte_flow_actions_template *actions_templates[],
5242  uint8_t nb_actions_templates,
5243  struct rte_flow_error *error);
5244 
5265 __rte_experimental
5266 int
5267 rte_flow_template_table_destroy(uint16_t port_id,
5268  struct rte_flow_template_table *template_table,
5269  struct rte_flow_error *error);
5270 
5277 __extension__
5283  uint32_t postpone:1;
5284 };
5285 
5322 __rte_experimental
5323 struct rte_flow *
5324 rte_flow_async_create(uint16_t port_id,
5325  uint32_t queue_id,
5326  const struct rte_flow_op_attr *op_attr,
5327  struct rte_flow_template_table *template_table,
5328  const struct rte_flow_item pattern[],
5329  uint8_t pattern_template_index,
5330  const struct rte_flow_action actions[],
5331  uint8_t actions_template_index,
5332  void *user_data,
5333  struct rte_flow_error *error);
5334 
5364 __rte_experimental
5365 int
5366 rte_flow_async_destroy(uint16_t port_id,
5367  uint32_t queue_id,
5368  const struct rte_flow_op_attr *op_attr,
5369  struct rte_flow *flow,
5370  void *user_data,
5371  struct rte_flow_error *error);
5372 
5393 __rte_experimental
5394 int
5395 rte_flow_push(uint16_t port_id,
5396  uint32_t queue_id,
5397  struct rte_flow_error *error);
5398 
5414 };
5415 
5422 __extension__
5431  void *user_data;
5432 };
5433 
5459 __rte_experimental
5460 int
5461 rte_flow_pull(uint16_t port_id,
5462  uint32_t queue_id,
5463  struct rte_flow_op_result res[],
5464  uint16_t n_res,
5465  struct rte_flow_error *error);
5466 
5493 __rte_experimental
5494 struct rte_flow_action_handle *
5495 rte_flow_async_action_handle_create(uint16_t port_id,
5496  uint32_t queue_id,
5497  const struct rte_flow_op_attr *op_attr,
5498  const struct rte_flow_indir_action_conf *indir_action_conf,
5499  const struct rte_flow_action *action,
5500  void *user_data,
5501  struct rte_flow_error *error);
5502 
5528 __rte_experimental
5529 int
5530 rte_flow_async_action_handle_destroy(uint16_t port_id,
5531  uint32_t queue_id,
5532  const struct rte_flow_op_attr *op_attr,
5533  struct rte_flow_action_handle *action_handle,
5534  void *user_data,
5535  struct rte_flow_error *error);
5536 
5567 __rte_experimental
5568 int
5569 rte_flow_async_action_handle_update(uint16_t port_id,
5570  uint32_t queue_id,
5571  const struct rte_flow_op_attr *op_attr,
5572  struct rte_flow_action_handle *action_handle,
5573  const void *update,
5574  void *user_data,
5575  struct rte_flow_error *error);
5576 
5611 __rte_experimental
5612 int
5613 rte_flow_async_action_handle_query(uint16_t port_id,
5614  uint32_t queue_id,
5615  const struct rte_flow_op_attr *op_attr,
5616  const struct rte_flow_action_handle *action_handle,
5617  void *data,
5618  void *user_data,
5619  struct rte_flow_error *error);
5620 
5621 #ifdef __cplusplus
5622 }
5623 #endif
5624 
5625 #endif /* RTE_FLOW_H_ */
uint32_t reserved
Definition: rte_flow.h:117
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
Definition: rte_flow.h:1396
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:3493
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:1076
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1188
__rte_experimental int rte_flow_action_handle_update(uint16_t port_id, struct rte_flow_action_handle *handle, const void *update, struct rte_flow_error *error)
__rte_experimental int rte_flow_async_action_handle_query(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, const struct rte_flow_action_handle *action_handle, void *data, void *user_data, struct rte_flow_error *error)
uint32_t reserved
Definition: rte_flow.h:873
int rte_flow_validate(uint16_t port_id, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], struct rte_flow_error *error)
uint32_t max_nb_aging_objects
Definition: rte_flow.h:4842
struct rte_ether_addr src_addr
Definition: rte_ether.h:283
struct rte_flow_action * actions
Definition: rte_flow.h:3783
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1346
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:878
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:1006
__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:1189
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
Definition: rte_flow.h:1667
uint32_t has_auth_ext
Definition: rte_flow.h:861
uint32_t nb_counters
Definition: rte_flow.h:4915
uint32_t num
Definition: rte_flow.h:663
__rte_experimental int rte_flow_async_destroy(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow *flow, void *user_data, struct rte_flow_error *error)
struct rte_flow_attr * attr
Definition: rte_flow.h:3775
uint32_t has_mobil_ext
Definition: rte_flow.h:867
uint32_t sec_since_last_hit
Definition: rte_flow.h:2807
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:1972
uint32_t original
Definition: rte_flow.h:2956
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:2073
uint32_t group
Definition: rte_flow.h:89
__rte_experimental int rte_flow_async_action_handle_destroy(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_action_handle *action_handle, void *user_data, struct rte_flow_error *error)
uint32_t nb_aging_objects
Definition: rte_flow.h:4920
struct rte_flow_item * definition
Definition: rte_flow.h:3106
uint32_t nb_meters
Definition: rte_flow.h:4925
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:1082
struct rte_flow_attr attr
Definition: rte_flow.h:4223
struct rte_flow_meter_profile * profile
Definition: rte_flow.h:3601
rte_be16_t msg_len
Definition: rte_flow.h:1149
__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:288
struct rte_flow_action_meter_mark meter_mark
Definition: rte_flow.h:3620
static const struct rte_flow_item_gtp rte_flow_item_gtp_mask
Definition: rte_flow.h:1155
uint32_t postpone
Definition: rte_flow.h:5283
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:899
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:1196
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:3774
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:956
int rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error)
static const struct rte_flow_item_any rte_flow_item_any_mask
Definition: rte_flow.h:668
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1443
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1171
rte_flow_conntrack_state
Definition: rte_flow.h:3323
__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:894
__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:1147
struct rte_ether_addr tla
Definition: rte_flow.h:1415
enum rte_flow_op_status status
Definition: rte_flow.h:5427
rte_flow_item_flex_field_mode
Definition: rte_flow.h:1939
rte_be16_t protocol
Definition: rte_flow.h:1034
uint32_t reserved
Definition: rte_flow.h:719
rte_be32_t spi
Definition: rte_esp.h:24
static const struct rte_flow_item_meter_color rte_flow_item_meter_color_mask
Definition: rte_flow.h:2097
static const struct rte_flow_item_conntrack rte_flow_item_conntrack_mask
Definition: rte_flow.h:1803
static const struct rte_flow_item_geneve_opt rte_flow_item_geneve_opt_mask
Definition: rte_flow.h:1711
static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask
Definition: rte_flow.h:1298
rte_be16_t src_port
Definition: rte_sctp.h:29
struct rte_flow_tcp_dir_param original_dir
Definition: rte_flow.h:3433
struct rte_flow_action * actions
Definition: rte_flow.h:4225
uint32_t nb_conn_tracks
Definition: rte_flow.h:4930
uint8_t data[]
Definition: rte_flow.h:4226
struct rte_ether_addr tha
Definition: rte_flow.h:1234
uint32_t max_nb_conn_tracks
Definition: rte_flow.h:4852
enum rte_color color
Definition: rte_flow.h:2092
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:832
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1566
uint32_t reserved
Definition: rte_flow.h:2803
struct rte_flow_item_flex_field * sample_data
Definition: rte_flow.h:2063
rte_be32_t src_addr
Definition: rte_ip.h:63
static const struct rte_flow_item_icmp6_nd_opt rte_flow_item_icmp6_nd_opt_mask
Definition: rte_flow.h:1371
enum rte_flow_item_flex_tunnel_mode tunnel
Definition: rte_flow.h:2046
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:988
#define RTE_BIT32(nr)
Definition: rte_bitops.h:38
uint8_t src_addr[16]
Definition: rte_ip.h:543
static const struct rte_flow_item_port_id rte_flow_item_port_id_mask
Definition: rte_flow.h:693
struct rte_ether_addr dst_addr
Definition: rte_ether.h:282
static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask
Definition: rte_flow.h:641
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:1041
uint64_t rte_be64_t
struct rte_flow_item_flex_field next_protocol
Definition: rte_flow.h:2057
const void * mask
Definition: rte_flow.h:1912
struct rte_flow_item * pattern
Definition: rte_flow.h:3779
enum rte_eth_hash_function func
Definition: rte_flow.h:2905
rte_be16_t type
Definition: rte_flow.h:766
enum rte_flow_error_type type
Definition: rte_flow.h:3758
const void * cause
Definition: rte_flow.h:3759
__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)
enum rte_flow_field_id field
Definition: rte_flow.h:3536
static const struct rte_flow_item_l2tpv2 rte_flow_item_l2tpv2_mask
Definition: rte_flow.h:1838
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:918
struct rte_flow_item_flex_field next_header
Definition: rte_flow.h:2052
__rte_experimental int rte_flow_get_q_aged_flows(uint16_t port_id, uint32_t queue_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
struct rte_esp_hdr hdr
Definition: rte_flow.h:1166
rte_flow_error_type
Definition: rte_flow.h:3725
uint32_t has_esp_ext
Definition: rte_flow.h:863
rte_flow_conv_op
Definition: rte_flow.h:3792
rte_be16_t src_port
Definition: rte_udp.h:29
uint32_t has_shim6_ext
Definition: rte_flow.h:871
__rte_experimental int rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow, FILE *file, struct rte_flow_error *error)
uint32_t has_route_ext
Definition: rte_flow.h:857
__rte_experimental int rte_flow_actions_template_destroy(uint16_t port_id, struct rte_flow_actions_template *actions_template, struct rte_flow_error *error)
const uint8_t * pattern
Definition: rte_flow.h:723
uint32_t search
Definition: rte_flow.h:718
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:1008
enum rte_flow_item_flex_field_mode field_mode
Definition: rte_flow.h:2008
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:728
uint16_t limit
Definition: rte_flow.h:721
rte_flow_conntrack_tcp_last_index
Definition: rte_flow.h:3341
__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:1454
uint32_t max_nb_queues
Definition: rte_flow.h:4832
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:1061
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1320
struct rte_flow_action_modify_data src
Definition: rte_flow.h:3583
__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:3672
const char * message
Definition: rte_flow.h:3760
rte_eth_hash_function
Definition: rte_flow.h:2875
uint32_t close_initiated
Definition: rte_flow.h:3363
uint16_t length
Definition: rte_flow.h:722
const void * last
Definition: rte_flow.h:1911
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1421
rte_be32_t teid
Definition: rte_flow.h:1150
enum rte_color init_color
Definition: rte_flow.h:3607
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
uint32_t ingress
Definition: rte_flow.h:94
enum rte_flow_item_type type
Definition: rte_flow.h:1909
rte_be16_t tci
Definition: rte_flow.h:806
rte_be32_t vx_vni
Definition: rte_vxlan.h:35
uint32_t max_nb_meters
Definition: rte_flow.h:4847
__rte_experimental struct rte_flow_action_handle * rte_flow_async_action_handle_create(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, const struct rte_flow_indir_action_conf *indir_action_conf, const struct rte_flow_action *action, void *user_data, struct rte_flow_error *error)
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask
Definition: rte_flow.h:837
size_t size
Definition: rte_flow.h:4222
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:1033
static const struct rte_flow_item_ppp rte_flow_item_ppp_mask
Definition: rte_flow.h:1866
const uint8_t * pattern
Definition: rte_flow.h:1934
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1460
uint32_t supported_flags
Definition: rte_flow.h:4856
rte_be16_t length
Definition: rte_flow.h:1477
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:3782
uint32_t has_vlan
Definition: rte_flow.h:770
uint32_t has_more_vlan
Definition: rte_flow.h:812
struct rte_flow_item * items
Definition: rte_flow.h:4224
enum rte_flow_modify_op operation
Definition: rte_flow.h:3581
__rte_experimental int rte_flow_get_aged_flows(uint16_t port_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
uint32_t timeout_valid
Definition: rte_flow.h:2831
rte_flow_action_type
Definition: rte_flow.h:2128
struct rte_ether_addr sla
Definition: rte_flow.h:1390
struct rte_flow_action_modify_data dst
Definition: rte_flow.h:3582
struct rte_flow_item_flex_link * output_link
Definition: rte_flow.h:2081
__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:3564
uint32_t has_hop_ext
Definition: rte_flow.h:855
struct rte_flow * rte_flow_create(uint16_t port_id, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], struct rte_flow_error *error)
struct rte_ether_addr dst
Definition: rte_flow.h:764
__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:1536
rte_color
Definition: rte_meter.h:35
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1621
const void * spec
Definition: rte_flow.h:1910
uint8_t label_tc_s[3]
Definition: rte_flow.h:1055
uint8_t version_type
Definition: rte_flow.h:1474
#define RTE_STD_C11
Definition: rte_common.h:39
__rte_experimental int rte_flow_tunnel_decap_set(uint16_t port_id, struct rte_flow_tunnel *tunnel, struct rte_flow_action **actions, uint32_t *num_of_actions, struct rte_flow_error *error)
const uint8_t * key
Definition: rte_flow.h:2935
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1241
uint32_t has_hip_ext
Definition: rte_flow.h:869
const struct rte_flow_action * actions
Definition: rte_flow.h:3716
__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:2806
rte_be16_t vlan_tci
Definition: rte_ether.h:299
struct rte_ether_addr sha
Definition: rte_flow.h:1232
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:776
rte_flow_op_status
Definition: rte_flow.h:5405
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:1819
__rte_experimental int rte_flow_info_get(uint16_t port_id, struct rte_flow_port_info *port_info, struct rte_flow_queue_info *queue_info, struct rte_flow_error *error)
uint16_t rte_be16_t
__rte_experimental int rte_flow_conv(enum rte_flow_conv_op op, void *dst, size_t size, const void *src, struct rte_flow_error *error)
uint32_t has_frag_ext
Definition: rte_flow.h:859
struct rte_flow_tcp_dir_param reply_dir
Definition: rte_flow.h:3435
uint32_t reserved
Definition: rte_flow.h:2957
__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:1645
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1519
uint32_t priority
Definition: rte_flow.h:90
uint32_t has_dest_ext
Definition: rte_flow.h:865
struct rte_ether_addr src
Definition: rte_flow.h:765
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1266
uint32_t max_nb_counters
Definition: rte_flow.h:4837
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:853
static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask
Definition: rte_flow.h:1687
__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:1077
uint32_t queue_num
Definition: rte_flow.h:2934
uint8_t tni[3]
Definition: rte_flow.h:1035
struct rte_tcp_hdr hdr
Definition: rte_flow.h:932
enum rte_flow_conntrack_state state
Definition: rte_flow.h:3427
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1499
uint32_t transfer
Definition: rte_flow.h:116
struct rte_flow_item * definition
Definition: rte_flow.h:3140
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:818
uint8_t msg_type
Definition: rte_flow.h:1148
uint32_t reserved
Definition: rte_flow.h:813
uint32_t egress
Definition: rte_flow.h:98
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
Definition: rte_flow.h:1016
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:3964
__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:937
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1130
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:75
rte_be16_t inner_type
Definition: rte_flow.h:807
enum rte_flow_action_type type
Definition: rte_flow.h:3671
uint8_t rsvd0[3]
Definition: rte_flow.h:978
__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:913
__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:2936
struct rte_flow_action_conntrack new_ct
Definition: rte_flow.h:3459
rte_flow_item_type
Definition: rte_flow.h:136
__rte_experimental int rte_flow_pull(uint16_t port_id, uint32_t queue_id, struct rte_flow_op_result res[], uint16_t n_res, struct rte_flow_error *error)
uint32_t relative
Definition: rte_flow.h:717
struct rte_flow_tunnel tunnel
Definition: rte_flow.h:4603
uint8_t vni[3]
Definition: rte_flow.h:979
int32_t offset
Definition: rte_flow.h:720
struct rte_flow_attr flow_attr
Definition: rte_flow.h:5196
rte_be16_t inner_type
Definition: rte_flow.h:1011
__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:1932
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:3778
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1216
rte_be16_t session_id
Definition: rte_flow.h:1476
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1595
__rte_experimental int rte_flow_push(uint16_t port_id, uint32_t queue_id, struct rte_flow_error *error)
int rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id, struct rte_flow_error *error)
struct rte_sctp_hdr hdr
Definition: rte_flow.h:951
uint32_t reserved
Definition: rte_flow.h:771