NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_flow.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED.
3  *
4  * This software product is a proprietary product of NVIDIA CORPORATION &
5  * AFFILIATES (the "Company") and all right, title, and interest in and to the
6  * software product, including all associated intellectual property rights, are
7  * and shall remain exclusively with the Company.
8  *
9  * This software product is governed by the End User License Agreement
10  * provided with the software product.
11  *
12  */
13 
24 #ifndef DOCA_FLOW_H_
25 #define DOCA_FLOW_H_
26 
27 #include <stdio.h>
28 #include <stdint.h>
29 #include <stdbool.h>
30 
31 #include <doca_compat.h>
32 #include <doca_error.h>
33 
34 #include <doca_flow_net.h>
35 #include <doca_flow_crypto.h>
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 struct doca_dev;
42 struct doca_dev_rep;
43 
47 struct doca_flow_port;
48 
52 struct doca_flow_pipe;
53 
57 struct doca_flow_pipe_entry;
58 
62 struct doca_flow_target;
63 
67 struct doca_flow_parser;
68 
72 struct doca_flow_definitions;
73 
77 struct doca_flow_cfg;
78 
82 struct doca_flow_port_cfg;
83 
87 struct doca_flow_pipe_cfg;
88 
109 };
110 
115  DOCA_FLOW_NO_WAIT = 0,
117  DOCA_FLOW_WAIT_FOR_BATCH = (1 << 0),
119 };
120 
131 };
132 
141 };
142 
155 };
156 
162  /* The operation is in progress. */
164  /* The operation was completed successfully. */
166  /* The operation failed. */
167 };
168 
175 };
176 
181  uint32_t outer_flags;
183  uint32_t inner_flags;
185  uint16_t *queues_array;
191 };
192 
196 typedef void (*doca_flow_pipe_process_cb)(struct doca_flow_pipe *pipe,
197  enum doca_flow_pipe_status status,
198  enum doca_flow_pipe_op op,
199  void *user_ctx);
200 
204 typedef void (*doca_flow_entry_process_cb)(struct doca_flow_pipe_entry *entry,
205  uint16_t pipe_queue,
206  enum doca_flow_entry_status status,
207  enum doca_flow_entry_op op,
208  void *user_ctx);
209 
214  uint32_t shared_resource_id,
215  void *bindable_obj);
216 
235 };
236 
249 };
250 
254 #define DOCA_FLOW_META_SCRATCH_PAD_MAX 10
255 
259 #define DOCA_FLOW_META_MAX ((DOCA_FLOW_META_SCRATCH_PAD_MAX + 1) * 4)
260 
264 #define DOCA_FLOW_MAX_ENTRY_ACTIONS_MEM_SIZE (128)
265 
267 enum __attribute__((__packed__)) doca_flow_meter_color {
268  DOCA_FLOW_METER_COLOR_RED = 0,
270  DOCA_FLOW_METER_COLOR_YELLOW,
272  DOCA_FLOW_METER_COLOR_GREEN,
274 };
275 
288 };
289 
300 };
301 
316 };
317 
328 };
329 
346 };
347 
362 };
363 
370  uint16_t port_id;
377  uint8_t ipsec_syndrome;
379  uint8_t psp_syndrome;
380  enum doca_flow_meter_color meter_color;
389  uint8_t outer_l3_ok;
391  uint8_t outer_l4_ok;
393  uint8_t inner_l3_ok;
395  uint8_t inner_l4_ok;
397 };
398 
403  DOCA_FLOW_MATCH_TCP_FLAG_FIN = (1 << 0),
405  DOCA_FLOW_MATCH_TCP_FLAG_SYN = (1 << 1),
407  DOCA_FLOW_MATCH_TCP_FLAG_RST = (1 << 2),
409  DOCA_FLOW_MATCH_TCP_FLAG_PSH = (1 << 3),
411  DOCA_FLOW_MATCH_TCP_FLAG_ACK = (1 << 4),
413  DOCA_FLOW_MATCH_TCP_FLAG_URG = (1 << 5),
415  DOCA_FLOW_MATCH_TCP_FLAG_ECE = (1 << 6),
417  DOCA_FLOW_MATCH_TCP_FLAG_CWR = (1 << 7),
419 };
420 
424 #define DOCA_FLOW_VLAN_MAX 2
425 
434 };
435 
440  struct doca_flow_header_eth eth;
448  union {
449  struct doca_flow_header_ip4 ip4;
451  struct doca_flow_header_ip6 ip6;
453  };
456  union {
459  struct doca_flow_header_udp udp;
461  struct doca_flow_header_tcp tcp;
467  };
468 };
469 
476  union {
477  struct doca_flow_header_ip4 ip4;
479  struct doca_flow_header_ip6 ip6;
481  };
486 };
487 
492  uint32_t flags;
494  struct doca_flow_meta meta;
500  struct doca_flow_tun tun;
504 };
505 
522 };
523 
539  const char *field_string;
541  uint32_t bit_offset;
543 };
544 
551  union {
552  struct {
553  struct doca_flow_desc_field a;
555  struct doca_flow_desc_field b;
557  uint32_t width;
560  };
561 };
562 
569  struct doca_flow_tun tun;
571 };
572 
581 };
582 
588 };
589 
596  union {
598  };
599 };
600 
607 };
608 
616 };
617 
621 #define DOCA_FLOW_PSP_DECRYPTION_ID UINT32_MAX
622 
631  union {
632  struct {
633  bool sn_en;
636  };
637  uint32_t crypto_id;
639 };
640 
649  uint16_t icv_size;
651  uint16_t data_size;
655 };
656 
661  bool is_l2;
665 };
666 
671  bool is_l2;
673  struct doca_flow_header_eth eth;
679 };
680 
685  uint8_t action_idx;
687  uint32_t flags;
691  union {
694  uint32_t shared_decap_id;
696  };
697  bool pop_vlan;
699  struct doca_flow_meta meta;
705  struct doca_flow_tun tun;
709  union {
712  uint32_t shared_encap_id;
714  };
715  bool has_push;
727 };
728 
734 };
735 
740  DOCA_FLOW_FWD_NONE = 0,
758 };
759 
764  DOCA_FLOW_RSS_IPV4 = (1 << 0),
766  DOCA_FLOW_RSS_IPV6 = (1 << 1),
768  DOCA_FLOW_RSS_UDP = (1 << 2),
770  DOCA_FLOW_RSS_TCP = (1 << 3),
772  DOCA_FLOW_RSS_ESP = (1 << 4),
774 };
775 
782  union {
783  struct {
786  union {
789  uint32_t shared_rss_id;
791  };
792  };
794  struct {
795  uint16_t port_id;
797  };
799  struct {
800  struct doca_flow_pipe *next_pipe;
802  };
804  struct {
806  struct doca_flow_pipe *pipe;
808  uint32_t idx;
811  struct {
812  struct doca_flow_target *target;
814  };
816  struct {
817  struct doca_flow_pipe *pipe;
821  } hash_pipe;
823  };
824 };
825 
836 };
837 
847 };
848 
858 };
859 
870  uint64_t cir;
872  uint64_t cbs;
874  union {
875  struct {
876  uint64_t ebs;
879  struct {
880  uint64_t pir;
882  uint64_t pbs;
885  struct {
886  uint64_t eir;
888  uint64_t ebs;
891  };
892 };
893 
900 };
901 
908  uint32_t salt;
910  uint64_t implicit_iv;
918  bool esn_en;
920  uint64_t sn_initial;
924 };
925 
930  bool has_encap;
934  struct doca_flow_fwd fwd;
936 };
937 
946  struct doca_flow_fwd fwd;
948 };
949 
954  union {
962  };
963 };
964 
971  union {
972  struct {
975  uint64_t cir;
977  uint64_t cbs;
980  struct {
981  uint32_t shared_meter_id;
983  enum doca_flow_meter_color meter_init_color;
986  };
987 
990  union {
991  struct {
995  };
996 
1000  uint32_t aging_sec;
1002 };
1003 
1009  /* Derived from pipe actions. */
1011  /* Add field value from pipe actions or flow entry. */
1013  /* Copy field to another field. */
1014 };
1015 
1021  union {
1022  struct {
1023  struct doca_flow_desc_field src; /* Source info to copy from. */
1024  struct doca_flow_desc_field dst; /* Or destination info to copy to. */
1025  uint32_t width; /* Bit width to copy */
1027  };
1028 };
1029 
1038 };
1039 
1052 };
1053 
1060  union {
1061  struct {
1063  /* DOCA Flow actions array. */
1065  /* DOCA Flow actions masks array. */
1067  /* DOCA Flow actions descriptor array. */
1068  };
1070  /* DOCA Flow monitor array. */
1071  };
1072 };
1073 
1078  uint32_t idx;
1083  uint32_t size;
1087 };
1088 
1096 };
1097 
1102  union {
1103  struct {
1104  uint64_t total_bytes;
1106  uint64_t total_pkts;
1109  struct {
1110  uint64_t current_sn;
1113  };
1114 };
1115 
1126 };
1127 
1136  uint8_t option_type;
1138  uint8_t option_len;
1142 };
1143 
1156 };
1157 
1179 doca_error_t doca_flow_init(struct doca_flow_cfg *cfg);
1180 
1190 
1213 doca_error_t doca_flow_port_start(const struct doca_flow_port_cfg *cfg, struct doca_flow_port **port);
1214 
1231 doca_error_t doca_flow_port_stop(struct doca_flow_port *port);
1232 
1259 doca_error_t doca_flow_port_pair(struct doca_flow_port *port, struct doca_flow_port *pair_port);
1260 
1274 uint8_t *doca_flow_port_priv_data(struct doca_flow_port *port);
1275 
1302  enum doca_flow_port_operation_state state);
1303 
1325  uint32_t id,
1327 
1352  uint32_t *res_array,
1353  uint32_t res_array_len,
1354  void *bindable_obj);
1355 
1379  uint32_t *res_array,
1380  struct doca_flow_resource_query *query_results_array,
1381  uint32_t array_len);
1382 
1418 doca_error_t doca_flow_pipe_create(const struct doca_flow_pipe_cfg *cfg,
1419  const struct doca_flow_fwd *fwd,
1420  const struct doca_flow_fwd *fwd_miss,
1421  struct doca_flow_pipe **pipe);
1422 
1435 typedef doca_error_t (*doca_flow_pipe_resize_nr_entries_changed_cb)(void *pipe_user_ctx, uint32_t nr_entries);
1436 
1457  uint16_t pipe_queue,
1458  void *entry_user_ctx,
1459  void **new_entry_user_ctx);
1460 
1479 doca_error_t doca_flow_pipe_resize(struct doca_flow_pipe *pipe,
1480  uint8_t new_congestion_level,
1483 
1528  struct doca_flow_pipe *pipe,
1529  const struct doca_flow_match *match,
1530  const struct doca_flow_actions *actions,
1531  const struct doca_flow_monitor *monitor,
1532  const struct doca_flow_fwd *fwd,
1533  uint32_t flags,
1534  void *usr_ctx,
1535  struct doca_flow_pipe_entry **entry);
1536 
1564  struct doca_flow_pipe *pipe,
1565  const struct doca_flow_actions *actions,
1566  const struct doca_flow_monitor *monitor,
1567  const struct doca_flow_fwd *fwd,
1568  const enum doca_flow_flags_type flags,
1569  struct doca_flow_pipe_entry *entry);
1570 
1613  uint32_t priority,
1614  struct doca_flow_pipe *pipe,
1615  const struct doca_flow_match *match,
1616  const struct doca_flow_match *match_mask,
1617  const struct doca_flow_match_condition *condition,
1618  const struct doca_flow_actions *actions,
1619  const struct doca_flow_actions *actions_mask,
1620  const struct doca_flow_action_descs *action_descs,
1621  const struct doca_flow_monitor *monitor,
1622  const struct doca_flow_fwd *fwd,
1623  void *usr_ctx,
1624  struct doca_flow_pipe_entry **entry);
1625 
1661  struct doca_flow_pipe *pipe,
1662  const struct doca_flow_match *match,
1663  const struct doca_flow_match *match_mask,
1664  const struct doca_flow_actions *actions,
1665  const struct doca_flow_monitor *monitor,
1666  const struct doca_flow_fwd *fwd,
1667  const enum doca_flow_flags_type flag,
1668  void *usr_ctx,
1669  struct doca_flow_pipe_entry **entry);
1670 
1697  struct doca_flow_pipe *pipe,
1698  const struct doca_flow_actions *actions,
1699  const struct doca_flow_monitor *monitor,
1700  const struct doca_flow_fwd *fwd,
1701  const enum doca_flow_flags_type flags,
1702  struct doca_flow_pipe_entry *entry);
1703 
1737  struct doca_flow_pipe *pipe,
1738  uint32_t idx,
1739  const struct doca_flow_ordered_list *ordered_list,
1740  const struct doca_flow_fwd *fwd,
1741  enum doca_flow_flags_type flags,
1742  void *user_ctx,
1743  struct doca_flow_pipe_entry **entry);
1774  struct doca_flow_pipe *pipe,
1775  const struct doca_flow_match *match,
1776  const struct doca_flow_match *match_mask,
1777  const uint32_t priority,
1778  const struct doca_flow_fwd *fwd,
1779  const enum doca_flow_flags_type flag,
1780  void *usr_ctx,
1781  struct doca_flow_pipe_entry **entry);
1782 
1816  struct doca_flow_pipe *pipe,
1817  uint32_t entry_index,
1818  const struct doca_flow_actions *actions,
1819  const struct doca_flow_monitor *monitor,
1820  const struct doca_flow_fwd *fwd,
1821  const enum doca_flow_flags_type flags,
1822  void *usr_ctx,
1823  struct doca_flow_pipe_entry **entry);
1824 
1847 doca_error_t doca_flow_pipe_remove_entry(uint16_t pipe_queue, uint32_t flags, struct doca_flow_pipe_entry *entry);
1848 
1868 doca_error_t doca_flow_pipe_calc_hash(struct doca_flow_pipe *pipe, const struct doca_flow_match *match, uint32_t *hash);
1869 
1889 doca_error_t doca_flow_port_calc_entropy(struct doca_flow_port *port,
1890  struct doca_flow_entropy_format *header,
1891  uint16_t *entropy);
1892 
1902 void doca_flow_pipe_destroy(struct doca_flow_pipe *pipe);
1903 
1913 void doca_flow_port_pipes_flush(struct doca_flow_port *port);
1914 
1926 void doca_flow_port_pipes_dump(struct doca_flow_port *port, FILE *f);
1927 
1937 void doca_flow_pipe_dump(struct doca_flow_pipe *pipe, FILE *f);
1938 
1956  struct doca_flow_resource_query *query_stats);
1957 
1975  struct doca_flow_resource_query *query_stats);
1976 
1992 doca_error_t doca_flow_pipe_update_miss(struct doca_flow_pipe *pipe, const struct doca_flow_fwd *fwd_miss);
1993 
2020 int doca_flow_aging_handle(struct doca_flow_port *port, uint16_t queue, uint64_t quota, uint64_t max_entries);
2021 
2044 doca_error_t doca_flow_entries_process(struct doca_flow_port *port,
2045  uint16_t pipe_queue,
2046  uint64_t timeout,
2047  uint32_t max_processed_entries);
2048 
2058 enum doca_flow_entry_status doca_flow_pipe_entry_get_status(struct doca_flow_pipe_entry *entry);
2059 
2073 struct doca_flow_port *doca_flow_port_switch_get(const struct doca_flow_port *port);
2074 
2097  uint8_t traffic_class,
2098  uint8_t ttl,
2099  bool bottom_of_stack,
2100  struct doca_flow_header_mpls *mpls);
2101 
2124  uint32_t *label,
2125  uint8_t *traffic_class,
2126  uint8_t *ttl,
2127  bool *bottom_of_stack);
2128 
2161 doca_error_t doca_flow_parser_geneve_opt_create(const struct doca_flow_port *port,
2162  const struct doca_flow_parser_geneve_opt_cfg tlv_list[],
2163  uint8_t nb_options,
2164  struct doca_flow_parser **parser);
2165 
2182 doca_error_t doca_flow_parser_geneve_opt_destroy(struct doca_flow_parser *parser);
2183 
2198 doca_error_t doca_flow_get_target(enum doca_flow_target_type type, struct doca_flow_target **target);
2199 
2213 doca_error_t doca_flow_cfg_create(struct doca_flow_cfg **cfg);
2214 
2228 doca_error_t doca_flow_cfg_destroy(struct doca_flow_cfg *cfg);
2229 
2245 doca_error_t doca_flow_cfg_set_pipe_queues(struct doca_flow_cfg *cfg, uint16_t pipe_queues);
2246 
2260 doca_error_t doca_flow_cfg_set_nr_counters(struct doca_flow_cfg *cfg, uint32_t nr_counters);
2261 
2275 doca_error_t doca_flow_cfg_set_nr_meters(struct doca_flow_cfg *cfg, uint32_t nr_meters);
2276 
2292 doca_error_t doca_flow_cfg_set_nr_acl_collisions(struct doca_flow_cfg *cfg, uint8_t nr_acl_collisions);
2293 
2309 doca_error_t doca_flow_cfg_set_mode_args(struct doca_flow_cfg *cfg, const char *mode_args);
2310 
2329  uint32_t nr_shared_resource,
2331 
2345 doca_error_t doca_flow_cfg_set_queue_depth(struct doca_flow_cfg *cfg, uint32_t queue_depth);
2346 
2361 
2376 
2392 
2409 doca_error_t doca_flow_cfg_set_rss_key(struct doca_flow_cfg *cfg, const uint8_t *rss_key, uint32_t rss_key_len);
2410 
2428 
2442 doca_error_t doca_flow_cfg_set_definitions(struct doca_flow_cfg *cfg, const struct doca_flow_definitions *defs);
2443 
2457 doca_error_t doca_flow_port_cfg_create(struct doca_flow_port_cfg **cfg);
2458 
2472 doca_error_t doca_flow_port_cfg_destroy(struct doca_flow_port_cfg *cfg);
2473 
2490 doca_error_t doca_flow_port_cfg_set_devargs(struct doca_flow_port_cfg *cfg, const char *devargs);
2491 
2505 doca_error_t doca_flow_port_cfg_set_priv_data_size(struct doca_flow_port_cfg *cfg, uint16_t priv_data_size);
2506 
2520 doca_error_t doca_flow_port_cfg_set_dev(struct doca_flow_port_cfg *cfg, struct doca_dev *dev);
2521 
2537 doca_error_t doca_flow_port_cfg_set_dev_rep(struct doca_flow_port_cfg *cfg, struct doca_dev_rep *dev);
2538 
2554 doca_error_t doca_flow_port_cfg_set_port_id(struct doca_flow_port_cfg *cfg, uint16_t port_id);
2555 
2571  const struct doca_flow_resource_rss_cfg *rss_cfg);
2572 
2585 
2602  enum doca_flow_port_operation_state state);
2603 
2620 doca_error_t doca_flow_port_cfg_set_actions_mem_size(struct doca_flow_port_cfg *cfg, uint32_t size);
2621 
2640 doca_error_t doca_flow_port_cfg_set_service_threads_core(struct doca_flow_port_cfg *cfg, uint32_t core);
2641 
2660 doca_error_t doca_flow_port_cfg_set_service_threads_cycle(struct doca_flow_port_cfg *cfg, uint32_t cycle_ms);
2661 
2677 doca_error_t doca_flow_pipe_cfg_create(struct doca_flow_pipe_cfg **cfg, struct doca_flow_port *port);
2678 
2692 doca_error_t doca_flow_pipe_cfg_destroy(struct doca_flow_pipe_cfg *cfg);
2693 
2710 doca_error_t doca_flow_pipe_cfg_set_match(struct doca_flow_pipe_cfg *cfg,
2711  const struct doca_flow_match *match,
2712  const struct doca_flow_match *match_mask);
2713 
2739  struct doca_flow_actions *const *actions,
2740  struct doca_flow_actions *const *actions_masks,
2741  struct doca_flow_action_descs *const *action_descs,
2742  size_t nr_actions);
2743 
2758 doca_error_t doca_flow_pipe_cfg_set_monitor(struct doca_flow_pipe_cfg *cfg, const struct doca_flow_monitor *monitor);
2759 
2777  struct doca_flow_ordered_list *const *ordered_lists,
2778  size_t nr_ordered_lists);
2779 
2794 doca_error_t doca_flow_pipe_cfg_set_name(struct doca_flow_pipe_cfg *cfg, const char *name);
2795 
2812 doca_error_t doca_flow_pipe_cfg_set_label(struct doca_flow_pipe_cfg *cfg, const char *label);
2813 
2828 
2844 
2860 doca_error_t doca_flow_pipe_cfg_set_is_root(struct doca_flow_pipe_cfg *cfg, bool is_root);
2861 
2877 doca_error_t doca_flow_pipe_cfg_set_nr_entries(struct doca_flow_pipe_cfg *cfg, uint32_t nr_entries);
2878 
2892 doca_error_t doca_flow_pipe_cfg_set_is_resizable(struct doca_flow_pipe_cfg *cfg, bool is_resizable);
2893 
2907 doca_error_t doca_flow_pipe_cfg_set_excluded_queue(struct doca_flow_pipe_cfg *cfg, uint16_t pipe_queue);
2908 
2925 
2941 doca_error_t doca_flow_pipe_cfg_set_miss_counter(struct doca_flow_pipe_cfg *cfg, bool miss_counter);
2942 
2959  uint8_t congestion_level_threshold);
2960 
2976 doca_error_t doca_flow_pipe_cfg_set_user_ctx(struct doca_flow_pipe_cfg *cfg, void *user_ctx);
2977 
2991 doca_error_t doca_flow_pipe_cfg_set_hash_map_algorithm(struct doca_flow_pipe_cfg *cfg, uint32_t algorithm_flags);
2992 
2993 #ifdef __cplusplus
2994 } /* extern "C" */
2995 #endif
2996 
2999 #endif /* DOCA_FLOW_H_ */
static enum doca_flow_pipe_domain domain
static struct doca_flow_fwd fwd_miss
Definition: flow_parser.c:110
static struct doca_flow_actions actions
Definition: flow_parser.c:107
static struct doca_flow_monitor monitor
Definition: flow_parser.c:108
static struct doca_flow_fwd fwd
Definition: flow_parser.c:109
static struct doca_flow_match match_mask
Definition: flow_parser.c:106
static doca_flow_pipe_resize_nr_entries_changed_cb nr_entries_changed_cb
static doca_flow_pipe_resize_entry_relocate_cb entry_relocation_cb
static struct doca_flow_pipe_entry * entry[MAX_ENTRIES]
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
Definition: doca_compat.h:103
#define DOCA_STABLE
To set a Symbol (or specifically a function) as stable API, i.e. it won't be changed.
Definition: doca_compat.h:96
enum doca_error doca_error_t
DOCA API return codes.
doca_flow_crypto_sn_offload_type
doca flow crypto SN offload type
doca_flow_crypto_replay_win_size
doca flow crypto replay window size
doca_flow_crypto_icv_len
doca flow crypto ICV length
doca_flow_crypto_encap_net_type
doca flow crypto operation encapsulation header type
doca_flow_crypto_resource_type
doca flow crypto operation resource type
doca_flow_crypto_encap_action_type
doca flow crypto operation reformat type
doca_flow_crypto_action_type
doca flow crypto operation action type
doca_flow_l4_type_ext
doca flow layer 4 packet extend type
doca_flow_l3_type
doca flow layer 3 packet type
#define DOCA_FLOW_GENEVE_DATA_OPTION_LEN_MAX
Definition: doca_flow_net.h:86
#define DOCA_FLOW_CRYPTO_HEADER_LEN_MAX
doca_flow_port_operation_state
Defines the operation states for a port instance.
Definition: doca_flow.h:1147
doca_rss_type
rss offload types
Definition: doca_flow.h:763
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_destroy(struct doca_flow_pipe_cfg *cfg)
Destroy DOCA Flow pipe configuration struct.
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_cfg_set_rss_cfg(struct doca_flow_port_cfg *cfg, const struct doca_flow_resource_rss_cfg *rss_cfg)
Set RSS optional configuration.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_ordered_list_add_entry(uint16_t pipe_queue, struct doca_flow_pipe *pipe, uint32_t idx, const struct doca_flow_ordered_list *ordered_list, const struct doca_flow_fwd *fwd, enum doca_flow_flags_type flags, void *user_ctx, struct doca_flow_pipe_entry **entry)
DOCA_STABLE doca_error_t doca_flow_cfg_set_mode_args(struct doca_flow_cfg *cfg, const char *mode_args)
Set DOCA mode args.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_create(struct doca_flow_pipe_cfg **cfg, struct doca_flow_port *port)
Create DOCA Flow pipe configuration struct.
DOCA_STABLE doca_error_t doca_flow_entries_process(struct doca_flow_port *port, uint16_t pipe_queue, uint64_t timeout, uint32_t max_processed_entries)
Process entries in queue.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_name(struct doca_flow_pipe_cfg *cfg, const char *name)
Set pipe's name.
doca_flow_l2_valid_header
doca flow l2 valid headers
Definition: doca_flow.h:429
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_pair(struct doca_flow_port *port, struct doca_flow_port *pair_port)
pair two doca flow ports.
void(* doca_flow_shared_resource_unbind_cb)(enum doca_flow_shared_resource_type, uint32_t shared_resource_id, void *bindable_obj)
doca flow shared resource unbind callback
Definition: doca_flow.h:213
DOCA_EXPERIMENTAL void doca_flow_pipe_dump(struct doca_flow_pipe *pipe, FILE *f)
Dump pipe information (not including the entries)
doca_flow_shared_resource_type
Shared resource supported types.
Definition: doca_flow.h:92
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_match(struct doca_flow_pipe_cfg *cfg, const struct doca_flow_match *match, const struct doca_flow_match *match_mask)
Set pipe's match and match mask.
DOCA_STABLE doca_error_t doca_flow_shared_resources_bind(enum doca_flow_shared_resource_type type, uint32_t *res_array, uint32_t res_array_len, void *bindable_obj)
Binds a bulk of shared resources to a bindable object.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_label(struct doca_flow_pipe_cfg *cfg, const char *label)
Sets the label for the given pipe.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_update_miss(struct doca_flow_pipe *pipe, const struct doca_flow_fwd *fwd_miss)
Update the forward miss action.
DOCA_STABLE doca_error_t doca_flow_cfg_set_nr_meters(struct doca_flow_cfg *cfg, uint32_t nr_meters)
Set number of traffic meters to configure.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_control_add_entry(uint16_t pipe_queue, uint32_t priority, struct doca_flow_pipe *pipe, const struct doca_flow_match *match, const struct doca_flow_match *match_mask, const struct doca_flow_match_condition *condition, const struct doca_flow_actions *actions, const struct doca_flow_actions *actions_mask, const struct doca_flow_action_descs *action_descs, const struct doca_flow_monitor *monitor, const struct doca_flow_fwd *fwd, void *usr_ctx, struct doca_flow_pipe_entry **entry)
Add one new entry to a control pipe.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_acl_add_entry(uint16_t pipe_queue, struct doca_flow_pipe *pipe, const struct doca_flow_match *match, const struct doca_flow_match *match_mask, const uint32_t priority, const struct doca_flow_fwd *fwd, const enum doca_flow_flags_type flag, void *usr_ctx, struct doca_flow_pipe_entry **entry)
Add one new entry to a acl pipe.
doca_error_t(* doca_flow_pipe_resize_entry_relocate_cb)(void *pipe_user_ctx, uint16_t pipe_queue, void *entry_user_ctx, void **new_entry_user_ctx)
doca flow pipe entry relocation callback.
Definition: doca_flow.h:1456
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_start(const struct doca_flow_port_cfg *cfg, struct doca_flow_port **port)
Start a doca port.
doca_flow_entry_op
doca flow entry operation
Definition: doca_flow.h:146
doca_flow_direction_info
doca flow direction info
Definition: doca_flow.h:1092
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_cfg_set_service_threads_cycle(struct doca_flow_port_cfg *cfg, uint32_t cycle_ms)
Set service threads max execution cycle.
doca_flow_pipe_op
doca flow pipe operation
Definition: doca_flow.h:124
DOCA_STABLE doca_error_t doca_flow_cfg_set_cb_entry_process(struct doca_flow_cfg *cfg, doca_flow_entry_process_cb cb)
Set callback for entry create/destroy.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_is_root(struct doca_flow_pipe_cfg *cfg, bool is_root)
Set if pipe is root or not.
DOCA_STABLE doca_error_t doca_flow_pipe_resize(struct doca_flow_pipe *pipe, uint8_t new_congestion_level, doca_flow_pipe_resize_nr_entries_changed_cb nr_entries_changed_cb, doca_flow_pipe_resize_entry_relocate_cb entry_relocation_cb)
Resize pipe.
DOCA_STABLE doca_error_t doca_flow_cfg_set_queue_depth(struct doca_flow_cfg *cfg, uint32_t queue_depth)
Set number of pre-configured queue_size.
DOCA_EXPERIMENTAL doca_error_t doca_flow_parser_geneve_opt_destroy(struct doca_flow_parser *parser)
Destroy GENEVE TLV parser.
DOCA_STABLE doca_error_t doca_flow_port_cfg_set_devargs(struct doca_flow_port_cfg *cfg, const char *devargs)
Set devargs.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_create(const struct doca_flow_pipe_cfg *cfg, const struct doca_flow_fwd *fwd, const struct doca_flow_fwd *fwd_miss, struct doca_flow_pipe **pipe)
Create one new pipe.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_miss_counter(struct doca_flow_pipe_cfg *cfg, bool miss_counter)
Set to enable pipe's miss counter.
DOCA_STABLE doca_error_t doca_flow_cfg_create(struct doca_flow_cfg **cfg)
Create DOCA Flow configuration struct.
#define DOCA_FLOW_META_SCRATCH_PAD_MAX
Definition: doca_flow.h:254
DOCA_STABLE uint8_t * doca_flow_port_priv_data(struct doca_flow_port *port)
Get pointer of user private data.
doca_flow_pipe_hash_map_algorithm
DOCA Flow pipe map algorithm.
Definition: doca_flow.h:333
DOCA_STABLE void doca_flow_port_pipes_flush(struct doca_flow_port *port)
Flush pipes of one port.
doca_flow_pipe_type
doca flow pipe type
Definition: doca_flow.h:220
doca_flow_parser_geneve_opt_mode
Geneve TLV option class mode.
Definition: doca_flow.h:1119
doca_flow_l3_meta
doca flow l3 valid type for parser meta
Definition: doca_flow.h:293
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_type(struct doca_flow_pipe_cfg *cfg, enum doca_flow_pipe_type type)
Set pipe's type.
DOCA_STABLE doca_error_t doca_flow_port_cfg_set_priv_data_size(struct doca_flow_port_cfg *cfg, uint16_t priv_data_size)
Set user private data size.
DOCA_EXPERIMENTAL doca_error_t doca_flow_init(struct doca_flow_cfg *cfg)
Initialize the doca flow.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_update_entry(uint16_t pipe_queue, struct doca_flow_pipe *pipe, const struct doca_flow_actions *actions, const struct doca_flow_monitor *monitor, const struct doca_flow_fwd *fwd, const enum doca_flow_flags_type flags, struct doca_flow_pipe_entry *entry)
Update the pipe entry with new actions.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_lpm_update_entry(uint16_t pipe_queue, struct doca_flow_pipe *pipe, const struct doca_flow_actions *actions, const struct doca_flow_monitor *monitor, const struct doca_flow_fwd *fwd, const enum doca_flow_flags_type flags, struct doca_flow_pipe_entry *entry)
Update the lpm pipe entry with new actions.
doca_flow_flags_type
doca flow flags type
Definition: doca_flow.h:114
doca_flow_meter_color_mode
Traffic meter init color mode when creating a pipe or entry: blind (fixed as green) or aware (configu...
Definition: doca_flow.h:853
doca_flow_action_type
action type enumeration
Definition: doca_flow.h:1007
DOCA_STABLE doca_error_t doca_flow_cfg_set_rss_key(struct doca_flow_cfg *cfg, const uint8_t *rss_key, uint32_t rss_key_len)
Set RSS hash key.
doca_flow_rss_hash_function
rss hash function type
Definition: doca_flow.h:172
doca_flow_ordered_list_element_type
Type of an ordered list element.
Definition: doca_flow.h:1043
DOCA_EXPERIMENTAL doca_error_t doca_flow_get_target(enum doca_flow_target_type type, struct doca_flow_target **target)
Get doca flow forward target.
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_calc_entropy(struct doca_flow_port *port, struct doca_flow_entropy_format *header, uint16_t *entropy)
Calculate the entropy.
DOCA_STABLE enum doca_flow_entry_status doca_flow_pipe_entry_get_status(struct doca_flow_pipe_entry *entry)
Get entry's status.
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_cfg_set_dev_rep(struct doca_flow_port_cfg *cfg, struct doca_dev_rep *dev)
Set port's device for representor.
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_cfg_set_dev(struct doca_flow_port_cfg *cfg, struct doca_dev *dev)
Set port's device.
DOCA_EXPERIMENTAL doca_error_t doca_flow_shared_resource_set_cfg(enum doca_flow_shared_resource_type type, uint32_t id, struct doca_flow_shared_resource_cfg *cfg)
Configure a single shared resource.
DOCA_STABLE doca_error_t doca_flow_cfg_set_nr_counters(struct doca_flow_cfg *cfg, uint32_t nr_counters)
Set number of counters to configure.
DOCA_STABLE doca_error_t doca_flow_cfg_set_cb_shared_resource_unbind(struct doca_flow_cfg *cfg, doca_flow_shared_resource_unbind_cb cb)
Set callback for unbinding of a shared resource.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_user_ctx(struct doca_flow_pipe_cfg *cfg, void *user_ctx)
Set pipe's user context.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_lpm_add_entry(uint16_t pipe_queue, struct doca_flow_pipe *pipe, const struct doca_flow_match *match, const struct doca_flow_match *match_mask, const struct doca_flow_actions *actions, const struct doca_flow_monitor *monitor, const struct doca_flow_fwd *fwd, const enum doca_flow_flags_type flag, void *usr_ctx, struct doca_flow_pipe_entry **entry)
Add one new entry to a lpm pipe.
doca_flow_target_type
doca flow target type
Definition: doca_flow.h:732
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_congestion_level_threshold(struct doca_flow_pipe_cfg *cfg, uint8_t congestion_level_threshold)
Set pipe's congestion level threshold.
DOCA_EXPERIMENTAL doca_error_t doca_flow_parser_geneve_opt_create(const struct doca_flow_port *port, const struct doca_flow_parser_geneve_opt_cfg tlv_list[], uint8_t nb_options, struct doca_flow_parser **parser)
Creates GENEVE TLV parser for the selected port.
DOCA_STABLE doca_error_t doca_flow_cfg_set_cb_pipe_process(struct doca_flow_cfg *cfg, doca_flow_pipe_process_cb cb)
Set callback for pipe process completion.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_ordered_lists(struct doca_flow_pipe_cfg *cfg, struct doca_flow_ordered_list *const *ordered_lists, size_t nr_ordered_lists)
Set pipe's ordered lists.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_is_resizable(struct doca_flow_pipe_cfg *cfg, bool is_resizable)
Set if the pipe supports the resize operation.
DOCA_STABLE doca_error_t doca_flow_port_cfg_set_ipsec_sn_offload_disable(struct doca_flow_port_cfg *cfg)
Disable SN offload for ipsec - Anti-replay and sn increment will not be activated.
DOCA_STABLE void doca_flow_pipe_destroy(struct doca_flow_pipe *pipe)
Destroy one pipe.
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_operation_state_modify(struct doca_flow_port *port, enum doca_flow_port_operation_state state)
Modifies the operation state of a port instance.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_actions(struct doca_flow_pipe_cfg *cfg, struct doca_flow_actions *const *actions, struct doca_flow_actions *const *actions_masks, struct doca_flow_action_descs *const *action_descs, size_t nr_actions)
Set pipe's actions, actions mask and actions descriptor.
doca_flow_push_action_type
doca flow push action type
Definition: doca_flow.h:586
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_cfg_set_actions_mem_size(struct doca_flow_port_cfg *cfg, uint32_t size)
Set max memory size used by actions.
DOCA_EXPERIMENTAL doca_error_t doca_flow_mpls_label_encode(uint32_t label, uint8_t traffic_class, uint8_t ttl, bool bottom_of_stack, struct doca_flow_header_mpls *mpls)
Prepare an MPLS label header in big-endian.
DOCA_EXPERIMENTAL doca_error_t doca_flow_mpls_label_decode(const struct doca_flow_header_mpls *mpls, uint32_t *label, uint8_t *traffic_class, uint8_t *ttl, bool *bottom_of_stack)
Decode an MPLS label header.
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_cfg_set_service_threads_core(struct doca_flow_port_cfg *cfg, uint32_t core)
Set service threads execution cpu core.
DOCA_STABLE doca_error_t doca_flow_cfg_set_nr_acl_collisions(struct doca_flow_cfg *cfg, uint8_t nr_acl_collisions)
Set number of pre-configured collisions.
void(* doca_flow_pipe_process_cb)(struct doca_flow_pipe *pipe, enum doca_flow_pipe_status status, enum doca_flow_pipe_op op, void *user_ctx)
doca flow pipe process callback
Definition: doca_flow.h:196
DOCA_STABLE int doca_flow_aging_handle(struct doca_flow_port *port, uint16_t queue, uint64_t quota, uint64_t max_entries)
Handle aging of entries.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_calc_hash(struct doca_flow_pipe *pipe, const struct doca_flow_match *match, uint32_t *hash)
calc the hash for a given match on a given pipe.
DOCA_STABLE doca_error_t doca_flow_cfg_set_nr_shared_resource(struct doca_flow_cfg *cfg, uint32_t nr_shared_resource, enum doca_flow_shared_resource_type type)
Set number of shared resource.
#define DOCA_FLOW_VLAN_MAX
Definition: doca_flow.h:424
doca_flow_pipe_status
doca flow pipe status
Definition: doca_flow.h:136
enum __attribute__((__packed__)) doca_flow_meter_color
Definition: doca_flow.h:267
DOCA_EXPERIMENTAL void doca_flow_port_pipes_dump(struct doca_flow_port *port, FILE *f)
Dump pipes of one port.
DOCA_STABLE doca_error_t doca_flow_port_stop(struct doca_flow_port *port)
Stop a doca port.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_monitor(struct doca_flow_pipe_cfg *cfg, const struct doca_flow_monitor *monitor)
Set pipe's monitor.
DOCA_EXPERIMENTAL doca_error_t doca_flow_cfg_set_definitions(struct doca_flow_cfg *cfg, const struct doca_flow_definitions *defs)
Set the definition object.
doca_flow_compare_op
doca flow compare operation
Definition: doca_flow.h:509
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_add_entry(uint16_t pipe_queue, struct doca_flow_pipe *pipe, const struct doca_flow_match *match, const struct doca_flow_actions *actions, const struct doca_flow_monitor *monitor, const struct doca_flow_fwd *fwd, uint32_t flags, void *usr_ctx, struct doca_flow_pipe_entry **entry)
Add one new entry to a pipe.
doca_flow_match_tcp_flags
doca flow match flags
Definition: doca_flow.h:402
doca_flow_crypto_syndrome
doca flow psp/ipsec syndrome valid values for parser meta
Definition: doca_flow.h:321
DOCA_STABLE doca_error_t doca_flow_pipe_remove_entry(uint16_t pipe_queue, uint32_t flags, struct doca_flow_pipe_entry *entry)
Free one pipe entry.
doca_flow_resource_type
doca flow resource type
Definition: doca_flow.h:612
doca_error_t(* doca_flow_pipe_resize_nr_entries_changed_cb)(void *pipe_user_ctx, uint32_t nr_entries)
doca flow pipe resize number of entries changed callback.
Definition: doca_flow.h:1435
doca_flow_fwd_type
forwarding action type
Definition: doca_flow.h:739
doca_flow_entry_status
doca flow entry status
Definition: doca_flow.h:160
DOCA_STABLE void doca_flow_destroy(void)
Destroy the doca flow.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_hash_add_entry(uint16_t pipe_queue, struct doca_flow_pipe *pipe, uint32_t entry_index, const struct doca_flow_actions *actions, const struct doca_flow_monitor *monitor, const struct doca_flow_fwd *fwd, const enum doca_flow_flags_type flags, void *usr_ctx, struct doca_flow_pipe_entry **entry)
Add one new entry to an hash pipe.
DOCA_EXPERIMENTAL doca_error_t doca_flow_shared_resources_query(enum doca_flow_shared_resource_type type, uint32_t *res_array, struct doca_flow_resource_query *query_results_array, uint32_t array_len)
Extract information about shared counter.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_hash_map_algorithm(struct doca_flow_pipe_cfg *cfg, uint32_t algorithm_flags)
Set pipe map algorithm - supported only in hash pipe.
doca_flow_meter_algorithm_type
Traffic meter algorithms.
Definition: doca_flow.h:829
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_cfg_set_port_id(struct doca_flow_port_cfg *cfg, uint16_t port_id)
Set the logical port ID.
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_nr_entries(struct doca_flow_pipe_cfg *cfg, uint32_t nr_entries)
Set pipe's maximum number of flow rules.
doca_flow_meter_limit_type
Traffic meter limit type: per bytes or per packets for all meter parameters: cir, cbs,...
Definition: doca_flow.h:842
DOCA_EXPERIMENTAL doca_error_t doca_flow_cfg_set_default_rss(struct doca_flow_cfg *cfg, const struct doca_flow_resource_rss_cfg *rss)
Set RSS global configuration.
DOCA_EXPERIMENTAL doca_error_t doca_flow_resource_query_pipe_miss(struct doca_flow_pipe *pipe, struct doca_flow_resource_query *query_stats)
Extract information about pipe miss entry.
DOCA_STABLE doca_error_t doca_flow_port_cfg_create(struct doca_flow_port_cfg **cfg)
Create DOCA Flow port configuration struct.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_dir_info(struct doca_flow_pipe_cfg *cfg, enum doca_flow_direction_info dir_info)
Set pipe's Direction info.
doca_flow_l4_meta
doca flow l4 valid type for parser meta
Definition: doca_flow.h:305
DOCA_STABLE doca_error_t doca_flow_port_cfg_destroy(struct doca_flow_port_cfg *cfg)
Destroy DOCA Flow port configuration struct.
DOCA_STABLE doca_error_t doca_flow_cfg_set_pipe_queues(struct doca_flow_cfg *cfg, uint16_t pipe_queues)
Set pipe queues.
DOCA_STABLE struct doca_flow_port * doca_flow_port_switch_get(const struct doca_flow_port *port)
Get doca flow switch port.
doca_flow_pipe_domain
doca flow pipe domain
Definition: doca_flow.h:240
doca_flow_l2_meta
doca flow l2 valid type for parser meta
Definition: doca_flow.h:279
void(* doca_flow_entry_process_cb)(struct doca_flow_pipe_entry *entry, uint16_t pipe_queue, enum doca_flow_entry_status status, enum doca_flow_entry_op op, void *user_ctx)
doca flow entry process callback
Definition: doca_flow.h:204
DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_domain(struct doca_flow_pipe_cfg *cfg, enum doca_flow_pipe_domain domain)
Set pipe's domain.
DOCA_EXPERIMENTAL doca_error_t doca_flow_port_cfg_set_operation_state(struct doca_flow_port_cfg *cfg, enum doca_flow_port_operation_state state)
Set default rules operation state.
DOCA_EXPERIMENTAL doca_error_t doca_flow_pipe_cfg_set_excluded_queue(struct doca_flow_pipe_cfg *cfg, uint16_t pipe_queue)
Set pipe_queue as excluded in the pipe.
DOCA_STABLE doca_error_t doca_flow_cfg_destroy(struct doca_flow_cfg *cfg)
Destroy DOCA Flow configuration struct.
DOCA_EXPERIMENTAL doca_error_t doca_flow_resource_query_entry(struct doca_flow_pipe_entry *entry, struct doca_flow_resource_query *query_stats)
Extract information about specific entry.
@ DOCA_FLOW_PORT_OPERATION_STATE_UNCONNECTED
Definition: doca_flow.h:1154
@ DOCA_FLOW_PORT_OPERATION_STATE_STANDBY
Definition: doca_flow.h:1152
@ DOCA_FLOW_PORT_OPERATION_STATE_ACTIVE
Definition: doca_flow.h:1148
@ DOCA_FLOW_PORT_OPERATION_STATE_ACTIVE_READY_TO_SWAP
Definition: doca_flow.h:1150
@ DOCA_FLOW_RSS_TCP
Definition: doca_flow.h:770
@ DOCA_FLOW_RSS_IPV4
Definition: doca_flow.h:764
@ DOCA_FLOW_RSS_IPV6
Definition: doca_flow.h:766
@ DOCA_FLOW_RSS_UDP
Definition: doca_flow.h:768
@ DOCA_FLOW_RSS_ESP
Definition: doca_flow.h:772
@ DOCA_FLOW_L2_VALID_HEADER_VLAN_1
Definition: doca_flow.h:432
@ DOCA_FLOW_L2_VALID_HEADER_VLAN_0
Definition: doca_flow.h:430
@ DOCA_FLOW_SHARED_RESOURCE_METER
Definition: doca_flow.h:93
@ DOCA_FLOW_SHARED_RESOURCE_ENCAP
Definition: doca_flow.h:103
@ DOCA_FLOW_SHARED_RESOURCE_COUNTER
Definition: doca_flow.h:95
@ DOCA_FLOW_SHARED_RESOURCE_PSP
Definition: doca_flow.h:101
@ DOCA_FLOW_SHARED_RESOURCE_RSS
Definition: doca_flow.h:97
@ DOCA_FLOW_SHARED_RESOURCE_MIRROR
Definition: doca_flow.h:99
@ DOCA_FLOW_SHARED_RESOURCE_IPSEC_SA
Definition: doca_flow.h:107
@ DOCA_FLOW_SHARED_RESOURCE_DECAP
Definition: doca_flow.h:105
@ DOCA_FLOW_ENTRY_OP_ADD
Definition: doca_flow.h:147
@ DOCA_FLOW_ENTRY_OP_AGED
Definition: doca_flow.h:153
@ DOCA_FLOW_ENTRY_OP_DEL
Definition: doca_flow.h:149
@ DOCA_FLOW_ENTRY_OP_UPD
Definition: doca_flow.h:151
@ DOCA_FLOW_DIRECTION_HOST_TO_NETWORK
Definition: doca_flow.h:1095
@ DOCA_FLOW_DIRECTION_BIDIRECTIONAL
Definition: doca_flow.h:1093
@ DOCA_FLOW_DIRECTION_NETWORK_TO_HOST
Definition: doca_flow.h:1094
@ DOCA_FLOW_PIPE_OP_DESTROYED
Definition: doca_flow.h:129
@ DOCA_FLOW_PIPE_OP_CONGESTION_REACHED
Definition: doca_flow.h:125
@ DOCA_FLOW_PIPE_OP_RESIZED
Definition: doca_flow.h:127
@ DOCA_FLOW_PIPE_HASH_MAP_ALGORITHM_FLOODING
Definition: doca_flow.h:342
@ DOCA_FLOW_PIPE_HASH_MAP_ALGORITHM_SELECT_ENABLED
Definition: doca_flow.h:344
@ DOCA_FLOW_PIPE_HASH_MAP_ALGORITHM_IDENTITY
Definition: doca_flow.h:338
@ DOCA_FLOW_PIPE_HASH_MAP_ALGORITHM_RANDOM
Definition: doca_flow.h:336
@ DOCA_FLOW_PIPE_HASH_MAP_ALGORITHM_ROUND_ROBIN
Definition: doca_flow.h:340
@ DOCA_FLOW_PIPE_HASH_MAP_ALGORITHM_HASH
Definition: doca_flow.h:334
@ DOCA_FLOW_PIPE_CT
Definition: doca_flow.h:227
@ DOCA_FLOW_PIPE_CONTROL
Definition: doca_flow.h:223
@ DOCA_FLOW_PIPE_BASIC
Definition: doca_flow.h:221
@ DOCA_FLOW_PIPE_ACL
Definition: doca_flow.h:229
@ DOCA_FLOW_PIPE_HASH
Definition: doca_flow.h:233
@ DOCA_FLOW_PIPE_ORDERED_LIST
Definition: doca_flow.h:231
@ DOCA_FLOW_PIPE_LPM
Definition: doca_flow.h:225
@ DOCA_FLOW_PARSER_GENEVE_OPT_MODE_FIXED
Definition: doca_flow.h:1122
@ DOCA_FLOW_PARSER_GENEVE_OPT_MODE_IGNORE
Definition: doca_flow.h:1120
@ DOCA_FLOW_PARSER_GENEVE_OPT_MODE_MATCHABLE
Definition: doca_flow.h:1124
@ DOCA_FLOW_L3_META_NONE
Definition: doca_flow.h:294
@ DOCA_FLOW_L3_META_IPV4
Definition: doca_flow.h:296
@ DOCA_FLOW_L3_META_IPV6
Definition: doca_flow.h:298
@ DOCA_FLOW_NO_WAIT
Definition: doca_flow.h:115
@ DOCA_FLOW_WAIT_FOR_BATCH
Definition: doca_flow.h:117
@ DOCA_FLOW_METER_COLOR_MODE_BLIND
Definition: doca_flow.h:854
@ DOCA_FLOW_METER_COLOR_MODE_AWARE
Definition: doca_flow.h:856
@ DOCA_FLOW_ACTION_AUTO
Definition: doca_flow.h:1008
@ DOCA_FLOW_ACTION_COPY
Definition: doca_flow.h:1012
@ DOCA_FLOW_ACTION_ADD
Definition: doca_flow.h:1010
@ DOCA_FLOW_RSS_HASH_FUNCTION_SYMMETRIC_TOEPLITZ
Definition: doca_flow.h:174
@ DOCA_FLOW_RSS_HASH_FUNCTION_TOEPLITZ
Definition: doca_flow.h:173
@ DOCA_FLOW_ORDERED_LIST_ELEMENT_ACTIONS
Definition: doca_flow.h:1044
@ DOCA_FLOW_ORDERED_LIST_ELEMENT_MONITOR
Definition: doca_flow.h:1050
@ DOCA_FLOW_TARGET_KERNEL
Definition: doca_flow.h:733
@ DOCA_FLOW_PUSH_ACTION_VLAN
Definition: doca_flow.h:587
@ DOCA_FLOW_PIPE_STATUS_SUCCESS
Definition: doca_flow.h:137
@ DOCA_FLOW_PIPE_STATUS_ERROR
Definition: doca_flow.h:139
@ DOCA_FLOW_COMPARE_GT
Definition: doca_flow.h:518
@ DOCA_FLOW_COMPARE_LE
Definition: doca_flow.h:516
@ DOCA_FLOW_COMPARE_EQ
Definition: doca_flow.h:510
@ DOCA_FLOW_COMPARE_LT
Definition: doca_flow.h:514
@ DOCA_FLOW_COMPARE_GE
Definition: doca_flow.h:520
@ DOCA_FLOW_COMPARE_NE
Definition: doca_flow.h:512
@ DOCA_FLOW_MATCH_TCP_FLAG_URG
Definition: doca_flow.h:413
@ DOCA_FLOW_MATCH_TCP_FLAG_FIN
Definition: doca_flow.h:403
@ DOCA_FLOW_MATCH_TCP_FLAG_ECE
Definition: doca_flow.h:415
@ DOCA_FLOW_MATCH_TCP_FLAG_CWR
Definition: doca_flow.h:417
@ DOCA_FLOW_MATCH_TCP_FLAG_RST
Definition: doca_flow.h:407
@ DOCA_FLOW_MATCH_TCP_FLAG_PSH
Definition: doca_flow.h:409
@ DOCA_FLOW_MATCH_TCP_FLAG_SYN
Definition: doca_flow.h:405
@ DOCA_FLOW_MATCH_TCP_FLAG_ACK
Definition: doca_flow.h:411
@ DOCA_FLOW_CRYPTO_SYNDROME_ICV_FAIL
Definition: doca_flow.h:324
@ DOCA_FLOW_CRYPTO_SYNDROME_OK
Definition: doca_flow.h:322
@ DOCA_FLOW_CRYPTO_SYNDROME_BAD_TRAILER
Definition: doca_flow.h:326
@ DOCA_FLOW_RESOURCE_TYPE_NONE
Definition: doca_flow.h:613
@ DOCA_FLOW_RESOURCE_TYPE_SHARED
Definition: doca_flow.h:614
@ DOCA_FLOW_RESOURCE_TYPE_NON_SHARED
Definition: doca_flow.h:615
@ DOCA_FLOW_FWD_NONE
Definition: doca_flow.h:740
@ DOCA_FLOW_FWD_ORDERED_LIST_PIPE
Definition: doca_flow.h:752
@ DOCA_FLOW_FWD_PORT
Definition: doca_flow.h:744
@ DOCA_FLOW_FWD_TARGET
Definition: doca_flow.h:750
@ DOCA_FLOW_FWD_PIPE
Definition: doca_flow.h:746
@ DOCA_FLOW_FWD_HASH_PIPE
Definition: doca_flow.h:754
@ DOCA_FLOW_FWD_CHANGEABLE
Definition: doca_flow.h:756
@ DOCA_FLOW_FWD_DROP
Definition: doca_flow.h:748
@ DOCA_FLOW_FWD_RSS
Definition: doca_flow.h:742
@ DOCA_FLOW_ENTRY_STATUS_SUCCESS
Definition: doca_flow.h:163
@ DOCA_FLOW_ENTRY_STATUS_IN_PROCESS
Definition: doca_flow.h:161
@ DOCA_FLOW_ENTRY_STATUS_ERROR
Definition: doca_flow.h:165
@ DOCA_FLOW_METER_ALGORITHM_TYPE_RFC4115
Definition: doca_flow.h:834
@ DOCA_FLOW_METER_ALGORITHM_TYPE_RFC2697
Definition: doca_flow.h:830
@ DOCA_FLOW_METER_ALGORITHM_TYPE_RFC2698
Definition: doca_flow.h:832
@ DOCA_FLOW_METER_LIMIT_TYPE_PACKETS
Definition: doca_flow.h:845
@ DOCA_FLOW_METER_LIMIT_TYPE_BYTES
Definition: doca_flow.h:843
@ DOCA_FLOW_L4_META_UDP
Definition: doca_flow.h:310
@ DOCA_FLOW_L4_META_ICMP
Definition: doca_flow.h:312
@ DOCA_FLOW_L4_META_ESP
Definition: doca_flow.h:314
@ DOCA_FLOW_L4_META_TCP
Definition: doca_flow.h:308
@ DOCA_FLOW_L4_META_NONE
Definition: doca_flow.h:306
@ DOCA_FLOW_PIPE_DOMAIN_EGRESS
Definition: doca_flow.h:245
@ DOCA_FLOW_PIPE_DOMAIN_SECURE_INGRESS
Definition: doca_flow.h:243
@ DOCA_FLOW_PIPE_DOMAIN_SECURE_EGRESS
Definition: doca_flow.h:247
@ DOCA_FLOW_PIPE_DOMAIN_DEFAULT
Definition: doca_flow.h:241
@ DOCA_FLOW_L2_META_MULTI_VLAN
Definition: doca_flow.h:282
@ DOCA_FLOW_L2_META_CUSTOM_VLAN
Definition: doca_flow.h:286
@ DOCA_FLOW_L2_META_SINGLE_VLAN
Definition: doca_flow.h:284
@ DOCA_FLOW_L2_META_NO_VLAN
Definition: doca_flow.h:280
uint32_t u32
uint32_t doca_be32_t
Definition: doca_types.h:121
uint16_t doca_be16_t
Declare DOCA endianity types.
Definition: doca_types.h:120
const struct ip_frag_config * cfg
Definition: ip_frag_dp.c:0
uint8_t type
Definition: packets.h:0
action description
Definition: doca_flow.h:1019
enum doca_flow_action_type type
Definition: doca_flow.h:1020
struct doca_flow_desc_field dst
Definition: doca_flow.h:1024
struct doca_flow_desc_field src
Definition: doca_flow.h:1023
struct doca_flow_action_desc::@108::@110 field_op
action descriptor array
Definition: doca_flow.h:1033
struct doca_flow_action_desc * desc_array
Definition: doca_flow.h:1036
doca flow actions information
Definition: doca_flow.h:684
struct doca_flow_nat64_action nat64
Definition: doca_flow.h:719
struct doca_flow_tun tun
Definition: doca_flow.h:705
uint32_t flags
Definition: doca_flow.h:687
struct doca_flow_crypto_encap_action crypto_encap
Definition: doca_flow.h:723
struct doca_flow_resource_encap_cfg encap_cfg
Definition: doca_flow.h:710
struct doca_flow_header_format outer
Definition: doca_flow.h:703
uint32_t shared_decap_id
Definition: doca_flow.h:694
enum doca_flow_resource_type encap_type
Definition: doca_flow.h:707
struct doca_flow_push_action push
Definition: doca_flow.h:717
struct doca_flow_meta meta
Definition: doca_flow.h:699
enum doca_flow_resource_type decap_type
Definition: doca_flow.h:689
uint32_t shared_encap_id
Definition: doca_flow.h:712
struct doca_flow_crypto_action crypto
Definition: doca_flow.h:725
struct doca_flow_resource_decap_cfg decap_cfg
Definition: doca_flow.h:692
uint8_t action_idx
Definition: doca_flow.h:685
struct doca_flow_parser_meta parser_meta
Definition: doca_flow.h:701
doca flow crypto action information
Definition: doca_flow.h:626
struct doca_flow_crypto_action::@73::@75 ipsec_sa
enum doca_flow_crypto_action_type action_type
Definition: doca_flow.h:627
enum doca_flow_crypto_resource_type resource_type
Definition: doca_flow.h:629
doca flow crypto encap action information
Definition: doca_flow.h:644
enum doca_flow_crypto_encap_action_type action_type
Definition: doca_flow.h:645
enum doca_flow_crypto_encap_net_type net_type
Definition: doca_flow.h:647
uint8_t encap_data[DOCA_FLOW_CRYPTO_HEADER_LEN_MAX]
Definition: doca_flow.h:653
doca flow crypto key configuration
Action descriptor field.
Definition: doca_flow.h:538
const char * field_string
Definition: doca_flow.h:539
doca flow encap data information
Definition: doca_flow.h:566
struct doca_flow_tun tun
Definition: doca_flow.h:569
struct doca_flow_header_format outer
Definition: doca_flow.h:567
doca flow header format for entropy
Definition: doca_flow.h:473
struct doca_flow_header_l4_port transport
Definition: doca_flow.h:484
enum doca_flow_l4_type_ext l4_type_ext
Definition: doca_flow.h:482
struct doca_flow_header_ip6 ip6
Definition: doca_flow.h:479
enum doca_flow_l3_type l3_type
Definition: doca_flow.h:474
struct doca_flow_header_ip4 ip4
Definition: doca_flow.h:477
forwarding configuration
Definition: doca_flow.h:779
struct doca_flow_fwd::@80::@91 hash_pipe
struct doca_flow_pipe * next_pipe
Definition: doca_flow.h:800
struct doca_flow_pipe * pipe
Definition: doca_flow.h:806
struct doca_flow_fwd::@80::@88 ordered_list_pipe
struct doca_flow_target * target
Definition: doca_flow.h:812
uint32_t idx
Definition: doca_flow.h:808
enum doca_flow_pipe_hash_map_algorithm algorithm
Definition: doca_flow.h:819
uint16_t port_id
Definition: doca_flow.h:795
enum doca_flow_fwd_type type
Definition: doca_flow.h:780
uint32_t shared_rss_id
Definition: doca_flow.h:789
enum doca_flow_resource_type rss_type
Definition: doca_flow.h:784
struct doca_flow_resource_rss_cfg rss
Definition: doca_flow.h:787
doca flow vlan header
doca flow eth header
doca flow packet format
Definition: doca_flow.h:439
struct doca_flow_header_ip4 ip4
Definition: doca_flow.h:449
enum doca_flow_l4_type_ext l4_type_ext
Definition: doca_flow.h:454
struct doca_flow_header_eth eth
Definition: doca_flow.h:440
struct doca_flow_header_eth_vlan eth_vlan[DOCA_FLOW_VLAN_MAX]
Definition: doca_flow.h:444
struct doca_flow_header_l4_port transport
Definition: doca_flow.h:463
struct doca_flow_header_udp udp
Definition: doca_flow.h:459
struct doca_flow_header_roce_v2 roce_v2
Definition: doca_flow.h:465
enum doca_flow_l3_type l3_type
Definition: doca_flow.h:446
struct doca_flow_header_icmp icmp
Definition: doca_flow.h:457
struct doca_flow_header_tcp tcp
Definition: doca_flow.h:461
struct doca_flow_header_ip6 ip6
Definition: doca_flow.h:451
doca flow icmp header in match data
doca flow ipv4 header in match data
doca flow ipv6 header in match data
doca flow tcp or udp port header in match data
doca flow MPLS header.
doca flow ROCEv2 header in match data
doca flow tcp header in match data
doca flow udp header in match data
doca flow match condition information
Definition: doca_flow.h:548
enum doca_flow_compare_op operation
Definition: doca_flow.h:549
struct doca_flow_match_condition::@68::@70 field_op
struct doca_flow_desc_field a
Definition: doca_flow.h:553
struct doca_flow_desc_field b
Definition: doca_flow.h:555
doca flow matcher information
Definition: doca_flow.h:491
struct doca_flow_header_format inner
Definition: doca_flow.h:502
struct doca_flow_parser_meta parser_meta
Definition: doca_flow.h:496
struct doca_flow_header_format outer
Definition: doca_flow.h:498
struct doca_flow_tun tun
Definition: doca_flow.h:500
uint32_t flags
Definition: doca_flow.h:492
struct doca_flow_meta meta
Definition: doca_flow.h:494
doca flow meta data
Definition: doca_flow.h:358
doca_be32_t pkt_meta
Definition: doca_flow.h:359
doca_be32_t mark
Definition: doca_flow.h:361
doca flow mirror target
Definition: doca_flow.h:929
struct doca_flow_fwd fwd
Definition: doca_flow.h:934
struct doca_flow_encap_action encap
Definition: doca_flow.h:932
doca monitor action configuration
Definition: doca_flow.h:968
enum doca_flow_meter_limit_type limit_type
Definition: doca_flow.h:973
struct doca_flow_monitor::@101::@105 non_shared_meter
uint32_t shared_mirror_id
Definition: doca_flow.h:997
uint32_t shared_meter_id
Definition: doca_flow.h:981
struct doca_flow_monitor::@101::@106 shared_meter
struct doca_flow_monitor::@103::@107 shared_counter
enum doca_flow_resource_type counter_type
Definition: doca_flow.h:988
enum doca_flow_meter_color meter_init_color
Definition: doca_flow.h:983
enum doca_flow_resource_type meter_type
Definition: doca_flow.h:969
uint32_t aging_sec
Definition: doca_flow.h:1000
uint32_t shared_counter_id
Definition: doca_flow.h:992
doca flow nat64 action
Definition: doca_flow.h:604
enum doca_flow_l3_type original_l3_type
Definition: doca_flow.h:605
Ordered list elements.
Definition: doca_flow.h:1057
struct doca_flow_monitor * monitor
Definition: doca_flow.h:1069
struct doca_flow_action_descs * action_descs
Definition: doca_flow.h:1066
enum doca_flow_ordered_list_element_type type
Definition: doca_flow.h:1058
struct doca_flow_actions * actions_mask
Definition: doca_flow.h:1064
struct doca_flow_actions * actions
Definition: doca_flow.h:1062
Ordered list configuration.
Definition: doca_flow.h:1077
struct doca_flow_ordered_list_element * elements
Definition: doca_flow.h:1085
User configuration structure using to create parser for single GENEVE TLV option.
Definition: doca_flow.h:1131
enum doca_flow_parser_geneve_opt_mode match_on_class_mode
Definition: doca_flow.h:1132
doca_be32_t data_mask[DOCA_FLOW_GENEVE_DATA_OPTION_LEN_MAX]
Definition: doca_flow.h:1140
doca flow parser meta data
Definition: doca_flow.h:369
uint8_t ipsec_ar_syndrome
Definition: doca_flow.h:378
enum doca_flow_l2_meta outer_l2_type
Definition: doca_flow.h:381
uint8_t outer_ip4_checksum_ok
Definition: doca_flow.h:390
enum doca_flow_l3_meta outer_l3_type
Definition: doca_flow.h:382
enum doca_flow_l2_meta inner_l2_type
Definition: doca_flow.h:384
uint8_t outer_l4_checksum_ok
Definition: doca_flow.h:392
enum doca_flow_l3_meta inner_l3_type
Definition: doca_flow.h:385
enum doca_flow_l4_meta inner_l4_type
Definition: doca_flow.h:386
enum doca_flow_l4_meta outer_l4_type
Definition: doca_flow.h:383
uint8_t outer_ip_fragmented
Definition: doca_flow.h:387
enum doca_flow_meter_color meter_color
Definition: doca_flow.h:380
uint8_t inner_ip4_checksum_ok
Definition: doca_flow.h:394
uint8_t inner_l4_checksum_ok
Definition: doca_flow.h:396
doca_be16_t random
Definition: doca_flow.h:376
uint8_t inner_ip_fragmented
Definition: doca_flow.h:388
doca flow push data information
Definition: doca_flow.h:593
struct doca_flow_push_vlan_action vlan
Definition: doca_flow.h:597
enum doca_flow_push_action_type type
Definition: doca_flow.h:594
doca flow push VLAN data information
Definition: doca_flow.h:576
struct doca_flow_header_eth_vlan vlan_hdr
Definition: doca_flow.h:579
doca flow decap resource configuration
Definition: doca_flow.h:670
struct doca_flow_header_eth eth
Definition: doca_flow.h:673
struct doca_flow_header_eth_vlan eth_vlan[DOCA_FLOW_VLAN_MAX]
Definition: doca_flow.h:677
doca flow encap resource configuration
Definition: doca_flow.h:660
struct doca_flow_encap_action encap
Definition: doca_flow.h:663
doca flow ipsec SA resource configuration
Definition: doca_flow.h:905
struct doca_flow_crypto_key_cfg key_cfg
Definition: doca_flow.h:906
enum doca_flow_crypto_sn_offload_type sn_offload_type
Definition: doca_flow.h:914
enum doca_flow_crypto_icv_len icv_len
Definition: doca_flow.h:912
enum doca_flow_crypto_replay_win_size win_size
Definition: doca_flow.h:916
doca flow meter resource configuration
Definition: doca_flow.h:863
struct doca_flow_resource_meter_cfg::@94::@97 rfc2698
enum doca_flow_meter_color_mode color_mode
Definition: doca_flow.h:866
enum doca_flow_meter_limit_type limit_type
Definition: doca_flow.h:864
struct doca_flow_resource_meter_cfg::@94::@96 rfc2697
enum doca_flow_meter_algorithm_type alg
Definition: doca_flow.h:868
struct doca_flow_resource_meter_cfg::@94::@98 rfc4115
doca flow mirror resource configuration
Definition: doca_flow.h:941
struct doca_flow_fwd fwd
Definition: doca_flow.h:946
struct doca_flow_mirror_target * target
Definition: doca_flow.h:944
doca flow psp resource configuration
Definition: doca_flow.h:897
struct doca_flow_crypto_key_cfg key_cfg
Definition: doca_flow.h:898
flow resource query
Definition: doca_flow.h:1101
struct doca_flow_resource_query::@115::@117 counter
struct doca_flow_resource_query::@115::@118 ipsec_sa
doca flow rss resource configuration
Definition: doca_flow.h:180
enum doca_flow_rss_hash_function rss_hash_func
Definition: doca_flow.h:189
doca flow shared resource configuration
Definition: doca_flow.h:953
struct doca_flow_resource_psp_cfg psp_cfg
Definition: doca_flow.h:957
struct doca_flow_resource_ipsec_sa_cfg ipsec_sa_cfg
Definition: doca_flow.h:961
struct doca_flow_resource_rss_cfg rss_cfg
Definition: doca_flow.h:956
struct doca_flow_resource_meter_cfg meter_cfg
Definition: doca_flow.h:955
struct doca_flow_resource_encap_cfg encap_cfg
Definition: doca_flow.h:959
struct doca_flow_resource_mirror_cfg mirror_cfg
Definition: doca_flow.h:958
struct doca_flow_resource_decap_cfg decap_cfg
Definition: doca_flow.h:960
doca flow tunnel information