DPDK 21.11.9
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
41#ifdef __cplusplus
42extern "C" {
43#endif
44
86 uint32_t group;
87 uint32_t priority;
100 uint32_t ingress:1;
113 uint32_t egress:1;
131 uint32_t transfer:1;
132 uint32_t reserved:29;
133};
134
161
171
181
189
203
217
231
245
252
259
266
273
280
287
294
301
308
315
322
329
336
343
355
364
373
382
389
396
403
410
417
424
431
438
445
453
461
468
477
490
499
508
517
526
533
540
547
553
562
571
578
587
594
601
612
621
630
640
649
656
663};
664
672 struct rte_higig2_hdr hdr;
673};
674
676#ifndef __cplusplus
678 .hdr = {
679 .ppt1 = {
680 .classification = 0xffff,
681 .vid = 0xfff,
682 },
683 },
684};
685#endif
686
699 uint32_t num;
700};
701
703#ifndef __cplusplus
705 .num = 0x00000000,
706};
707#endif
708
732 uint32_t id;
733};
734
736#ifndef __cplusplus
738 .id = 0x00000000,
739};
740#endif
741
767 uint32_t index;
768};
769
771#ifndef __cplusplus
773 .index = 0x00000000,
774};
775#endif
776
797 uint32_t id;
798};
799
801#ifndef __cplusplus
803 .id = 0xffffffff,
804};
805#endif
806
826 uint32_t relative:1;
827 uint32_t search:1;
828 uint32_t reserved:30;
829 int32_t offset;
830 uint16_t limit;
831 uint16_t length;
832 const uint8_t *pattern;
833};
834
836#ifndef __cplusplus
838 .relative = 1,
839 .search = 1,
840 .reserved = 0x3fffffff,
841 .offset = 0xffffffff,
842 .limit = 0xffff,
843 .length = 0xffff,
844 .pattern = NULL,
845};
846#endif
847
867 union {
868 struct {
869 /*
870 * These fields are retained for compatibility.
871 * Please switch to the new header field below.
872 */
876 };
877 struct rte_ether_hdr hdr;
878 };
879 uint32_t has_vlan:1;
880 uint32_t reserved:31;
881};
882
884#ifndef __cplusplus
886 .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
887 .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
888 .hdr.ether_type = RTE_BE16(0x0000),
889};
890#endif
891
909 union {
910 struct {
911 /*
912 * These fields are retained for compatibility.
913 * Please switch to the new header field below.
914 */
917 };
918 struct rte_vlan_hdr hdr;
919 };
921 uint32_t has_more_vlan:1;
922 uint32_t reserved:31;
923};
924
926#ifndef __cplusplus
928 .hdr.vlan_tci = RTE_BE16(0x0fff),
929 .hdr.eth_proto = RTE_BE16(0x0000),
930};
931#endif
932
942};
943
945#ifndef __cplusplus
947 .hdr = {
948 .src_addr = RTE_BE32(0xffffffff),
949 .dst_addr = RTE_BE32(0xffffffff),
950 },
951};
952#endif
953
964 uint32_t has_hop_ext:1;
966 uint32_t has_route_ext:1;
968 uint32_t has_frag_ext:1;
970 uint32_t has_auth_ext:1;
972 uint32_t has_esp_ext:1;
974 uint32_t has_dest_ext:1;
976 uint32_t has_mobil_ext:1;
978 uint32_t has_hip_ext:1;
980 uint32_t has_shim6_ext:1;
982 uint32_t reserved:23;
983};
984
986#ifndef __cplusplus
988 .hdr = {
989 .src_addr =
990 "\xff\xff\xff\xff\xff\xff\xff\xff"
991 "\xff\xff\xff\xff\xff\xff\xff\xff",
992 .dst_addr =
993 "\xff\xff\xff\xff\xff\xff\xff\xff"
994 "\xff\xff\xff\xff\xff\xff\xff\xff",
995 },
996};
997#endif
998
1006};
1007
1009#ifndef __cplusplus
1011 .hdr = {
1012 .icmp_type = 0xff,
1013 .icmp_code = 0xff,
1014 },
1015};
1016#endif
1017
1025};
1026
1028#ifndef __cplusplus
1030 .hdr = {
1031 .src_port = RTE_BE16(0xffff),
1032 .dst_port = RTE_BE16(0xffff),
1033 },
1034};
1035#endif
1036
1044};
1045
1047#ifndef __cplusplus
1049 .hdr = {
1050 .src_port = RTE_BE16(0xffff),
1051 .dst_port = RTE_BE16(0xffff),
1052 },
1053};
1054#endif
1055
1063};
1064
1066#ifndef __cplusplus
1068 .hdr = {
1069 .src_port = RTE_BE16(0xffff),
1070 .dst_port = RTE_BE16(0xffff),
1071 },
1072};
1073#endif
1074
1082 union {
1083 struct {
1084 /*
1085 * These fields are retained for compatibility.
1086 * Please switch to the new header field below.
1087 */
1088 uint8_t flags;
1089 uint8_t rsvd0[3];
1090 uint8_t vni[3];
1091 uint8_t rsvd1;
1092 };
1093 struct rte_vxlan_hdr hdr;
1094 };
1095};
1096
1098#ifndef __cplusplus
1100 .hdr.vx_vni = RTE_BE32(0xffffff00), /* (0xffffff << 8) */
1101};
1102#endif
1103
1120 uint8_t in_ecid_e;
1121 uint8_t ecid_e;
1123};
1124
1126#ifndef __cplusplus
1128 .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
1129};
1130#endif
1131
1146 uint8_t tni[3];
1147 uint8_t flow_id;
1148};
1149
1151#ifndef __cplusplus
1153 .tni = "\xff\xff\xff",
1154};
1155#endif
1156
1166 uint8_t label_tc_s[3];
1167 uint8_t ttl;
1168};
1169
1171#ifndef __cplusplus
1173 .label_tc_s = "\xff\xff\xf0",
1174};
1175#endif
1176
1189};
1190
1192#ifndef __cplusplus
1194 .protocol = RTE_BE16(0xffff),
1195};
1196#endif
1197
1216 uint32_t thresh;
1217};
1218
1220#ifndef __cplusplus
1222 .thresh = 0xffffffff,
1223};
1224#endif
1225
1239 uint8_t msg_type;
1242};
1243
1245#ifndef __cplusplus
1247 .teid = RTE_BE32(0xffffffff),
1248};
1249#endif
1250
1258};
1259
1261#ifndef __cplusplus
1263 .hdr = {
1264 .spi = RTE_BE32(0xffffffff),
1265 },
1266};
1267#endif
1268
1281 uint8_t vni[3];
1282 uint8_t rsvd1;
1283};
1284
1286#ifndef __cplusplus
1288 .vni = "\xff\xff\xff",
1289};
1290#endif
1291
1298 uint8_t flags;
1299 uint8_t rsvd0[2];
1300 uint8_t protocol;
1301 uint8_t vni[3];
1302 uint8_t rsvd1;
1303};
1304
1306#ifndef __cplusplus
1308 .vni = "\xff\xff\xff",
1309};
1310#endif
1311
1320 uint8_t hln;
1321 uint8_t pln;
1327};
1328
1330#ifndef __cplusplus
1331static const struct rte_flow_item_arp_eth_ipv4
1333 .sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1334 .spa = RTE_BE32(0xffffffff),
1335 .tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1336 .tpa = RTE_BE32(0xffffffff),
1337};
1338#endif
1339
1351 uint8_t next_hdr;
1352};
1353
1355#ifndef __cplusplus
1356static const
1358 .next_hdr = 0xff,
1359};
1360#endif
1361
1373 struct rte_ipv6_fragment_ext hdr;
1374};
1375
1382 uint8_t type;
1383 uint8_t code;
1384 uint16_t checksum;
1385};
1386
1388#ifndef __cplusplus
1390 .type = 0xff,
1391 .code = 0xff,
1392};
1393#endif
1394
1401 uint8_t type;
1402 uint8_t code;
1405 uint8_t target_addr[16];
1406};
1407
1409#ifndef __cplusplus
1410static const
1412 .target_addr =
1413 "\xff\xff\xff\xff\xff\xff\xff\xff"
1414 "\xff\xff\xff\xff\xff\xff\xff\xff",
1415};
1416#endif
1417
1424 uint8_t type;
1425 uint8_t code;
1432 uint8_t target_addr[16];
1433};
1434
1436#ifndef __cplusplus
1437static const
1439 .target_addr =
1440 "\xff\xff\xff\xff\xff\xff\xff\xff"
1441 "\xff\xff\xff\xff\xff\xff\xff\xff",
1442};
1443#endif
1444
1457 uint8_t type;
1458 uint8_t length;
1459};
1460
1462#ifndef __cplusplus
1463static const struct rte_flow_item_icmp6_nd_opt
1465 .type = 0xff,
1466};
1467#endif
1468
1481 uint8_t type;
1482 uint8_t length;
1484};
1485
1487#ifndef __cplusplus
1488static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1490 .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1491};
1492#endif
1493
1506 uint8_t type;
1507 uint8_t length;
1509};
1510
1512#ifndef __cplusplus
1513static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1515 .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1516};
1517#endif
1518
1531 uint32_t data;
1532};
1533
1535#ifndef __cplusplus
1537 .data = UINT32_MAX,
1538};
1539#endif
1540
1548};
1549
1551#ifndef __cplusplus
1552static const struct rte_flow_item_gtp_psc
1554 .hdr.qfi = 0x3f,
1555};
1556#endif
1557
1568 uint8_t code;
1571};
1572
1587};
1588
1590#ifndef __cplusplus
1591static const struct rte_flow_item_pppoe_proto_id
1593 .proto_id = RTE_BE16(0xffff),
1594};
1595#endif
1596
1606 uint32_t data;
1607 uint8_t index;
1608};
1609
1611#ifndef __cplusplus
1613 .data = 0xffffffff,
1614 .index = 0xff,
1615};
1616#endif
1617
1625};
1626
1628#ifndef __cplusplus
1630 .session_id = RTE_BE32(UINT32_MAX),
1631};
1632#endif
1633
1634
1654 uint32_t id;
1655};
1656
1658#ifndef __cplusplus
1660 .id = 0xffffffff,
1661};
1662#endif
1663
1674 uint32_t version:2;
1675 uint32_t oam_pkt:1;
1676 uint32_t reserved:1;
1677 uint32_t ttl:6;
1678 uint32_t length:6;
1679 uint32_t reserved1:4;
1680 uint32_t mdtype:4;
1681 uint32_t next_proto:8;
1682 uint32_t spi:24;
1683 uint32_t sindex:8;
1684};
1685
1687#ifndef __cplusplus
1689 .mdtype = 0xf,
1690 .next_proto = 0xff,
1691 .spi = 0xffffff,
1692 .sindex = 0xff,
1693};
1694#endif
1695
1706 uint32_t type:8;
1707 uint32_t max_resp_time:8;
1708 uint32_t checksum:16;
1709 uint32_t group_addr;
1710};
1711
1713#ifndef __cplusplus
1715 .group_addr = 0xffffffff,
1716};
1717#endif
1718
1729 uint32_t next_hdr:8;
1730 uint32_t payload_len:8;
1731 uint32_t reserved:16;
1732 uint32_t spi;
1733 uint32_t seq_num;
1734};
1735
1737#ifndef __cplusplus
1739 .spi = 0xffffffff,
1740};
1741#endif
1742
1752 uint8_t s_field;
1753 uint8_t msg_type;
1754 rte_be16_t msg_len;
1755 rte_be64_t seid;
1756};
1757
1759#ifndef __cplusplus
1761 .s_field = 0x01,
1762 .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1763};
1764#endif
1765
1775 struct rte_ecpri_combined_msg_hdr hdr;
1776};
1777
1779#ifndef __cplusplus
1781 .hdr = {
1782 .common = {
1783 .u32 = 0x0,
1784 },
1785 },
1786};
1787#endif
1788
1795 rte_be16_t option_class;
1796 uint8_t option_type;
1797 uint8_t option_len;
1798 uint32_t *data;
1799};
1800
1802#ifndef __cplusplus
1803static const struct rte_flow_item_geneve_opt
1805 .option_type = 0xff,
1806};
1807#endif
1808
1821 uint32_t level;
1823 union {
1824 __extension__
1825 struct {
1827 uint64_t packet_ok:1;
1829 uint64_t l2_ok:1;
1831 uint64_t l3_ok:1;
1833 uint64_t l4_ok:1;
1835 uint64_t l2_crc_ok:1;
1837 uint64_t ipv4_csum_ok:1;
1839 uint64_t l4_csum_ok:1;
1841 uint64_t l3_len_ok:1;
1842 uint64_t reserved:56;
1843 };
1844 uint64_t value;
1845 };
1846};
1847
1848#ifndef __cplusplus
1849static const struct rte_flow_item_integrity
1850rte_flow_item_integrity_mask = {
1851 .level = 0,
1852 .value = 0,
1853};
1854#endif
1855
1859#define RTE_FLOW_CONNTRACK_PKT_STATE_VALID RTE_BIT32(0)
1863#define RTE_FLOW_CONNTRACK_PKT_STATE_CHANGED RTE_BIT32(1)
1868#define RTE_FLOW_CONNTRACK_PKT_STATE_INVALID RTE_BIT32(2)
1873#define RTE_FLOW_CONNTRACK_PKT_STATE_DISABLED RTE_BIT32(3)
1878#define RTE_FLOW_CONNTRACK_PKT_STATE_BAD RTE_BIT32(4)
1879
1891 uint32_t flags;
1892};
1893
1895#ifndef __cplusplus
1897 .flags = 0xffffffff,
1898};
1899#endif
1900
1910 uint16_t port_id;
1911};
1912
1914#ifndef __cplusplus
1916 .port_id = 0xffff,
1917};
1918#endif
1919
1929 struct rte_l2tpv2_combined_msg_hdr hdr;
1930};
1931
1933#ifndef __cplusplus
1935 /*
1936 * flags and version bit mask
1937 * 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
1938 * T L x x S x O P x x x x V V V V
1939 */
1940 .hdr = {
1941 .common = {
1942 .flags_version = RTE_BE16(0xcb0f),
1943 },
1944 },
1945};
1946#endif
1947
1957 struct rte_ppp_hdr hdr;
1958};
1959
1961#ifndef __cplusplus
1963 .hdr = {
1964 .addr = 0xff,
1965 .ctrl = 0xff,
1966 .proto_id = RTE_BE16(0xffff),
1967 }
1968};
1969#endif
1970
2006 const void *spec;
2007 const void *last;
2008 const void *mask;
2009};
2010
2028 struct rte_flow_item_flex_handle *handle;
2029 uint32_t length;
2030 const uint8_t *pattern;
2031};
2063};
2064
2094};
2095
2101__extension__
2105 uint32_t field_size;
2106 int32_t field_base;
2107 uint32_t offset_base;
2108 uint32_t offset_mask;
2110 uint32_t field_id:16;
2111 uint32_t reserved:16;
2112};
2113
2129 uint32_t next;
2130};
2131
2161 uint32_t nb_samples;
2171 uint32_t nb_inputs;
2179 uint32_t nb_outputs;
2180};
2181
2216
2224
2232
2241
2253
2265
2272
2281
2292
2301
2313
2325
2337
2348
2356
2364
2375
2386
2397
2408
2420
2432
2440
2448
2456
2464
2472
2480
2488
2497
2505
2514
2521
2528
2541
2554
2567
2580
2594
2608
2619
2629
2639
2652
2665
2682
2699
2716
2733
2746
2756
2769
2782
2793
2801
2812
2823
2831
2840
2848
2855
2863};
2864
2876 uint32_t id;
2877};
2878
2892 uint32_t group;
2893};
2894
2901 uint16_t index;
2902};
2903
2918 uint32_t timeout:24;
2919 uint32_t reserved:8;
2921 void *context;
2922};
2923
2931 uint32_t reserved:6;
2932 uint32_t aged:1;
2936};
2937
2956 uint32_t id;
2957};
2958
2965 uint32_t reset:1;
2966 uint32_t hits_set:1;
2967 uint32_t bytes_set:1;
2968 uint32_t reserved:29;
2969 uint64_t hits;
2970 uint64_t bytes;
2971};
2972
2977 RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
2986 RTE_ETH_HASH_FUNCTION_MAX,
2987};
2988
3032 uint32_t level;
3033 uint64_t types;
3034 uint32_t key_len;
3035 uint32_t queue_num;
3036 const uint8_t *key;
3037 const uint16_t *queue;
3038};
3039
3057 uint32_t original:1;
3058 uint32_t reserved:31;
3059 uint32_t id;
3060};
3061
3075 uint32_t original:1;
3076 uint32_t reserved:31;
3077 uint32_t index;
3078};
3079
3092 uint32_t original:1;
3093 uint32_t reserved:31;
3094 uint32_t id;
3095};
3096
3106 uint32_t mtr_id;
3107};
3108
3141};
3142
3153 uint8_t mpls_ttl;
3154};
3155
3166 uint8_t nw_ttl;
3167};
3168
3177};
3178
3187};
3188
3196 uint8_t vlan_pcp;
3197};
3198
3207};
3208
3217};
3218
3252};
3253
3286};
3287
3308 uint8_t *data;
3309 uint8_t *preserve;
3310 size_t size;
3311};
3312
3329 uint8_t *data;
3330 size_t size;
3331};
3332
3345 rte_be32_t ipv4_addr;
3346};
3347
3360 uint8_t ipv6_addr[16];
3361};
3362
3375 rte_be16_t port;
3376};
3377
3384 uint8_t ttl_value;
3385};
3386
3393 uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
3394};
3395
3406 uint32_t data;
3407 uint32_t mask;
3408 uint8_t index;
3409};
3410
3431 uint32_t data;
3432 uint32_t mask;
3433};
3434
3443 uint8_t dscp;
3444};
3445
3463struct rte_flow_action_handle;
3464
3481};
3482
3493};
3494
3506 uint32_t scale:4;
3510 uint32_t last_ack_seen:1;
3515 uint32_t data_unacked:1;
3520 uint32_t sent_end;
3525 uint32_t reply_end;
3527 uint32_t max_win;
3529 uint32_t max_ack;
3530};
3531
3544 uint16_t peer_port;
3557 uint32_t enable:1;
3561 uint32_t selective_ack:1;
3568 uint32_t last_direction:1;
3570 uint32_t liberal_mode:1;
3582 uint16_t last_window;
3583 enum rte_flow_conntrack_tcp_last_index last_index;
3585 uint32_t last_seq;
3587 uint32_t last_ack;
3592 uint32_t last_end;
3593};
3594
3606 uint32_t direction:1;
3608 uint32_t state:1;
3610 uint32_t reserved:30;
3611};
3612
3624};
3625
3635 uint16_t port_id;
3636};
3637
3671};
3672
3682 union {
3683 struct {
3685 uint32_t level;
3687 uint32_t offset;
3688 };
3695 uint8_t value[16];
3701 void *pvalue;
3702 };
3703};
3704
3712};
3713
3728 uint32_t width;
3729};
3730
3731/* Mbuf dynamic field offset for metadata. */
3732extern int32_t rte_flow_dynf_metadata_offs;
3733
3734/* Mbuf dynamic field flag mask for metadata. */
3735extern uint64_t rte_flow_dynf_metadata_mask;
3736
3737/* Mbuf dynamic field pointer for metadata. */
3738#define RTE_FLOW_DYNF_METADATA(m) \
3739 RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
3740
3741/* Mbuf dynamic flags for metadata. */
3742#define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask)
3743#define PKT_RX_DYNF_METADATA RTE_DEPRECATED(PKT_RX_DYNF_METADATA) \
3744 RTE_MBUF_DYNFLAG_RX_METADATA
3745#define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask)
3746#define PKT_TX_DYNF_METADATA RTE_DEPRECATED(PKT_TX_DYNF_METADATA) \
3747 RTE_MBUF_DYNFLAG_TX_METADATA
3748
3749__rte_experimental
3750static inline uint32_t
3751rte_flow_dynf_metadata_get(struct rte_mbuf *m)
3752{
3753 return *RTE_FLOW_DYNF_METADATA(m);
3754}
3755
3756__rte_experimental
3757static inline void
3758rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
3759{
3760 *RTE_FLOW_DYNF_METADATA(m) = v;
3761}
3762
3772 const void *conf;
3773};
3774
3781struct rte_flow;
3782
3800 uint32_t ratio;
3803};
3804
3830};
3831
3845 const void *cause;
3846 const char *message;
3847};
3848
3859 union {
3860 const struct rte_flow_attr *attr_ro;
3862 };
3863 union {
3866 };
3867 union {
3870 };
3871};
3872
3885
3897
3909
3921
3934
3947
3960
3974
3988
4002
4016};
4017
4037__rte_experimental
4038int
4039rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow,
4040 FILE *file, struct rte_flow_error *error);
4041
4048__rte_experimental
4049static inline int
4051{
4052 return !!rte_flow_dynf_metadata_mask;
4053}
4054
4065__rte_experimental
4066int
4068
4121int
4122rte_flow_validate(uint16_t port_id,
4123 const struct rte_flow_attr *attr,
4124 const struct rte_flow_item pattern[],
4125 const struct rte_flow_action actions[],
4126 struct rte_flow_error *error);
4127
4148struct rte_flow *
4149rte_flow_create(uint16_t port_id,
4150 const struct rte_flow_attr *attr,
4151 const struct rte_flow_item pattern[],
4152 const struct rte_flow_action actions[],
4153 struct rte_flow_error *error);
4154
4175int
4176rte_flow_destroy(uint16_t port_id,
4177 struct rte_flow *flow,
4178 struct rte_flow_error *error);
4179
4196int
4197rte_flow_flush(uint16_t port_id,
4198 struct rte_flow_error *error);
4199
4224int
4225rte_flow_query(uint16_t port_id,
4226 struct rte_flow *flow,
4227 const struct rte_flow_action *action,
4228 void *data,
4229 struct rte_flow_error *error);
4230
4272int
4273rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
4274
4292int
4294 int code,
4295 enum rte_flow_error_type type,
4296 const void *cause,
4297 const char *message);
4298
4304 size_t size;
4308 uint8_t data[];
4309};
4310
4337__rte_deprecated
4338size_t
4339rte_flow_copy(struct rte_flow_desc *fd, size_t len,
4340 const struct rte_flow_attr *attr,
4341 const struct rte_flow_item *items,
4342 const struct rte_flow_action *actions);
4343
4384__rte_experimental
4385int
4387 void *dst,
4388 size_t size,
4389 const void *src,
4390 struct rte_flow_error *error);
4391
4420__rte_experimental
4421int
4422rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
4423 uint32_t nb_contexts, struct rte_flow_error *error);
4424
4436 uint32_t ingress:1;
4438 uint32_t egress:1;
4443 uint32_t transfer:1;
4444};
4445
4473__rte_experimental
4474struct rte_flow_action_handle *
4476 const struct rte_flow_indir_action_conf *conf,
4477 const struct rte_flow_action *action,
4478 struct rte_flow_error *error);
4479
4502__rte_experimental
4503int
4505 struct rte_flow_action_handle *handle,
4506 struct rte_flow_error *error);
4507
4541__rte_experimental
4542int
4544 struct rte_flow_action_handle *handle,
4545 const void *update,
4546 struct rte_flow_error *error);
4547
4573__rte_experimental
4574int
4576 const struct rte_flow_action_handle *handle,
4577 void *data, struct rte_flow_error *error);
4578
4579/* Tunnel has a type and the key information. */
4580struct rte_flow_tunnel {
4585 enum rte_flow_item_type type;
4586 uint64_t tun_id;
4589 union {
4590 struct {
4593 } ipv4;
4594 struct {
4595 uint8_t src_addr[16];
4596 uint8_t dst_addr[16];
4597 } ipv6;
4598 };
4599 rte_be16_t tp_src;
4600 rte_be16_t tp_dst;
4601 uint16_t tun_flags;
4603 bool is_ipv6;
4609 uint8_t tos;
4610 uint8_t ttl;
4611 uint32_t label;
4612};
4613
4617#define RTE_FLOW_RESTORE_INFO_TUNNEL RTE_BIT64(0)
4618
4622#define RTE_FLOW_RESTORE_INFO_ENCAPSULATED RTE_BIT64(1)
4623
4627#define RTE_FLOW_RESTORE_INFO_GROUP_ID RTE_BIT64(2)
4628
4639 uint64_t flags;
4640 uint32_t group_id;
4641 struct rte_flow_tunnel tunnel;
4642};
4643
4667__rte_experimental
4668int
4670 struct rte_flow_tunnel *tunnel,
4671 struct rte_flow_action **actions,
4672 uint32_t *num_of_actions,
4673 struct rte_flow_error *error);
4674
4698__rte_experimental
4699int
4700rte_flow_tunnel_match(uint16_t port_id,
4701 struct rte_flow_tunnel *tunnel,
4702 struct rte_flow_item **items,
4703 uint32_t *num_of_items,
4704 struct rte_flow_error *error);
4705
4726__rte_experimental
4727int
4729 struct rte_mbuf *m,
4730 struct rte_flow_restore_info *info,
4731 struct rte_flow_error *error);
4732
4749__rte_experimental
4750int
4752 struct rte_flow_action *actions,
4753 uint32_t num_of_actions,
4754 struct rte_flow_error *error);
4755
4772__rte_experimental
4773int
4775 struct rte_flow_item *items,
4776 uint32_t num_of_items,
4777 struct rte_flow_error *error);
4778
4807__rte_experimental
4808int
4809rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id,
4810 struct rte_flow_error *error);
4811
4830__rte_experimental
4831struct rte_flow_item_flex_handle *
4833 const struct rte_flow_item_flex_conf *conf,
4834 struct rte_flow_error *error);
4835
4850__rte_experimental
4851int
4853 const struct rte_flow_item_flex_handle *handle,
4854 struct rte_flow_error *error);
4855
4856#ifdef __cplusplus
4857}
4858#endif
4859
4860#endif /* RTE_FLOW_H_ */
#define RTE_BIT32(nr)
Definition: rte_bitops.h:38
uint32_t rte_be32_t
uint64_t rte_be64_t
uint16_t rte_be16_t
#define RTE_STD_C11
Definition: rte_common.h:42
#define RTE_ETHER_ADDR_LEN
Definition: rte_ether.h:26
struct rte_ether_addr src_addr
Definition: rte_ether.h:1
struct rte_ether_addr dst_addr
Definition: rte_ether.h:0
int rte_flow_error_set(struct rte_flow_error *error, int code, enum rte_flow_error_type type, const void *cause, const char *message)
static const struct rte_flow_item_port_id rte_flow_item_port_id_mask
Definition: rte_flow.h:802
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask
Definition: rte_flow.h:772
__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)
rte_flow_modify_op
Definition: rte_flow.h:3708
@ RTE_FLOW_MODIFY_SET
Definition: rte_flow.h:3709
@ RTE_FLOW_MODIFY_SUB
Definition: rte_flow.h:3711
@ RTE_FLOW_MODIFY_ADD
Definition: rte_flow.h:3710
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:1193
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:4050
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1411
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1307
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1536
__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)
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
Definition: rte_flow.h:1489
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:1010
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1553
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:1099
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1592
rte_flow_conntrack_tcp_last_index
Definition: rte_flow.h:3486
@ RTE_FLOW_CONNTRACK_FLAG_ACK
Definition: rte_flow.h:3491
@ RTE_FLOW_CONNTRACK_FLAG_SYNACK
Definition: rte_flow.h:3489
@ RTE_FLOW_CONNTRACK_FLAG_FIN
Definition: rte_flow.h:3490
@ RTE_FLOW_CONNTRACK_FLAG_SYN
Definition: rte_flow.h:3488
@ RTE_FLOW_CONNTRACK_FLAG_RST
Definition: rte_flow.h:3492
@ RTE_FLOW_CONNTRACK_FLAG_NONE
Definition: rte_flow.h:3487
static const struct rte_flow_item_geneve rte_flow_item_geneve_mask
Definition: rte_flow.h:1287
rte_flow_conntrack_state
Definition: rte_flow.h:3468
@ RTE_FLOW_CONNTRACK_STATE_ESTABLISHED
Definition: rte_flow.h:3472
@ RTE_FLOW_CONNTRACK_STATE_SYN_RECV
Definition: rte_flow.h:3470
@ RTE_FLOW_CONNTRACK_STATE_LAST_ACK
Definition: rte_flow.h:3478
@ RTE_FLOW_CONNTRACK_STATE_FIN_WAIT
Definition: rte_flow.h:3474
@ RTE_FLOW_CONNTRACK_STATE_TIME_WAIT
Definition: rte_flow.h:3480
@ RTE_FLOW_CONNTRACK_STATE_CLOSE_WAIT
Definition: rte_flow.h:3476
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
Definition: rte_flow.h:1127
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)
__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 int rte_flow_get_aged_flows(uint16_t port_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
int rte_flow_flush(uint16_t port_id, struct rte_flow_error *error)
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1357
__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)
__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)
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
Definition: rte_flow.h:1760
static const struct rte_flow_item_l2tpv3oip rte_flow_item_l2tpv3oip_mask
Definition: rte_flow.h:1629
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1612
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1514
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:837
__rte_experimental int rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow, FILE *file, struct rte_flow_error *error)
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:927
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask
Definition: rte_flow.h:1048
rte_flow_conv_op
Definition: rte_flow.h:3878
@ RTE_FLOW_CONV_OP_ACTION_NAME_PTR
Definition: rte_flow.h:4015
@ RTE_FLOW_CONV_OP_ITEM
Definition: rte_flow.h:3908
@ RTE_FLOW_CONV_OP_ACTIONS
Definition: rte_flow.h:3946
@ RTE_FLOW_CONV_OP_NONE
Definition: rte_flow.h:3884
@ RTE_FLOW_CONV_OP_RULE
Definition: rte_flow.h:3959
@ RTE_FLOW_CONV_OP_ATTR
Definition: rte_flow.h:3896
@ RTE_FLOW_CONV_OP_ACTION_NAME
Definition: rte_flow.h:3987
@ RTE_FLOW_CONV_OP_ITEM_NAME_PTR
Definition: rte_flow.h:4001
@ RTE_FLOW_CONV_OP_PATTERN
Definition: rte_flow.h:3933
@ RTE_FLOW_CONV_OP_ITEM_NAME
Definition: rte_flow.h:3973
@ RTE_FLOW_CONV_OP_ACTION
Definition: rte_flow.h:3920
__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)
__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)
rte_flow_action_type
Definition: rte_flow.h:2208
@ RTE_FLOW_ACTION_TYPE_OF_POP_VLAN
Definition: rte_flow.h:2439
@ RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP
Definition: rte_flow.h:2487
@ RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP
Definition: rte_flow.h:2504
@ RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ
Definition: rte_flow.h:2681
@ RTE_FLOW_ACTION_TYPE_PASSTHRU
Definition: rte_flow.h:2231
@ RTE_FLOW_ACTION_TYPE_COUNT
Definition: rte_flow.h:2291
@ RTE_FLOW_ACTION_TYPE_SET_TP_DST
Definition: rte_flow.h:2607
@ RTE_FLOW_ACTION_TYPE_INDIRECT
Definition: rte_flow.h:2830
@ RTE_FLOW_ACTION_TYPE_RAW_ENCAP
Definition: rte_flow.h:2520
@ RTE_FLOW_ACTION_TYPE_VF
Definition: rte_flow.h:2324
@ RTE_FLOW_ACTION_TYPE_SET_META
Definition: rte_flow.h:2755
@ RTE_FLOW_ACTION_TYPE_MAC_SWAP
Definition: rte_flow.h:2618
@ RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC
Definition: rte_flow.h:2566
@ RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_IN
Definition: rte_flow.h:2431
@ RTE_FLOW_ACTION_TYPE_OF_SET_MPLS_TTL
Definition: rte_flow.h:2374
@ RTE_FLOW_ACTION_TYPE_OF_POP_MPLS
Definition: rte_flow.h:2471
@ RTE_FLOW_ACTION_TYPE_RAW_DECAP
Definition: rte_flow.h:2527
@ RTE_FLOW_ACTION_TYPE_VOID
Definition: rte_flow.h:2223
@ RTE_FLOW_ACTION_TYPE_AGE
Definition: rte_flow.h:2792
@ RTE_FLOW_ACTION_TYPE_RSS
Definition: rte_flow.h:2300
@ RTE_FLOW_ACTION_TYPE_MARK
Definition: rte_flow.h:2252
@ RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_OUT
Definition: rte_flow.h:2419
@ RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC
Definition: rte_flow.h:2540
@ RTE_FLOW_ACTION_TYPE_OF_DEC_NW_TTL
Definition: rte_flow.h:2407
@ RTE_FLOW_ACTION_TYPE_SET_IPV4_DST
Definition: rte_flow.h:2553
@ RTE_FLOW_ACTION_TYPE_QUEUE
Definition: rte_flow.h:2271
@ RTE_FLOW_ACTION_TYPE_END
Definition: rte_flow.h:2215
@ RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP
Definition: rte_flow.h:2768
@ RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN
Definition: rte_flow.h:2447
@ RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
Definition: rte_flow.h:2854
@ RTE_FLOW_ACTION_TYPE_PHY_PORT
Definition: rte_flow.h:2336
@ RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP
Definition: rte_flow.h:2781
@ RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK
Definition: rte_flow.h:2732
@ RTE_FLOW_ACTION_TYPE_DEC_TTL
Definition: rte_flow.h:2628
@ RTE_FLOW_ACTION_TYPE_VXLAN_DECAP
Definition: rte_flow.h:2496
@ RTE_FLOW_ACTION_TYPE_SET_TP_SRC
Definition: rte_flow.h:2593
@ RTE_FLOW_ACTION_TYPE_PORT_ID
Definition: rte_flow.h:2347
@ RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
Definition: rte_flow.h:2862
@ RTE_FLOW_ACTION_TYPE_NVGRE_DECAP
Definition: rte_flow.h:2513
@ RTE_FLOW_ACTION_TYPE_SECURITY
Definition: rte_flow.h:2363
@ RTE_FLOW_ACTION_TYPE_OF_PUSH_MPLS
Definition: rte_flow.h:2479
@ RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID
Definition: rte_flow.h:2455
@ RTE_FLOW_ACTION_TYPE_OF_SET_NW_TTL
Definition: rte_flow.h:2396
@ RTE_FLOW_ACTION_TYPE_INC_TCP_ACK
Definition: rte_flow.h:2715
@ RTE_FLOW_ACTION_TYPE_FLAG
Definition: rte_flow.h:2264
@ RTE_FLOW_ACTION_TYPE_CONNTRACK
Definition: rte_flow.h:2839
@ RTE_FLOW_ACTION_TYPE_SET_MAC_DST
Definition: rte_flow.h:2664
@ RTE_FLOW_ACTION_TYPE_METER_COLOR
Definition: rte_flow.h:2847
@ RTE_FLOW_ACTION_TYPE_METER
Definition: rte_flow.h:2355
@ RTE_FLOW_ACTION_TYPE_PF
Definition: rte_flow.h:2312
@ RTE_FLOW_ACTION_TYPE_SET_TAG
Definition: rte_flow.h:2745
@ RTE_FLOW_ACTION_TYPE_SHARED
Definition: rte_flow.h:2811
@ RTE_FLOW_ACTION_TYPE_SET_IPV6_DST
Definition: rte_flow.h:2579
@ RTE_FLOW_ACTION_TYPE_SET_TTL
Definition: rte_flow.h:2638
@ RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
Definition: rte_flow.h:2822
@ RTE_FLOW_ACTION_TYPE_DROP
Definition: rte_flow.h:2280
@ RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP
Definition: rte_flow.h:2463
@ RTE_FLOW_ACTION_TYPE_SET_MAC_SRC
Definition: rte_flow.h:2651
@ RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ
Definition: rte_flow.h:2698
@ RTE_FLOW_ACTION_TYPE_SAMPLE
Definition: rte_flow.h:2800
@ RTE_FLOW_ACTION_TYPE_OF_DEC_MPLS_TTL
Definition: rte_flow.h:2385
@ RTE_FLOW_ACTION_TYPE_JUMP
Definition: rte_flow.h:2240
static const struct rte_flow_item_gtp rte_flow_item_gtp_mask
Definition: rte_flow.h:1246
static const struct rte_flow_item_mpls rte_flow_item_mpls_mask
Definition: rte_flow.h:1172
static const struct rte_flow_item_l2tpv2 rte_flow_item_l2tpv2_mask
Definition: rte_flow.h:1934
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:1067
__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)
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:987
__rte_experimental int rte_flow_dynf_metadata_register(void)
static const struct rte_flow_item_vf rte_flow_item_vf_mask
Definition: rte_flow.h:737
static const struct rte_flow_item_ah rte_flow_item_ah_mask
Definition: rte_flow.h:1738
rte_flow_item_flex_tunnel_mode
Definition: rte_flow.h:2068
@ FLEX_TUNNEL_MODE_OUTER
Definition: rte_flow.h:2080
@ FLEX_TUNNEL_MODE_MULTI
Definition: rte_flow.h:2089
@ FLEX_TUNNEL_MODE_INNER
Definition: rte_flow.h:2084
@ FLEX_TUNNEL_MODE_SINGLE
Definition: rte_flow.h:2076
@ FLEX_TUNNEL_MODE_TUNNEL
Definition: rte_flow.h:2093
static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask
Definition: rte_flow.h:677
static const struct rte_flow_item_icmp6_nd_opt rte_flow_item_icmp6_nd_opt_mask
Definition: rte_flow.h:1464
__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)
rte_flow_item_flex_field_mode
Definition: rte_flow.h:2035
@ FIELD_MODE_FIXED
Definition: rte_flow.h:2046
@ FIELD_MODE_DUMMY
Definition: rte_flow.h:2041
@ FIELD_MODE_OFFSET
Definition: rte_flow.h:2053
@ FIELD_MODE_BITMASK
Definition: rte_flow.h:2062
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1332
static const struct rte_flow_item_udp rte_flow_item_udp_mask
Definition: rte_flow.h:1029
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1688
rte_flow_error_type
Definition: rte_flow.h:3811
@ RTE_FLOW_ERROR_TYPE_UNSPECIFIED
Definition: rte_flow.h:3813
@ RTE_FLOW_ERROR_TYPE_ATTR_GROUP
Definition: rte_flow.h:3815
@ RTE_FLOW_ERROR_TYPE_NONE
Definition: rte_flow.h:3812
@ RTE_FLOW_ERROR_TYPE_HANDLE
Definition: rte_flow.h:3814
@ RTE_FLOW_ERROR_TYPE_STATE
Definition: rte_flow.h:3829
@ RTE_FLOW_ERROR_TYPE_ITEM_LAST
Definition: rte_flow.h:3823
@ RTE_FLOW_ERROR_TYPE_ATTR_EGRESS
Definition: rte_flow.h:3818
@ RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER
Definition: rte_flow.h:3819
@ RTE_FLOW_ERROR_TYPE_ACTION_CONF
Definition: rte_flow.h:3827
@ RTE_FLOW_ERROR_TYPE_ITEM_MASK
Definition: rte_flow.h:3824
@ RTE_FLOW_ERROR_TYPE_ITEM_SPEC
Definition: rte_flow.h:3822
@ RTE_FLOW_ERROR_TYPE_ITEM
Definition: rte_flow.h:3825
@ RTE_FLOW_ERROR_TYPE_ACTION
Definition: rte_flow.h:3828
@ RTE_FLOW_ERROR_TYPE_ATTR
Definition: rte_flow.h:3820
@ RTE_FLOW_ERROR_TYPE_ATTR_INGRESS
Definition: rte_flow.h:3817
@ RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY
Definition: rte_flow.h:3816
@ RTE_FLOW_ERROR_TYPE_ACTION_NUM
Definition: rte_flow.h:3826
@ RTE_FLOW_ERROR_TYPE_ITEM_NUM
Definition: rte_flow.h:3821
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1438
static const struct rte_flow_item_any rte_flow_item_any_mask
Definition: rte_flow.h:704
__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)
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)
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask
Definition: rte_flow.h:946
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1714
static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask
Definition: rte_flow.h:1780
static const struct rte_flow_item_ppp rte_flow_item_ppp_mask
Definition: rte_flow.h:1962
__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)
static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask
Definition: rte_flow.h:1389
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1262
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1659
static const struct rte_flow_item_ethdev rte_flow_item_ethdev_mask
Definition: rte_flow.h:1915
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1221
static const struct rte_flow_item_geneve_opt rte_flow_item_geneve_opt_mask
Definition: rte_flow.h:1804
int rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error)
static const struct rte_flow_item_conntrack rte_flow_item_conntrack_mask
Definition: rte_flow.h:1896
__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)
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_action_handle_destroy(uint16_t port_id, struct rte_flow_action_handle *handle, struct rte_flow_error *error)
rte_eth_hash_function
Definition: rte_flow.h:2976
@ RTE_ETH_HASH_FUNCTION_SIMPLE_XOR
Definition: rte_flow.h:2979
@ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ
Definition: rte_flow.h:2985
@ RTE_ETH_HASH_FUNCTION_TOEPLITZ
Definition: rte_flow.h:2978
rte_flow_item_type
Definition: rte_flow.h:151
@ RTE_FLOW_ITEM_TYPE_AH
Definition: rte_flow.h:546
@ RTE_FLOW_ITEM_TYPE_L2TPV3OIP
Definition: rte_flow.h:570
@ RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID
Definition: rte_flow.h:525
@ RTE_FLOW_ITEM_TYPE_IPV4
Definition: rte_flow.h:272
@ RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT
Definition: rte_flow.h:444
@ RTE_FLOW_ITEM_TYPE_ICMP
Definition: rte_flow.h:286
@ RTE_FLOW_ITEM_TYPE_META
Definition: rte_flow.h:476
@ RTE_FLOW_ITEM_TYPE_FUZZY
Definition: rte_flow.h:354
@ RTE_FLOW_ITEM_TYPE_ICMP6_ND_NS
Definition: rte_flow.h:430
@ RTE_FLOW_ITEM_TYPE_GRE_KEY
Definition: rte_flow.h:489
@ RTE_FLOW_ITEM_TYPE_VXLAN
Definition: rte_flow.h:314
@ RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
Definition: rte_flow.h:629
@ RTE_FLOW_ITEM_TYPE_INTEGRITY
Definition: rte_flow.h:611
@ RTE_FLOW_ITEM_TYPE_VXLAN_GPE
Definition: rte_flow.h:402
@ RTE_FLOW_ITEM_TYPE_TCP
Definition: rte_flow.h:300
@ RTE_FLOW_ITEM_TYPE_IGMP
Definition: rte_flow.h:539
@ RTE_FLOW_ITEM_TYPE_ESP
Definition: rte_flow.h:388
@ RTE_FLOW_ITEM_TYPE_MPLS
Definition: rte_flow.h:335
@ RTE_FLOW_ITEM_TYPE_PFCP
Definition: rte_flow.h:577
@ RTE_FLOW_ITEM_TYPE_HIGIG2
Definition: rte_flow.h:552
@ RTE_FLOW_ITEM_TYPE_END
Definition: rte_flow.h:160
@ RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_SLA_ETH
Definition: rte_flow.h:452
@ RTE_FLOW_ITEM_TYPE_RAW
Definition: rte_flow.h:251
@ RTE_FLOW_ITEM_TYPE_PF
Definition: rte_flow.h:202
@ RTE_FLOW_ITEM_TYPE_NVGRE
Definition: rte_flow.h:328
@ RTE_FLOW_ITEM_TYPE_GENEVE_OPT
Definition: rte_flow.h:600
@ RTE_FLOW_ITEM_TYPE_IPV6_EXT
Definition: rte_flow.h:416
@ RTE_FLOW_ITEM_TYPE_ANY
Definition: rte_flow.h:188
@ RTE_FLOW_ITEM_TYPE_L2TPV2
Definition: rte_flow.h:655
@ RTE_FLOW_ITEM_TYPE_VLAN
Definition: rte_flow.h:265
@ RTE_FLOW_ITEM_TYPE_GTPU
Definition: rte_flow.h:381
@ RTE_FLOW_ITEM_TYPE_ARP_ETH_IPV4
Definition: rte_flow.h:409
@ RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT
Definition: rte_flow.h:593
@ RTE_FLOW_ITEM_TYPE_INVERT
Definition: rte_flow.h:180
@ RTE_FLOW_ITEM_TYPE_CONNTRACK
Definition: rte_flow.h:620
@ RTE_FLOW_ITEM_TYPE_TAG
Definition: rte_flow.h:561
@ RTE_FLOW_ITEM_TYPE_GTP
Definition: rte_flow.h:363
@ RTE_FLOW_ITEM_TYPE_FLEX
Definition: rte_flow.h:648
@ RTE_FLOW_ITEM_TYPE_ICMP6
Definition: rte_flow.h:423
@ RTE_FLOW_ITEM_TYPE_PPPOED
Definition: rte_flow.h:516
@ RTE_FLOW_ITEM_TYPE_GRE
Definition: rte_flow.h:342
@ RTE_FLOW_ITEM_TYPE_PHY_PORT
Definition: rte_flow.h:230
@ RTE_FLOW_ITEM_TYPE_VOID
Definition: rte_flow.h:170
@ RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
Definition: rte_flow.h:639
@ RTE_FLOW_ITEM_TYPE_ETH
Definition: rte_flow.h:258
@ RTE_FLOW_ITEM_TYPE_ICMP6_ND_OPT_TLA_ETH
Definition: rte_flow.h:460
@ RTE_FLOW_ITEM_TYPE_GENEVE
Definition: rte_flow.h:395
@ RTE_FLOW_ITEM_TYPE_UDP
Definition: rte_flow.h:293
@ RTE_FLOW_ITEM_TYPE_E_TAG
Definition: rte_flow.h:321
@ RTE_FLOW_ITEM_TYPE_ICMP6_ND_NA
Definition: rte_flow.h:437
@ RTE_FLOW_ITEM_TYPE_MARK
Definition: rte_flow.h:467
@ RTE_FLOW_ITEM_TYPE_IPV6
Definition: rte_flow.h:279
@ RTE_FLOW_ITEM_TYPE_PPP
Definition: rte_flow.h:662
@ RTE_FLOW_ITEM_TYPE_NSH
Definition: rte_flow.h:532
@ RTE_FLOW_ITEM_TYPE_GTP_PSC
Definition: rte_flow.h:498
@ RTE_FLOW_ITEM_TYPE_SCTP
Definition: rte_flow.h:307
@ RTE_FLOW_ITEM_TYPE_VF
Definition: rte_flow.h:216
@ RTE_FLOW_ITEM_TYPE_PORT_ID
Definition: rte_flow.h:244
@ RTE_FLOW_ITEM_TYPE_ECPRI
Definition: rte_flow.h:586
@ RTE_FLOW_ITEM_TYPE_PPPOES
Definition: rte_flow.h:507
@ RTE_FLOW_ITEM_TYPE_GTPC
Definition: rte_flow.h:372
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:885
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:1152
__rte_experimental int rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id, struct rte_flow_error *error)
rte_flow_field_id
Definition: rte_flow.h:3641
@ RTE_FLOW_FIELD_IPV6_HOPLIMIT
Definition: rte_flow.h:3653
@ RTE_FLOW_FIELD_GTP_TEID
Definition: rte_flow.h:3665
@ RTE_FLOW_FIELD_MAC_DST
Definition: rte_flow.h:3643
@ RTE_FLOW_FIELD_IPV6_DSCP
Definition: rte_flow.h:3652
@ RTE_FLOW_FIELD_MAC_SRC
Definition: rte_flow.h:3644
@ RTE_FLOW_FIELD_TCP_PORT_SRC
Definition: rte_flow.h:3656
@ RTE_FLOW_FIELD_META
Definition: rte_flow.h:3668
@ RTE_FLOW_FIELD_IPV4_SRC
Definition: rte_flow.h:3650
@ RTE_FLOW_FIELD_IPV4_DST
Definition: rte_flow.h:3651
@ RTE_FLOW_FIELD_TAG
Definition: rte_flow.h:3666
@ RTE_FLOW_FIELD_START
Definition: rte_flow.h:3642
@ RTE_FLOW_FIELD_UDP_PORT_SRC
Definition: rte_flow.h:3661
@ RTE_FLOW_FIELD_IPV6_SRC
Definition: rte_flow.h:3654
@ RTE_FLOW_FIELD_IPV6_DST
Definition: rte_flow.h:3655
@ RTE_FLOW_FIELD_TCP_FLAGS
Definition: rte_flow.h:3660
@ RTE_FLOW_FIELD_VALUE
Definition: rte_flow.h:3670
@ RTE_FLOW_FIELD_UDP_PORT_DST
Definition: rte_flow.h:3662
@ RTE_FLOW_FIELD_IPV4_TTL
Definition: rte_flow.h:3649
@ RTE_FLOW_FIELD_MARK
Definition: rte_flow.h:3667
@ RTE_FLOW_FIELD_MAC_TYPE
Definition: rte_flow.h:3647
@ RTE_FLOW_FIELD_GENEVE_VNI
Definition: rte_flow.h:3664
@ RTE_FLOW_FIELD_IPV4_DSCP
Definition: rte_flow.h:3648
@ RTE_FLOW_FIELD_VXLAN_VNI
Definition: rte_flow.h:3663
@ RTE_FLOW_FIELD_POINTER
Definition: rte_flow.h:3669
@ RTE_FLOW_FIELD_VLAN_TYPE
Definition: rte_flow.h:3645
@ RTE_FLOW_FIELD_TCP_ACK_NUM
Definition: rte_flow.h:3659
@ RTE_FLOW_FIELD_TCP_SEQ_NUM
Definition: rte_flow.h:3658
@ RTE_FLOW_FIELD_TCP_PORT_DST
Definition: rte_flow.h:3657
@ RTE_FLOW_FIELD_VLAN_ID
Definition: rte_flow.h:3646
rte_color
Definition: rte_meter.h:36
rte_be32_t u32
Definition: rte_ecpri.h:72
rte_be32_t spi
Definition: rte_esp.h:24
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:76
struct rte_ether_addr dst_addr
Definition: rte_ether.h:289
struct rte_flow_tcp_dir_param reply_dir
Definition: rte_flow.h:3580
struct rte_flow_tcp_dir_param original_dir
Definition: rte_flow.h:3578
enum rte_flow_conntrack_state state
Definition: rte_flow.h:3572
enum rte_flow_field_id field
Definition: rte_flow.h:3680
struct rte_flow_action_modify_data dst
Definition: rte_flow.h:3726
struct rte_flow_action_modify_data src
Definition: rte_flow.h:3727
enum rte_flow_modify_op operation
Definition: rte_flow.h:3725
struct rte_flow_item * definition
Definition: rte_flow.h:3285
const uint16_t * queue
Definition: rte_flow.h:3037
enum rte_eth_hash_function func
Definition: rte_flow.h:3006
const uint8_t * key
Definition: rte_flow.h:3036
uint32_t queue_num
Definition: rte_flow.h:3035
const struct rte_flow_action * actions
Definition: rte_flow.h:3802
uint32_t original
Definition: rte_flow.h:3057
uint32_t reserved
Definition: rte_flow.h:3058
struct rte_flow_item * definition
Definition: rte_flow.h:3251
const void * conf
Definition: rte_flow.h:3772
enum rte_flow_action_type type
Definition: rte_flow.h:3771
uint32_t group
Definition: rte_flow.h:86
uint32_t egress
Definition: rte_flow.h:113
uint32_t priority
Definition: rte_flow.h:87
uint32_t transfer
Definition: rte_flow.h:131
uint32_t reserved
Definition: rte_flow.h:132
uint32_t ingress
Definition: rte_flow.h:100
struct rte_flow_action * actions
Definition: rte_flow.h:3869
struct rte_flow_attr * attr
Definition: rte_flow.h:3861
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:3868
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:3864
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:3860
struct rte_flow_item * pattern
Definition: rte_flow.h:3865
struct rte_flow_action * actions
Definition: rte_flow.h:4307
uint8_t data[]
Definition: rte_flow.h:4308
struct rte_flow_attr attr
Definition: rte_flow.h:4305
struct rte_flow_item * items
Definition: rte_flow.h:4306
size_t size
Definition: rte_flow.h:4304
const char * message
Definition: rte_flow.h:3846
enum rte_flow_error_type type
Definition: rte_flow.h:3844
const void * cause
Definition: rte_flow.h:3845
uint32_t num
Definition: rte_flow.h:699
struct rte_ether_addr tha
Definition: rte_flow.h:1325
struct rte_ether_addr sha
Definition: rte_flow.h:1323
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:1117
rte_be16_t inner_type
Definition: rte_flow.h:1122
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:1119
struct rte_esp_hdr hdr
Definition: rte_flow.h:1257
uint32_t has_vlan
Definition: rte_flow.h:879
rte_be16_t type
Definition: rte_flow.h:875
uint32_t reserved
Definition: rte_flow.h:880
struct rte_ether_addr dst
Definition: rte_flow.h:873
struct rte_ether_addr src
Definition: rte_flow.h:874
struct rte_flow_item_flex_field next_protocol
Definition: rte_flow.h:2153
struct rte_flow_item_flex_link * output_link
Definition: rte_flow.h:2177
enum rte_flow_item_flex_tunnel_mode tunnel
Definition: rte_flow.h:2142
struct rte_flow_item_flex_link * input_link
Definition: rte_flow.h:2169
struct rte_flow_item_flex_field next_header
Definition: rte_flow.h:2148
struct rte_flow_item_flex_field * sample_data
Definition: rte_flow.h:2159
enum rte_flow_item_flex_field_mode field_mode
Definition: rte_flow.h:2104
const uint8_t * pattern
Definition: rte_flow.h:2030
struct rte_flow_item_flex_handle * handle
Definition: rte_flow.h:2028
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1279
rte_be16_t protocol
Definition: rte_flow.h:1280
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:1187
rte_be16_t protocol
Definition: rte_flow.h:1188
struct rte_gtp_psc_generic_hdr hdr
Definition: rte_flow.h:1547
rte_be32_t teid
Definition: rte_flow.h:1241
rte_be16_t msg_len
Definition: rte_flow.h:1240
uint8_t v_pt_rsv_flags
Definition: rte_flow.h:1238
uint8_t msg_type
Definition: rte_flow.h:1239
struct rte_ether_addr sla
Definition: rte_flow.h:1483
struct rte_ether_addr tla
Definition: rte_flow.h:1508
struct rte_icmp_hdr hdr
Definition: rte_flow.h:1005
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:941
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:962
uint32_t has_hip_ext
Definition: rte_flow.h:978
uint32_t has_frag_ext
Definition: rte_flow.h:968
uint32_t has_auth_ext
Definition: rte_flow.h:970
uint32_t has_dest_ext
Definition: rte_flow.h:974
uint32_t has_shim6_ext
Definition: rte_flow.h:980
uint32_t reserved
Definition: rte_flow.h:982
uint32_t has_esp_ext
Definition: rte_flow.h:972
uint32_t has_route_ext
Definition: rte_flow.h:966
uint32_t has_mobil_ext
Definition: rte_flow.h:976
uint32_t has_hop_ext
Definition: rte_flow.h:964
uint8_t label_tc_s[3]
Definition: rte_flow.h:1166
uint8_t tni[3]
Definition: rte_flow.h:1146
rte_be16_t protocol
Definition: rte_flow.h:1145
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:1144
uint8_t version_type
Definition: rte_flow.h:1567
rte_be16_t length
Definition: rte_flow.h:1570
rte_be16_t session_id
Definition: rte_flow.h:1569
const uint8_t * pattern
Definition: rte_flow.h:832
uint16_t length
Definition: rte_flow.h:831
uint32_t search
Definition: rte_flow.h:827
int32_t offset
Definition: rte_flow.h:829
uint32_t reserved
Definition: rte_flow.h:828
uint16_t limit
Definition: rte_flow.h:830
uint32_t relative
Definition: rte_flow.h:826
struct rte_sctp_hdr hdr
Definition: rte_flow.h:1062
struct rte_tcp_hdr hdr
Definition: rte_flow.h:1043
struct rte_udp_hdr hdr
Definition: rte_flow.h:1024
uint32_t id
Definition: rte_flow.h:732
rte_be16_t tci
Definition: rte_flow.h:915
rte_be16_t inner_type
Definition: rte_flow.h:916
uint32_t reserved
Definition: rte_flow.h:922
uint32_t has_more_vlan
Definition: rte_flow.h:921
uint8_t vni[3]
Definition: rte_flow.h:1090
uint8_t rsvd0[3]
Definition: rte_flow.h:1089
const void * spec
Definition: rte_flow.h:2006
const void * mask
Definition: rte_flow.h:2008
enum rte_flow_item_type type
Definition: rte_flow.h:2005
const void * last
Definition: rte_flow.h:2007
struct rte_flow_action_conntrack new_ct
Definition: rte_flow.h:3604
uint32_t sec_since_last_hit
Definition: rte_flow.h:2935
uint32_t sec_since_last_hit_valid
Definition: rte_flow.h:2934
uint32_t reserved
Definition: rte_flow.h:2931
struct rte_flow_tunnel tunnel
Definition: rte_flow.h:4641
uint32_t close_initiated
Definition: rte_flow.h:3508
rte_be32_t src_addr
Definition: rte_ip.h:62
uint8_t src_addr[16]
Definition: rte_ip.h:442
struct rte_l2tpv2_common_hdr common
Definition: rte_l2tpv2.h:210
rte_be16_t flags_version
Definition: rte_l2tpv2.h:88
uint8_t addr
Definition: rte_ppp.h:25
rte_be16_t src_port
Definition: rte_sctp.h:29
rte_be16_t src_port
Definition: rte_tcp.h:29
rte_be16_t src_port
Definition: rte_udp.h:29
rte_be16_t vlan_tci
Definition: rte_ether.h:300
rte_be32_t vx_vni
Definition: rte_vxlan.h:35