DPDK  20.08.0
rte_flow.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2016 6WIND S.A.
3  * Copyright 2016 Mellanox Technologies, Ltd
4  */
5 
6 #ifndef RTE_FLOW_H_
7 #define RTE_FLOW_H_
8 
17 #include <stddef.h>
18 #include <stdint.h>
19 
20 #include <rte_arp.h>
21 #include <rte_common.h>
22 #include <rte_ether.h>
23 #include <rte_icmp.h>
24 #include <rte_ip.h>
25 #include <rte_sctp.h>
26 #include <rte_tcp.h>
27 #include <rte_udp.h>
28 #include <rte_byteorder.h>
29 #include <rte_esp.h>
30 #include <rte_higig.h>
31 #include <rte_ecpri.h>
32 #include <rte_mbuf.h>
33 #include <rte_mbuf_dyn.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
76 struct rte_flow_attr {
77  uint32_t group;
78  uint32_t priority;
79  uint32_t ingress:1;
80  uint32_t egress:1;
99  uint32_t transfer:1;
100  uint32_t reserved:29;
101 };
102 
129 
139 
149 
157 
167 
177 
187 
197 
204 
211 
218 
225 
232 
239 
246 
253 
260 
267 
274 
281 
288 
295 
307 
316 
325 
334 
341 
348 
355 
362 
369 
376 
383 
390 
397 
405 
413 
420 
429 
442 
451 
460 
469 
478 
485 
492 
499 
505 
514 
523 
530 
539 
540 };
541 
549  struct rte_higig2_hdr hdr;
550 };
551 
553 #ifndef __cplusplus
555  .hdr = {
556  .ppt1 = {
557  .classification = 0xffff,
558  .vid = 0xfff,
559  },
560  },
561 };
562 #endif
563 
576  uint32_t num;
577 };
578 
580 #ifndef __cplusplus
582  .num = 0x00000000,
583 };
584 #endif
585 
605  uint32_t id;
606 };
607 
609 #ifndef __cplusplus
611  .id = 0x00000000,
612 };
613 #endif
614 
636  uint32_t index;
637 };
638 
640 #ifndef __cplusplus
642  .index = 0x00000000,
643 };
644 #endif
645 
662  uint32_t id;
663 };
664 
666 #ifndef __cplusplus
668  .id = 0xffffffff,
669 };
670 #endif
671 
691  uint32_t relative:1;
692  uint32_t search:1;
693  uint32_t reserved:30;
694  int32_t offset;
695  uint16_t limit;
696  uint16_t length;
697  const uint8_t *pattern;
698 };
699 
701 #ifndef __cplusplus
703  .relative = 1,
704  .search = 1,
705  .reserved = 0x3fffffff,
706  .offset = 0xffffffff,
707  .limit = 0xffff,
708  .length = 0xffff,
709  .pattern = NULL,
710 };
711 #endif
712 
734 };
735 
737 #ifndef __cplusplus
739  .dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
740  .src.addr_bytes = "\xff\xff\xff\xff\xff\xff",
741  .type = RTE_BE16(0x0000),
742 };
743 #endif
744 
759 };
760 
762 #ifndef __cplusplus
764  .tci = RTE_BE16(0x0fff),
765  .inner_type = RTE_BE16(0x0000),
766 };
767 #endif
768 
777  struct rte_ipv4_hdr hdr;
778 };
779 
781 #ifndef __cplusplus
783  .hdr = {
784  .src_addr = RTE_BE32(0xffffffff),
785  .dst_addr = RTE_BE32(0xffffffff),
786  },
787 };
788 #endif
789 
799  struct rte_ipv6_hdr hdr;
800 };
801 
803 #ifndef __cplusplus
805  .hdr = {
806  .src_addr =
807  "\xff\xff\xff\xff\xff\xff\xff\xff"
808  "\xff\xff\xff\xff\xff\xff\xff\xff",
809  .dst_addr =
810  "\xff\xff\xff\xff\xff\xff\xff\xff"
811  "\xff\xff\xff\xff\xff\xff\xff\xff",
812  },
813 };
814 #endif
815 
822  struct rte_icmp_hdr hdr;
823 };
824 
826 #ifndef __cplusplus
828  .hdr = {
829  .icmp_type = 0xff,
830  .icmp_code = 0xff,
831  },
832 };
833 #endif
834 
841  struct rte_udp_hdr hdr;
842 };
843 
845 #ifndef __cplusplus
847  .hdr = {
848  .src_port = RTE_BE16(0xffff),
849  .dst_port = RTE_BE16(0xffff),
850  },
851 };
852 #endif
853 
860  struct rte_tcp_hdr hdr;
861 };
862 
864 #ifndef __cplusplus
866  .hdr = {
867  .src_port = RTE_BE16(0xffff),
868  .dst_port = RTE_BE16(0xffff),
869  },
870 };
871 #endif
872 
879  struct rte_sctp_hdr hdr;
880 };
881 
883 #ifndef __cplusplus
885  .hdr = {
886  .src_port = RTE_BE16(0xffff),
887  .dst_port = RTE_BE16(0xffff),
888  },
889 };
890 #endif
891 
898  uint8_t flags;
899  uint8_t rsvd0[3];
900  uint8_t vni[3];
901  uint8_t rsvd1;
902 };
903 
905 #ifndef __cplusplus
907  .vni = "\xff\xff\xff",
908 };
909 #endif
910 
927  uint8_t in_ecid_e;
928  uint8_t ecid_e;
930 };
931 
933 #ifndef __cplusplus
935  .rsvd_grp_ecid_b = RTE_BE16(0x3fff),
936 };
937 #endif
938 
953  uint8_t tni[3];
954  uint8_t flow_id;
955 };
956 
958 #ifndef __cplusplus
960  .tni = "\xff\xff\xff",
961 };
962 #endif
963 
973  uint8_t label_tc_s[3];
974  uint8_t ttl;
975 };
976 
978 #ifndef __cplusplus
980  .label_tc_s = "\xff\xff\xf0",
981 };
982 #endif
983 
996 };
997 
999 #ifndef __cplusplus
1001  .protocol = RTE_BE16(0xffff),
1002 };
1003 #endif
1004 
1023  uint32_t thresh;
1024 };
1025 
1027 #ifndef __cplusplus
1029  .thresh = 0xffffffff,
1030 };
1031 #endif
1032 
1046  uint8_t msg_type;
1049 };
1050 
1052 #ifndef __cplusplus
1054  .teid = RTE_BE32(0xffffffff),
1055 };
1056 #endif
1057 
1064  struct rte_esp_hdr hdr;
1065 };
1066 
1068 #ifndef __cplusplus
1070  .hdr = {
1071  .spi = RTE_BE32(0xffffffff),
1072  },
1073 };
1074 #endif
1075 
1088  uint8_t vni[3];
1089  uint8_t rsvd1;
1090 };
1091 
1093 #ifndef __cplusplus
1095  .vni = "\xff\xff\xff",
1096 };
1097 #endif
1098 
1105  uint8_t flags;
1106  uint8_t rsvd0[2];
1107  uint8_t protocol;
1108  uint8_t vni[3];
1109  uint8_t rsvd1;
1110 };
1111 
1113 #ifndef __cplusplus
1115  .vni = "\xff\xff\xff",
1116 };
1117 #endif
1118 
1127  uint8_t hln;
1128  uint8_t pln;
1134 };
1135 
1137 #ifndef __cplusplus
1138 static const struct rte_flow_item_arp_eth_ipv4
1140  .sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1141  .spa = RTE_BE32(0xffffffff),
1142  .tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1143  .tpa = RTE_BE32(0xffffffff),
1144 };
1145 #endif
1146 
1158  uint8_t next_hdr;
1159 };
1160 
1162 #ifndef __cplusplus
1163 static const
1165  .next_hdr = 0xff,
1166 };
1167 #endif
1168 
1175  uint8_t type;
1176  uint8_t code;
1177  uint16_t checksum;
1178 };
1179 
1181 #ifndef __cplusplus
1183  .type = 0xff,
1184  .code = 0xff,
1185 };
1186 #endif
1187 
1194  uint8_t type;
1195  uint8_t code;
1198  uint8_t target_addr[16];
1199 };
1200 
1202 #ifndef __cplusplus
1203 static const
1205  .target_addr =
1206  "\xff\xff\xff\xff\xff\xff\xff\xff"
1207  "\xff\xff\xff\xff\xff\xff\xff\xff",
1208 };
1209 #endif
1210 
1217  uint8_t type;
1218  uint8_t code;
1225  uint8_t target_addr[16];
1226 };
1227 
1229 #ifndef __cplusplus
1230 static const
1232  .target_addr =
1233  "\xff\xff\xff\xff\xff\xff\xff\xff"
1234  "\xff\xff\xff\xff\xff\xff\xff\xff",
1235 };
1236 #endif
1237 
1250  uint8_t type;
1251  uint8_t length;
1252 };
1253 
1255 #ifndef __cplusplus
1256 static const struct rte_flow_item_icmp6_nd_opt
1258  .type = 0xff,
1259 };
1260 #endif
1261 
1274  uint8_t type;
1275  uint8_t length;
1277 };
1278 
1280 #ifndef __cplusplus
1281 static const struct rte_flow_item_icmp6_nd_opt_sla_eth
1283  .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1284 };
1285 #endif
1286 
1299  uint8_t type;
1300  uint8_t length;
1302 };
1303 
1305 #ifndef __cplusplus
1306 static const struct rte_flow_item_icmp6_nd_opt_tla_eth
1308  .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
1309 };
1310 #endif
1311 
1323  uint32_t data;
1324 };
1325 
1327 #ifndef __cplusplus
1329  .data = UINT32_MAX,
1330 };
1331 #endif
1332 
1339  uint8_t pdu_type;
1340  uint8_t qfi;
1341 };
1342 
1344 #ifndef __cplusplus
1345 static const struct rte_flow_item_gtp_psc
1347  .qfi = 0x3f,
1348 };
1349 #endif
1350 
1360  uint8_t version_type;
1361  uint8_t code;
1364 };
1365 
1380 };
1381 
1383 #ifndef __cplusplus
1384 static const struct rte_flow_item_pppoe_proto_id
1386  .proto_id = RTE_BE16(0xffff),
1387 };
1388 #endif
1389 
1399  uint32_t data;
1400  uint8_t index;
1401 };
1402 
1404 #ifndef __cplusplus
1406  .data = 0xffffffff,
1407  .index = 0xff,
1408 };
1409 #endif
1410 
1418 };
1419 
1421 #ifndef __cplusplus
1423  .session_id = RTE_BE32(UINT32_MAX),
1424 };
1425 #endif
1426 
1427 
1447  uint32_t id;
1448 };
1449 
1451 #ifndef __cplusplus
1453  .id = 0xffffffff,
1454 };
1455 #endif
1456 
1467  uint32_t version:2;
1468  uint32_t oam_pkt:1;
1469  uint32_t reserved:1;
1470  uint32_t ttl:6;
1471  uint32_t length:6;
1472  uint32_t reserved1:4;
1473  uint32_t mdtype:4;
1474  uint32_t next_proto:8;
1475  uint32_t spi:24;
1476  uint32_t sindex:8;
1477 };
1478 
1480 #ifndef __cplusplus
1482  .mdtype = 0xf,
1483  .next_proto = 0xff,
1484  .spi = 0xffffff,
1485  .sindex = 0xff,
1486 };
1487 #endif
1488 
1499  uint32_t type:8;
1500  uint32_t max_resp_time:8;
1501  uint32_t checksum:16;
1502  uint32_t group_addr;
1503 };
1504 
1506 #ifndef __cplusplus
1508  .group_addr = 0xffffffff,
1509 };
1510 #endif
1511 
1522  uint32_t next_hdr:8;
1523  uint32_t payload_len:8;
1524  uint32_t reserved:16;
1525  uint32_t spi;
1526  uint32_t seq_num;
1527 };
1528 
1530 #ifndef __cplusplus
1532  .spi = 0xffffffff,
1533 };
1534 #endif
1535 
1545  uint8_t s_field;
1546  uint8_t msg_type;
1547  rte_be16_t msg_len;
1548  rte_be64_t seid;
1549 };
1550 
1552 #ifndef __cplusplus
1554  .s_field = 0x01,
1555  .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1556 };
1557 #endif
1558 
1568  struct rte_ecpri_combined_msg_hdr hdr;
1569 };
1570 
1572 #ifndef __cplusplus
1574  .hdr = {
1575  .common = {
1576  .u32 = 0x0,
1577  },
1578  },
1579 };
1580 #endif
1581 
1617  const void *spec;
1618  const void *last;
1619  const void *mask;
1620 };
1621 
1656 
1664 
1672 
1681 
1689 
1697 
1704 
1713 
1723 
1732 
1740 
1748 
1756 
1763 
1771 
1779 
1787 
1795 
1803 
1811 
1820 
1829 
1837 
1845 
1853 
1861 
1869 
1877 
1885 
1894 
1902 
1911 
1918 
1925 
1935 
1945 
1955 
1965 
1976 
1987 
1998 
2005 
2012 
2022 
2032 
2046 
2060 
2074 
2088 
2098 
2105 
2115 
2125 
2135 };
2136 
2148  uint32_t id;
2149 };
2150 
2164  uint32_t group;
2165 };
2166 
2173  uint16_t index;
2174 };
2175 
2190  uint32_t timeout:24;
2191  uint32_t reserved:8;
2192  void *context;
2194 };
2195 
2222  uint32_t shared:1;
2223  uint32_t reserved:31;
2224  uint32_t id;
2225 };
2226 
2233  uint32_t reset:1;
2234  uint32_t hits_set:1;
2235  uint32_t bytes_set:1;
2236  uint32_t reserved:29;
2237  uint64_t hits;
2238  uint64_t bytes;
2239 };
2240 
2245  RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
2254  RTE_ETH_HASH_FUNCTION_MAX,
2255 };
2256 
2300  uint32_t level;
2301  uint64_t types;
2302  uint32_t key_len;
2303  uint32_t queue_num;
2304  const uint8_t *key;
2305  const uint16_t *queue;
2306 };
2307 
2321  uint32_t original:1;
2322  uint32_t reserved:31;
2323  uint32_t id;
2324 };
2325 
2335  uint32_t original:1;
2336  uint32_t reserved:31;
2337  uint32_t index;
2338 };
2339 
2348  uint32_t original:1;
2349  uint32_t reserved:31;
2350  uint32_t id;
2351 };
2352 
2362  uint32_t mtr_id;
2363 };
2364 
2397 };
2398 
2406  uint8_t mpls_ttl;
2407 };
2408 
2416  uint8_t nw_ttl;
2417 };
2418 
2427 };
2428 
2437 };
2438 
2446  uint8_t vlan_pcp;
2447 };
2448 
2457 };
2458 
2467 };
2468 
2502 };
2503 
2536 };
2537 
2558  uint8_t *data;
2559  uint8_t *preserve;
2560  size_t size;
2561 };
2562 
2579  uint8_t *data;
2580  size_t size;
2581 };
2582 
2595  rte_be32_t ipv4_addr;
2596 };
2597 
2610  uint8_t ipv6_addr[16];
2611 };
2612 
2625  rte_be16_t port;
2626 };
2627 
2634  uint8_t ttl_value;
2635 };
2636 
2643  uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
2644 };
2645 
2656  uint32_t data;
2657  uint32_t mask;
2658  uint8_t index;
2659 };
2660 
2681  uint32_t data;
2682  uint32_t mask;
2683 };
2684 
2693  uint8_t dscp;
2694 };
2695 
2696 /* Mbuf dynamic field offset for metadata. */
2697 extern int32_t rte_flow_dynf_metadata_offs;
2698 
2699 /* Mbuf dynamic field flag mask for metadata. */
2700 extern uint64_t rte_flow_dynf_metadata_mask;
2701 
2702 /* Mbuf dynamic field pointer for metadata. */
2703 #define RTE_FLOW_DYNF_METADATA(m) \
2704  RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *)
2705 
2706 /* Mbuf dynamic flags for metadata. */
2707 #define PKT_RX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
2708 #define PKT_TX_DYNF_METADATA (rte_flow_dynf_metadata_mask)
2709 
2710 __rte_experimental
2711 static inline uint32_t
2712 rte_flow_dynf_metadata_get(struct rte_mbuf *m)
2713 {
2714  return *RTE_FLOW_DYNF_METADATA(m);
2715 }
2716 
2717 __rte_experimental
2718 static inline void
2719 rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
2720 {
2721  *RTE_FLOW_DYNF_METADATA(m) = v;
2722 }
2723 
2724 /*
2725  * Definition of a single action.
2726  *
2727  * A list of actions is terminated by a END action.
2728  *
2729  * For simple actions without a configuration object, conf remains NULL.
2730  */
2731 struct rte_flow_action {
2732  enum rte_flow_action_type type;
2733  const void *conf;
2734 };
2735 
2742 struct rte_flow;
2743 
2768 };
2769 
2783  const void *cause;
2784  const char *message;
2785 };
2786 
2797  union {
2798  const struct rte_flow_attr *attr_ro;
2800  };
2801  union {
2802  const struct rte_flow_item *pattern_ro;
2804  };
2805  union {
2806  const struct rte_flow_action *actions_ro;
2807  struct rte_flow_action *actions;
2808  };
2809 };
2810 
2823 
2835 
2847 
2859 
2872 
2885 
2898 
2912 
2926 
2940 
2954 };
2955 
2973 __rte_experimental
2974 int
2975 rte_flow_dev_dump(uint16_t port_id, FILE *file, struct rte_flow_error *error);
2976 
2983 __rte_experimental
2984 static inline int
2986 {
2987  return !!rte_flow_dynf_metadata_mask;
2988 }
2989 
3000 __rte_experimental
3001 int
3003 
3056 int
3057 rte_flow_validate(uint16_t port_id,
3058  const struct rte_flow_attr *attr,
3059  const struct rte_flow_item pattern[],
3060  const struct rte_flow_action actions[],
3061  struct rte_flow_error *error);
3062 
3083 struct rte_flow *
3084 rte_flow_create(uint16_t port_id,
3085  const struct rte_flow_attr *attr,
3086  const struct rte_flow_item pattern[],
3087  const struct rte_flow_action actions[],
3088  struct rte_flow_error *error);
3089 
3110 int
3111 rte_flow_destroy(uint16_t port_id,
3112  struct rte_flow *flow,
3113  struct rte_flow_error *error);
3114 
3131 int
3132 rte_flow_flush(uint16_t port_id,
3133  struct rte_flow_error *error);
3134 
3159 int
3160 rte_flow_query(uint16_t port_id,
3161  struct rte_flow *flow,
3162  const struct rte_flow_action *action,
3163  void *data,
3164  struct rte_flow_error *error);
3165 
3207 int
3208 rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error);
3209 
3227 int
3228 rte_flow_error_set(struct rte_flow_error *error,
3229  int code,
3230  enum rte_flow_error_type type,
3231  const void *cause,
3232  const char *message);
3233 
3239  size_t size;
3242  struct rte_flow_action *actions;
3243  uint8_t data[];
3244 };
3245 
3272 __rte_deprecated
3273 size_t
3274 rte_flow_copy(struct rte_flow_desc *fd, size_t len,
3275  const struct rte_flow_attr *attr,
3276  const struct rte_flow_item *items,
3277  const struct rte_flow_action *actions);
3278 
3319 __rte_experimental
3320 int
3322  void *dst,
3323  size_t size,
3324  const void *src,
3325  struct rte_flow_error *error);
3326 
3355 __rte_experimental
3356 int
3357 rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
3358  uint32_t nb_contexts, struct rte_flow_error *error);
3359 
3360 #ifdef __cplusplus
3361 }
3362 #endif
3363 
3364 #endif /* RTE_FLOW_H_ */
uint32_t reserved
Definition: rte_flow.h:100
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
Definition: rte_flow.h:1282
rte_be32_t u32
Definition: rte_ecpri.h:63
rte_be16_t c_rsvd0_ver
Definition: rte_flow.h:994
rte_be16_t ver_opt_len_o_c_rsvd0
Definition: rte_flow.h:1086
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)
struct rte_flow_action * actions
Definition: rte_flow.h:2807
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
Definition: rte_flow.h:1231
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
Definition: rte_flow.h:804
rte_be16_t epcp_edei_in_ecid_b
Definition: rte_flow.h:924
rte_be16_t protocol
Definition: rte_flow.h:1087
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
Definition: rte_flow.h:1553
uint32_t num
Definition: rte_flow.h:576
struct rte_flow_attr * attr
Definition: rte_flow.h:2799
uint32_t rte_be32_t
uint32_t original
Definition: rte_flow.h:2321
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)
uint32_t group
Definition: rte_flow.h:77
struct rte_flow_item * definition
Definition: rte_flow.h:2501
static const struct rte_flow_item_gre rte_flow_item_gre_mask
Definition: rte_flow.h:1000
struct rte_flow_attr attr
Definition: rte_flow.h:3240
rte_be16_t msg_len
Definition: rte_flow.h:1047
static const struct rte_flow_item_gtp rte_flow_item_gtp_mask
Definition: rte_flow.h:1053
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
Definition: rte_flow.h:827
#define RTE_ETHER_ADDR_LEN
Definition: rte_ether.h:26
static const struct rte_flow_item_geneve rte_flow_item_geneve_mask
Definition: rte_flow.h:1094
const struct rte_flow_attr * attr_ro
Definition: rte_flow.h:2798
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
Definition: rte_flow.h:884
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:581
static const struct rte_flow_item_meta rte_flow_item_meta_mask
Definition: rte_flow.h:1328
static const struct rte_flow_item_esp rte_flow_item_esp_mask
Definition: rte_flow.h:1069
struct rte_icmp_hdr hdr
Definition: rte_flow.h:822
__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:1045
struct rte_ether_addr tla
Definition: rte_flow.h:1301
rte_be16_t protocol
Definition: rte_flow.h:952
uint32_t reserved
Definition: rte_flow.h:693
rte_be32_t spi
Definition: rte_esp.h:24
static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask
Definition: rte_flow.h:1182
rte_be16_t src_port
Definition: rte_sctp.h:29
struct rte_flow_action * actions
Definition: rte_flow.h:3242
uint8_t data[]
Definition: rte_flow.h:3243
struct rte_ether_addr tha
Definition: rte_flow.h:1132
struct rte_ipv4_hdr hdr
Definition: rte_flow.h:777
static const struct rte_flow_item_mark rte_flow_item_mark_mask
Definition: rte_flow.h:1452
rte_be32_t src_addr
Definition: rte_ip.h:42
static const struct rte_flow_item_icmp6_nd_opt rte_flow_item_icmp6_nd_opt_mask
Definition: rte_flow.h:1257
static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask
Definition: rte_flow.h:641
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
Definition: rte_flow.h:906
uint8_t src_addr[16]
Definition: rte_ip.h:370
static const struct rte_flow_item_port_id rte_flow_item_port_id_mask
Definition: rte_flow.h:667
static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask
Definition: rte_flow.h:554
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
Definition: rte_flow.h:959
uint64_t rte_be64_t
const void * mask
Definition: rte_flow.h:1619
struct rte_flow_item * pattern
Definition: rte_flow.h:2803
enum rte_eth_hash_function func
Definition: rte_flow.h:2274
rte_be16_t type
Definition: rte_flow.h:733
enum rte_flow_error_type type
Definition: rte_flow.h:2782
const void * cause
Definition: rte_flow.h:2783
static const struct rte_flow_item_udp rte_flow_item_udp_mask
Definition: rte_flow.h:846
struct rte_esp_hdr hdr
Definition: rte_flow.h:1064
rte_flow_error_type
Definition: rte_flow.h:2750
rte_flow_conv_op
Definition: rte_flow.h:2816
rte_be16_t src_port
Definition: rte_udp.h:29
uint32_t id
Definition: rte_flow.h:605
const uint8_t * pattern
Definition: rte_flow.h:697
uint32_t search
Definition: rte_flow.h:692
rte_be16_t rsvd_grp_ecid_b
Definition: rte_flow.h:926
static const struct rte_flow_item_raw rte_flow_item_raw_mask
Definition: rte_flow.h:702
uint16_t limit
Definition: rte_flow.h:695
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:979
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
Definition: rte_flow.h:1204
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 char * message
Definition: rte_flow.h:2784
rte_eth_hash_function
Definition: rte_flow.h:2244
uint16_t length
Definition: rte_flow.h:696
const void * last
Definition: rte_flow.h:1618
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
Definition: rte_flow.h:1307
rte_be32_t teid
Definition: rte_flow.h:1048
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
uint32_t ingress
Definition: rte_flow.h:79
enum rte_flow_item_type type
Definition: rte_flow.h:1616
rte_be16_t tci
Definition: rte_flow.h:757
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask
Definition: rte_flow.h:782
size_t size
Definition: rte_flow.h:3239
rte_be16_t c_k_s_rsvd0_ver
Definition: rte_flow.h:951
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
Definition: rte_flow.h:1346
rte_be16_t length
Definition: rte_flow.h:1363
const struct rte_flow_action * actions_ro
Definition: rte_flow.h:2806
struct rte_flow_item * items
Definition: rte_flow.h:3241
__rte_experimental int rte_flow_get_aged_flows(uint16_t port_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
rte_flow_action_type
Definition: rte_flow.h:1648
struct rte_ether_addr sla
Definition: rte_flow.h:1276
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:731
static const struct rte_flow_item_l2tpv3oip rte_flow_item_l2tpv3oip_mask
Definition: rte_flow.h:1422
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
Definition: rte_flow.h:1507
const void * spec
Definition: rte_flow.h:1617
uint8_t label_tc_s[3]
Definition: rte_flow.h:973
uint8_t version_type
Definition: rte_flow.h:1360
#define RTE_STD_C11
Definition: rte_common.h:40
const uint8_t * key
Definition: rte_flow.h:2304
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
Definition: rte_flow.h:1139
struct rte_ether_addr sha
Definition: rte_flow.h:1130
static const struct rte_flow_item_eth rte_flow_item_eth_mask
Definition: rte_flow.h:738
rte_be16_t src_port
Definition: rte_tcp.h:29
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 reserved
Definition: rte_flow.h:2322
__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:1531
static const struct rte_flow_item_tag rte_flow_item_tag_mask
Definition: rte_flow.h:1405
uint32_t priority
Definition: rte_flow.h:78
struct rte_ether_addr src
Definition: rte_flow.h:732
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
Definition: rte_flow.h:1164
static const struct rte_flow_item_vf rte_flow_item_vf_mask
Definition: rte_flow.h:610
struct rte_ipv6_hdr hdr
Definition: rte_flow.h:799
static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask
Definition: rte_flow.h:1573
rte_be16_t protocol
Definition: rte_flow.h:995
uint32_t queue_num
Definition: rte_flow.h:2303
uint8_t tni[3]
Definition: rte_flow.h:953
struct rte_tcp_hdr hdr
Definition: rte_flow.h:860
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
Definition: rte_flow.h:1385
__rte_experimental int rte_flow_dev_dump(uint16_t port_id, FILE *file, struct rte_flow_error *error)
uint32_t transfer
Definition: rte_flow.h:99
struct rte_flow_item * definition
Definition: rte_flow.h:2535
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
Definition: rte_flow.h:763
uint8_t msg_type
Definition: rte_flow.h:1046
uint32_t egress
Definition: rte_flow.h:80
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
Definition: rte_flow.h:934
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
Definition: rte_flow.h:2985
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask
Definition: rte_flow.h:865
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
Definition: rte_flow.h:1028
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
Definition: rte_ether.h:61
rte_be16_t inner_type
Definition: rte_flow.h:758
uint8_t rsvd0[3]
Definition: rte_flow.h:899
struct rte_udp_hdr hdr
Definition: rte_flow.h:841
const uint16_t * queue
Definition: rte_flow.h:2305
rte_flow_item_type
Definition: rte_flow.h:119
uint32_t relative
Definition: rte_flow.h:691
uint8_t vni[3]
Definition: rte_flow.h:900
int32_t offset
Definition: rte_flow.h:694
rte_be16_t inner_type
Definition: rte_flow.h:929
const struct rte_flow_item * pattern_ro
Definition: rte_flow.h:2802
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
Definition: rte_flow.h:1114
rte_be16_t session_id
Definition: rte_flow.h:1362
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
Definition: rte_flow.h:1481
struct rte_sctp_hdr hdr
Definition: rte_flow.h:879