| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |

Modules | |
| Doca Flow Crypto | |
| Doca Flow CT | |
| Doca Flow Net | |
| DOCA Flow Tune Server | |
Data Structures | |
| struct | doca_flow_resource_rss_cfg |
| doca flow rss resource configuration More... | |
| struct | doca_flow_meta |
| doca flow meta data More... | |
| struct | doca_flow_parser_meta |
| doca flow parser meta data More... | |
| struct | doca_flow_header_format |
| doca flow packet format More... | |
| struct | doca_flow_entropy_format |
| doca flow header format for entropy More... | |
| struct | doca_flow_match |
| doca flow matcher information More... | |
| struct | doca_flow_desc_field |
| Action descriptor field. More... | |
| struct | doca_flow_match_condition |
| doca flow match condition information More... | |
| struct | doca_flow_encap_action |
| doca flow encap data information More... | |
| struct | doca_flow_push_vlan_action |
| doca flow push VLAN data information More... | |
| struct | doca_flow_push_action |
| doca flow push data information More... | |
| struct | doca_flow_nat64_action |
| doca flow nat64 action More... | |
| struct | doca_flow_crypto_action |
| doca flow crypto action information More... | |
| struct | doca_flow_crypto_encap_action |
| doca flow crypto encap action information More... | |
| struct | doca_flow_resource_encap_cfg |
| doca flow encap resource configuration More... | |
| struct | doca_flow_resource_decap_cfg |
| doca flow decap resource configuration More... | |
| struct | doca_flow_actions |
| doca flow actions information More... | |
| struct | doca_flow_fwd |
| forwarding configuration More... | |
| struct | doca_flow_resource_meter_cfg |
| doca flow meter resource configuration More... | |
| struct | doca_flow_resource_psp_cfg |
| doca flow psp resource configuration More... | |
| struct | doca_flow_resource_ipsec_sa_cfg |
| doca flow ipsec SA resource configuration More... | |
| struct | doca_flow_mirror_target |
| doca flow mirror target More... | |
| struct | doca_flow_resource_mirror_cfg |
| doca flow mirror resource configuration More... | |
| struct | doca_flow_shared_resource_cfg |
| doca flow shared resource configuration More... | |
| struct | doca_flow_monitor |
| doca monitor action configuration More... | |
| struct | doca_flow_action_desc |
| action description More... | |
| struct | doca_flow_action_descs |
| action descriptor array More... | |
| struct | doca_flow_ordered_list_element |
| Ordered list elements. More... | |
| struct | doca_flow_ordered_list |
| Ordered list configuration. More... | |
| struct | doca_flow_resource_query |
| flow resource query More... | |
| struct | doca_flow_parser_geneve_opt_cfg |
| User configuration structure using to create parser for single GENEVE TLV option. More... | |
Macros | |
| #define | DOCA_FLOW_META_SCRATCH_PAD_MAX 10 |
| #define | DOCA_FLOW_META_MAX ((DOCA_FLOW_META_SCRATCH_PAD_MAX + 1) * 4) |
| #define | DOCA_FLOW_MAX_ENTRY_ACTIONS_MEM_SIZE (128) |
| meter mark color More... | |
| #define | DOCA_FLOW_VLAN_MAX 2 |
| #define | DOCA_FLOW_PSP_DECRYPTION_ID UINT32_MAX |
Typedefs | |
| typedef 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 More... | |
| typedef 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 More... | |
| typedef 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 More... | |
| typedef 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. More... | |
| typedef 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. More... | |
Functions | |
| enum | __attribute__ ((__packed__)) doca_flow_meter_color |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_init (struct doca_flow_cfg *cfg) |
| Initialize the doca flow. More... | |
| DOCA_STABLE void | doca_flow_destroy (void) |
| Destroy the doca flow. More... | |
| 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. More... | |
| DOCA_STABLE doca_error_t | doca_flow_port_stop (struct doca_flow_port *port) |
| Stop a doca port. More... | |
| 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. More... | |
| DOCA_STABLE uint8_t * | doca_flow_port_priv_data (struct doca_flow_port *port) |
| Get pointer of user private data. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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_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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| DOCA_STABLE void | doca_flow_pipe_destroy (struct doca_flow_pipe *pipe) |
| Destroy one pipe. More... | |
| DOCA_STABLE void | doca_flow_port_pipes_flush (struct doca_flow_port *port) |
| Flush pipes of one port. More... | |
| DOCA_EXPERIMENTAL void | doca_flow_port_pipes_dump (struct doca_flow_port *port, FILE *f) |
| Dump pipes of one port. More... | |
| DOCA_EXPERIMENTAL void | doca_flow_pipe_dump (struct doca_flow_pipe *pipe, FILE *f) |
| Dump pipe information (not including the entries) More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| DOCA_STABLE enum doca_flow_entry_status | doca_flow_pipe_entry_get_status (struct doca_flow_pipe_entry *entry) |
| Get entry's status. More... | |
| DOCA_STABLE struct doca_flow_port * | doca_flow_port_switch_get (const struct doca_flow_port *port) |
| Get doca flow switch port. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_parser_geneve_opt_destroy (struct doca_flow_parser *parser) |
| Destroy GENEVE TLV parser. More... | |
| 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. More... | |
| DOCA_STABLE doca_error_t | doca_flow_cfg_create (struct doca_flow_cfg **cfg) |
| Create DOCA Flow configuration struct. More... | |
| DOCA_STABLE doca_error_t | doca_flow_cfg_destroy (struct doca_flow_cfg *cfg) |
| Destroy DOCA Flow configuration struct. More... | |
| DOCA_STABLE doca_error_t | doca_flow_cfg_set_pipe_queues (struct doca_flow_cfg *cfg, uint16_t pipe_queues) |
| Set pipe queues. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| DOCA_STABLE doca_error_t | doca_flow_cfg_set_mode_args (struct doca_flow_cfg *cfg, const char *mode_args) |
| Set DOCA mode args. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| DOCA_STABLE doca_error_t | doca_flow_port_cfg_create (struct doca_flow_port_cfg **cfg) |
| Create DOCA Flow port configuration struct. More... | |
| DOCA_STABLE doca_error_t | doca_flow_port_cfg_destroy (struct doca_flow_port_cfg *cfg) |
| Destroy DOCA Flow port configuration struct. More... | |
| DOCA_STABLE doca_error_t | doca_flow_port_cfg_set_devargs (struct doca_flow_port_cfg *cfg, const char *devargs) |
| Set devargs. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| DOCA_STABLE doca_error_t | doca_flow_pipe_cfg_destroy (struct doca_flow_pipe_cfg *cfg) |
| Destroy DOCA Flow pipe configuration struct. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| DOCA_STABLE doca_error_t | doca_flow_pipe_cfg_set_name (struct doca_flow_pipe_cfg *cfg, const char *name) |
| Set pipe's name. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
DOCA HW offload flow library. For more details please refer to the user guide on DOCA devzone.
| #define DOCA_FLOW_MAX_ENTRY_ACTIONS_MEM_SIZE (128) |
meter mark color
Max usage of actions memory size in byte
Definition at line 266 of file doca_flow.h.
| #define DOCA_FLOW_META_MAX ((DOCA_FLOW_META_SCRATCH_PAD_MAX + 1) * 4) |
Max meta data size in bytes, including pkt_meta.
Definition at line 259 of file doca_flow.h.
| #define DOCA_FLOW_META_SCRATCH_PAD_MAX 10 |
Max meta scratch pad size in 32-bit resolution
Definition at line 254 of file doca_flow.h.
| #define DOCA_FLOW_PSP_DECRYPTION_ID UINT32_MAX |
PSP decryption reserved id, must be used at pipe creation and entry addition
Definition at line 621 of file doca_flow.h.
| #define DOCA_FLOW_VLAN_MAX 2 |
Max number of vlan headers.
Definition at line 424 of file doca_flow.h.
| typedef 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 at line 204 of file doca_flow.h.
| typedef 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 at line 196 of file doca_flow.h.
| typedef 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.
Called for each entry that reached its destination after resize. User is allowed to switch the context to a new pointer.
| [in] | pipe_user_ctx | Pointer to pipe user context. |
| [in] | pipe_queue | Pipe queue id. |
| [in] | entry_user_ctx | Pointer to entry user context. |
| [out] | new_entry_user_ctx | Pointer to new entry user context. |
Definition at line 1456 of file doca_flow.h.
| typedef 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.
| [in] | pipe_user_ctx | Pointer to pipe user context. |
| [out] | nr_entries | Changed value for pipe's number of entries. |
Definition at line 1435 of file doca_flow.h.
| typedef 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 at line 213 of file doca_flow.h.
action type enumeration
| Enumerator | |
|---|---|
| DOCA_FLOW_ACTION_AUTO | |
| DOCA_FLOW_ACTION_ADD | |
| DOCA_FLOW_ACTION_COPY | |
Definition at line 1007 of file doca_flow.h.
| enum doca_flow_compare_op |
doca flow compare operation
Definition at line 509 of file doca_flow.h.
doca flow psp/ipsec syndrome valid values for parser meta
Definition at line 321 of file doca_flow.h.
doca flow direction info
| Enumerator | |
|---|---|
| DOCA_FLOW_DIRECTION_BIDIRECTIONAL | |
| DOCA_FLOW_DIRECTION_NETWORK_TO_HOST | |
| DOCA_FLOW_DIRECTION_HOST_TO_NETWORK | |
Definition at line 1092 of file doca_flow.h.
| enum doca_flow_entry_op |
doca flow entry operation
| Enumerator | |
|---|---|
| DOCA_FLOW_ENTRY_OP_ADD | Add entry |
| DOCA_FLOW_ENTRY_OP_DEL | Delete entry |
| DOCA_FLOW_ENTRY_OP_UPD | Update entry |
| DOCA_FLOW_ENTRY_OP_AGED | Aged entry |
Definition at line 146 of file doca_flow.h.
doca flow entry status
| Enumerator | |
|---|---|
| DOCA_FLOW_ENTRY_STATUS_IN_PROCESS | |
| DOCA_FLOW_ENTRY_STATUS_SUCCESS | |
| DOCA_FLOW_ENTRY_STATUS_ERROR | |
Definition at line 160 of file doca_flow.h.
| enum doca_flow_flags_type |
doca flow flags type
| Enumerator | |
|---|---|
| DOCA_FLOW_NO_WAIT | entry will not be buffered |
| DOCA_FLOW_WAIT_FOR_BATCH | entry will be buffered |
Definition at line 114 of file doca_flow.h.
| enum doca_flow_fwd_type |
forwarding action type
Definition at line 739 of file doca_flow.h.
| enum doca_flow_l2_meta |
doca flow l2 valid type for parser meta
Definition at line 279 of file doca_flow.h.
doca flow l2 valid headers
| Enumerator | |
|---|---|
| DOCA_FLOW_L2_VALID_HEADER_VLAN_0 | first vlan |
| DOCA_FLOW_L2_VALID_HEADER_VLAN_1 | second vlan |
Definition at line 429 of file doca_flow.h.
| enum doca_flow_l3_meta |
doca flow l3 valid type for parser meta
| Enumerator | |
|---|---|
| DOCA_FLOW_L3_META_NONE | l3 type is none of the below |
| DOCA_FLOW_L3_META_IPV4 | l3 type is ipv4 |
| DOCA_FLOW_L3_META_IPV6 | l3 type is ipv6 |
Definition at line 293 of file doca_flow.h.
| enum doca_flow_l4_meta |
doca flow l4 valid type for parser meta
Definition at line 305 of file doca_flow.h.
doca flow match flags
Definition at line 402 of file doca_flow.h.
Traffic meter algorithms.
Definition at line 829 of file doca_flow.h.
Traffic meter init color mode when creating a pipe or entry: blind (fixed as green) or aware (configurable value).
| Enumerator | |
|---|---|
| DOCA_FLOW_METER_COLOR_MODE_BLIND | Meter action init color is green. |
| DOCA_FLOW_METER_COLOR_MODE_AWARE | Meter action init color is configured. |
Definition at line 853 of file doca_flow.h.
Traffic meter limit type: per bytes or per packets for all meter parameters: cir, cbs, eir, ebs.
| Enumerator | |
|---|---|
| DOCA_FLOW_METER_LIMIT_TYPE_BYTES | Meter parameters per bytes |
| DOCA_FLOW_METER_LIMIT_TYPE_PACKETS | Meter parameters packets |
Definition at line 842 of file doca_flow.h.
Type of an ordered list element.
| Enumerator | |
|---|---|
| DOCA_FLOW_ORDERED_LIST_ELEMENT_ACTIONS | |
| DOCA_FLOW_ORDERED_LIST_ELEMENT_MONITOR | Ordered list element is struct doca_flow_actions, and/or actions mask associated with the current element, or corresponding doca_flow_action_desc. |
Definition at line 1043 of file doca_flow.h.
Geneve TLV option class mode.
Definition at line 1119 of file doca_flow.h.
doca flow pipe domain
Definition at line 240 of file doca_flow.h.
DOCA Flow pipe map algorithm.
Definition at line 333 of file doca_flow.h.
| enum doca_flow_pipe_op |
doca flow pipe operation
| Enumerator | |
|---|---|
| DOCA_FLOW_PIPE_OP_CONGESTION_REACHED | Pipe congestion percentage level reached |
| DOCA_FLOW_PIPE_OP_RESIZED | Pipe resize completion |
| DOCA_FLOW_PIPE_OP_DESTROYED | Pipe destroy completion |
Definition at line 124 of file doca_flow.h.
doca flow pipe status
| Enumerator | |
|---|---|
| DOCA_FLOW_PIPE_STATUS_SUCCESS | The operation was completed successfully. |
| DOCA_FLOW_PIPE_STATUS_ERROR | The operation failed. |
Definition at line 136 of file doca_flow.h.
| enum doca_flow_pipe_type |
doca flow pipe type
Definition at line 220 of file doca_flow.h.
Defines the operation states for a port instance.
Definition at line 1147 of file doca_flow.h.
doca flow push action type
| Enumerator | |
|---|---|
| DOCA_FLOW_PUSH_ACTION_VLAN | |
Definition at line 586 of file doca_flow.h.
doca flow resource type
| Enumerator | |
|---|---|
| DOCA_FLOW_RESOURCE_TYPE_NONE | |
| DOCA_FLOW_RESOURCE_TYPE_SHARED | |
| DOCA_FLOW_RESOURCE_TYPE_NON_SHARED | |
Definition at line 612 of file doca_flow.h.
rss hash function type
| Enumerator | |
|---|---|
| DOCA_FLOW_RSS_HASH_FUNCTION_TOEPLITZ | Toeplitz |
| DOCA_FLOW_RSS_HASH_FUNCTION_SYMMETRIC_TOEPLITZ | Toeplitz with sorted source and destination |
Definition at line 172 of file doca_flow.h.
Shared resource supported types.
Definition at line 92 of file doca_flow.h.
| enum doca_rss_type |
rss offload types
| Enumerator | |
|---|---|
| DOCA_FLOW_RSS_IPV4 | rss by ipv4 header |
| DOCA_FLOW_RSS_IPV6 | rss by ipv6 header |
| DOCA_FLOW_RSS_UDP | rss by udp header |
| DOCA_FLOW_RSS_TCP | rss by tcp header |
| DOCA_FLOW_RSS_ESP | rss by esp header |
Definition at line 763 of file doca_flow.h.
| enum __attribute__ | ( | (__packed__) | ) |
packed
< Meter marking packet color as red
< Meter marking packet color as yellow
< Meter marking packet color as green
Definition at line 213 of file doca_flow.h.
| 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.
Process aged entries, the user will get a notification in the callback.
Handling of aged entries can take too much time, so we split each cycle to small chunks that are limited by some time quota.
As long as the function doesn't return -1, more entries are pending processing for this cycle.
| [in] | port | Port to handle aging |
| [in] | queue | Queue identifier. |
| [in] | quota | Max time quota in micro seconds handle aging, 0: no limit. |
| [in] | max_entries | Max entries for this function to handle aging, 0: no limit. |
0 no aged entries in current call. -1 full cycle done.0 the number of aged entries.
| DOCA_STABLE doca_error_t doca_flow_cfg_create | ( | struct doca_flow_cfg ** | cfg | ) |
Create DOCA Flow configuration struct.
Create and allocate DOCA Flow configuration struct
| [out] | cfg | DOCA Flow global configuration. |
| DOCA_STABLE doca_error_t doca_flow_cfg_destroy | ( | struct doca_flow_cfg * | cfg | ) |
Destroy DOCA Flow configuration struct.
Free and destroy the DOCA Flow configuration struct
| [in] | cfg | DOCA Flow global configuration. |
| 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.
| [in] | cfg | DOCA Flow global configuration. |
| [in] | cb | Callback for entry create/destroy |
| 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.
| [in] | cfg | DOCA Flow global configuration. |
| [in] | cb | Callback for pipe process completion |
| 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.
| [in] | cfg | DOCA Flow global configuration. |
| [in] | cb | Callback for unbinding of a shared resource |
| 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.
Set the RSS global configuration for all port
| [in] | cfg | DOCA Flow global configuration. |
| [in] | rss | RSS global configuration for all port |
| 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.
| [in] | cfg | DOCA Flow global configuration. |
| [in] | defs | A valid doca flow definitions object. |
| DOCA_STABLE doca_error_t doca_flow_cfg_set_mode_args | ( | struct doca_flow_cfg * | cfg, |
| const char * | mode_args | ||
| ) |
Set DOCA mode args.
Set the DOCA Flow architecture mode switch, vnf
| [in] | cfg | DOCA Flow global configuration. |
| [in] | mode_args | DOCA Flow architecture mode |
| 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.
Get the number of pre-configured collisions for the acl module
| [in] | cfg | DOCA Flow global configuration. |
| [in] | nr_acl_collisions | Number pre-configured collisions |
| 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.
| [in] | cfg | DOCA Flow global configuration. |
| [in] | nr_counters | Number of counters to configure |
| 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.
| [in] | cfg | DOCA Flow global configuration. |
| [in] | nr_meters | Number of traffic meters to configure |
| 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.
Set the number of shared resource per type
| [in] | cfg | DOCA Flow global configuration. |
| [in] | nr_shared_resource | Number of shared resource |
| [in] | type | Type of shared resource |
| DOCA_STABLE doca_error_t doca_flow_cfg_set_pipe_queues | ( | struct doca_flow_cfg * | cfg, |
| uint16_t | pipe_queues | ||
| ) |
Set pipe queues.
Set the pipe's number of queues for each offload thread
| [in] | cfg | DOCA Flow global configuration |
| [in] | pipe_queues | Pipe queues |
| 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.
| [in] | cfg | DOCA Flow global configuration. |
| [out] | queue_depth | Number of pre-configured queue_size |
| 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.
| [in] | cfg | DOCA Flow global configuration. |
| [in] | rss_key | RSS hash key |
| [in] | rss_key_len | Length of the RSS hash key in bytes |
| DOCA_STABLE void doca_flow_destroy | ( | void | ) |
Destroy the doca flow.
Release all the resources used by doca flow.
Must be invoked at the end of the application, before it exits.
| 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.
The application must invoke this function in order to complete the flow rule offloading and to receive the flow rule operation status.
| [in] | port | Port |
| [in] | pipe_queue | Queue identifier. |
| [in] | timeout | Max time in micro seconds for this function to process entries. Process once if timeout is 0 |
| [in] | max_processed_entries | Flow entries number to process If it is 0, it will proceed until timeout. |
| 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.
| [in] | type | Target type. |
| [out] | target | Target handler on success |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_init | ( | struct doca_flow_cfg * | cfg | ) |
Initialize the doca flow.
This is the global initialization function for doca flow. It initializes all resources used by doca flow.
Must be invoked first before any other function in this API. this is a one time call, used for doca flow initialization and global configurations.
| [in] | cfg | Port configuration, see doca_flow_cfg for details. |
| 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.
| [in] | mpls | Pointer to MPLS structure to decode. |
| [out] | label | Pointer to fill MPLS label value. |
| [out] | traffic_class | Pointer to fill MPLS traffic class value. |
| [out] | ttl | Pointer to fill MPLS TTL value. |
| [out] | bottom_of_stack | Pointer to fill whether this MPLS is bottom of stack. |
| 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.
| [in] | label | The label value - 20 bits. |
| [in] | traffic_class | Traffic class - 3 bits. |
| [in] | ttl | Time to live - 8 bits |
| [in] | bottom_of_stack | Whether this MPLS is bottom of stack. |
| [out] | mpls | Pointer to MPLS structure to fill. |
| 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.
This function must be called before creation of any pipe using GENEVE option.
This API is port oriented, but the configuration is done once for all ports under the same physical device. Each port should call this API before using GENEVE options, but it must use the same options in the same order inside the list.
Each physical device has 7 DWs for GENEVE TLV options. Each nonzero element in 'data_mask' array consumes one DW, and choosing matchable mode for class consumes additional one. Calling this API for second port under same physical device doesn't consume more DW, it uses same configuration.
| [in] | port | Pointer to doca flow port. |
| [in] | tlv_list | A list of GENEVE TLV options to create parser for them. |
| [in] | nb_options | The number of options in TLV list. |
| [out] | parser | Parser handler on success. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_parser_geneve_opt_destroy | ( | struct doca_flow_parser * | parser | ) |
Destroy GENEVE TLV parser.
This function must be called after last use of GENEVE option and before port closing.
| [in] | parser | Pointer to parser to be destroyed. |
| 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.
This API will populate the acl entries
| pipe_queue | Queue identifier. | |
| pipe | Pointer to pipe. | |
| match | Pointer to match, indicate specific packet match information. | |
| match_mask | Pointer to match mask information. | |
| priority | Priority value | |
| fwd | Pointer to fwd actions. | |
| flag | Flow entry will be pushed to hw immediately or not. enum doca_flow_flags_type. | |
| usr_ctx | Pointer to the user context. This context is associated with the entry and will be used during update and removal operations. Therefore, the pointer must remain valid for as long as the entry is valid. | |
| [out] | entry | The entry inserted. |
| 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.
When a packet matches a single pipe, will start HW offload. The pipe only defines which fields to match. When offloading, we need detailed information from packets, or we need to set some specific actions that the pipe did not define. The parameters include:
match: The packet detail fields according to the pipe definition. actions: The real actions according to the pipe definition. monitor: Defines the monitor actions if the pipe did not define it. fwd: Define the forward action if the pipe did not define it.
This API will do the actual HW offload, with the information from the fields of the input packets.
| [in] | pipe_queue | Queue identifier. |
| [in] | pipe | Pointer to pipe. |
| [in] | match | Pointer to match, indicate specific packet match information. |
| [in] | actions | Pointer to modify actions, indicate specific modify information. |
| [in] | monitor | Pointer to monitor actions. |
| [in] | fwd | Pointer to fwd actions. |
| [in] | flags | Flow entry will be pushed to hw immediately or not. enum doca_flow_flags_type. |
| [in] | usr_ctx | Pointer to the user context. This context is associated with the entry and will be used during update and removal operations. Therefore, the pointer must remain valid for as long as the entry is valid. |
| [out] | entry | Pipe entry handler on success. |
| 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.
Calculates the hash value for a given pipe assuming the that the match parameter holds the values that the HW will see.
| [in] | pipe | Pointer to pipe. |
| [in] | match | Pointer to match, indicate specific packet match information. |
| [out] | hash | The calculated hash on success. |
| 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.
Create and allocate DOCA Flow pipe configuration struct and set port
| [out] | cfg | DOCA Flow pipe configuration. |
| [in] | port | DOCA Flow port. |
| DOCA_STABLE doca_error_t doca_flow_pipe_cfg_destroy | ( | struct doca_flow_pipe_cfg * | cfg | ) |
Destroy DOCA Flow pipe configuration struct.
Free and destroy the DOCA Flow pipe configuration struct
| [in] | cfg | DOCA Flow pipe configuration. |
| 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.
Set pipe's actions, actions mask and actions descriptor. nr_actions must not be zero, and actions must not be NULL. actions_masks and action_descs can be NULL, meaning not set.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | actions | DOCA Flow actions array |
| [in] | actions_masks | DOCA Flow actions mask array |
| [in] | action_descs | DOCA Flow actions descriptor array |
| [in] | nr_actions | Number of actions |
| 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.
Set congestion threshold for pipe in percentage (0,100] - pipe notification.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | congestion_level_threshold | congestion level threshold |
| 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.
Set pipe's Direction info. This is an optional direction hint for driver optimization, supported in switch mode only.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | dir_info | DOCA Flow direction info. |
| 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.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | domain | DOCA Flow pipe steering domain |
| 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.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | pipe_queue | The pipe_queue to exclude |
| 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.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | algorithm_flags | Algorithms to use in the pipe. enum doca_flow_pipe_hash_map_algorithm. |
| 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.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | is_resizable | If the pipe is resizable. |
| 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.
Set if pipe is root or not. If true it means the pipe is a root pipe executed on packet arrival.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | is_root | If the pipe is root. |
| 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.
The label is a text string that can be used to identify or describe the pipe.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | label | A string containing the label to be set. |
| 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.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | match | DOCA Flow match |
| [in] | match_mask | DOCA Flow match mask |
| 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.
Set to enable pipe's missed flows counter, can be queried with doca_flow_resource_query_pipe_miss().
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | miss_counter | If to enable miss counter |
| 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.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | monitor | DOCA Flow monitor |
| DOCA_STABLE doca_error_t doca_flow_pipe_cfg_set_name | ( | struct doca_flow_pipe_cfg * | cfg, |
| const char * | name | ||
| ) |
Set pipe's name.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | name | Pipe name |
| 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.
Set pipe's maximum number of flow rules, default is 8k if not set.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | nr_entries | Maximum number of flow rules |
| 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.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | ordered_lists | DOCA Flow ordered lists array |
| [in] | nr_ordered_lists | Number of ordered lists |
| 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.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | type | DOCA Flow pipe type |
| 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.
Set pipe's user context - pipe notification.
| [in] | cfg | DOCA Flow pipe configuration. |
| [in] | user_ctx | User context |
| 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.
Refer to doca_flow_pipe_add_entry.
| [in] | pipe_queue | Queue identifier. |
| [in] | priority | Priority value. |
| [in] | pipe | Pointer to pipe. |
| [in] | match | Pointer to match, indicate specific packet match information. |
| [in] | match_mask | Pointer to match mask information. |
| [in] | condition | Pointer to match condition information. |
| [in] | actions | Pointer to modify actions, indicate specific modify information. |
| [in] | actions_mask | Pointer to modify actions' mask, indicate specific modify information. |
| [in] | action_descs | action descriptions |
| [in] | monitor | Pointer to monitor actions. |
| [in] | fwd | Pointer to fwd actions. |
| [in] | usr_ctx | Pointer to the user context. This context is associated with the entry and will be used during update and removal operations. Therefore, the pointer must remain valid for as long as the entry is valid. |
| [out] | entry | Pipe entry handler on success. |
| 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.
Create new pipeline to match and offload specific packets, the pipe configuration includes the following components:
match: Match one packet by inner or outer fields.
match_mask: The mask for the matched items.
actions: Includes the modify specific packets fields, Encap and
Decap actions.
monitor: Includes Count, Age, and Meter actions.
fwd: The destination of the matched action, include RSS, Hairpin,
Port, and Drop actions.
This API will create the pipe, but would not start the HW offload.
| [in] | cfg | Pipe configuration. |
| [in] | fwd | Fwd configuration for the pipe. |
| [in] | fwd_miss | Fwd_miss configuration for the pipe. NULL for no fwd_miss. When creating a pipe if there is a miss and fwd_miss configured, packet steering should jump to it. |
| [out] | pipe | Pipe handler on success. |
| DOCA_STABLE void doca_flow_pipe_destroy | ( | struct doca_flow_pipe * | pipe | ) |
Destroy one pipe.
Destroy the pipe, and the pipe entries that match this pipe.
| [in] | pipe | Pointer to pipe. |
| DOCA_EXPERIMENTAL void doca_flow_pipe_dump | ( | struct doca_flow_pipe * | pipe, |
| FILE * | f | ||
| ) |
Dump pipe information (not including the entries)
| [in] | pipe | Pointer to doca flow pipe. |
| [in] | f | The output file of the pipe information. |
| DOCA_STABLE enum doca_flow_entry_status doca_flow_pipe_entry_get_status | ( | struct doca_flow_pipe_entry * | entry | ) |
Get entry's status.
| [in] | entry | pipe entry |
| 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.
Refer to doca_flow_pipe_add_entry.
| pipe_queue | Queue identifier. | |
| pipe | Pointer to pipe. | |
| entry_index | Static index in pipe for this entry. | |
| actions | Pointer to modify actions, indicate specific modify information. | |
| monitor | Pointer to monitor actions. | |
| fwd | Pointer to forward actions. | |
| flags | Flow entry will be pushed to HW immediately or not. enum doca_flow_flags_type. | |
| usr_ctx | Pointer to the user context. This context is associated with the entry and will be used during removal operation. Therefore, the pointer must remain valid for as long as the entry is valid. | |
| [out] | entry | Pipe entry handler on success. |
| 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.
This API will populate the lpm entries
| [in] | pipe_queue | Queue identifier. |
| [in] | pipe | Pointer to pipe. |
| [in] | match | Pointer to match, indicate specific packet match information. |
| [in] | match_mask | Pointer to match mask information. |
| [in] | actions | Pointer to modify actions, indicate specific modify information. |
| [in] | monitor | Pointer to monitor actions. |
| [in] | fwd | Pointer to fwd actions. |
| [in] | flag | Flow entry will be pushed to hw immediately or not. enum doca_flow_flags_type. |
| [in] | usr_ctx | Pointer to the user context. This context is associated with the entry and will be used during update and removal operations. Therefore, the pointer must remain valid for as long as the entry is valid. |
| [out] | entry | Pipe entry handler on success. |
| 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.
| [in] | pipe_queue | Queue identifier. |
| [in] | pipe | Pointer to pipe. |
| [in] | actions | Pointer to modify actions, indicate specific modify information. |
| [in] | monitor | Pointer to monitor actions. |
| [in] | fwd | Pointer to fwd actions. |
| [in] | flags | Flow entry will be pushed to hw immediately or not. enum doca_flow_flags_type. |
| [in] | entry | The pipe entry to be updated. |
| 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 | ||
| ) |
Add an entry to the ordered list pipe.
| [in] | pipe_queue | Queue identifier. |
| [in] | pipe | Pipe handle. |
| [in] | idx | Unique entry index. It is the user's responsibility to ensure uniqueness. |
| [in] | ordered_list | Ordered list with pointers to struct doca_flow_actions and struct doca_flow_monitor at the same indices as they were at the pipe creation time. If the configuration contained an element of struct doca_flow_action_descs, the corresponding array element is ignored and can be NULL. |
| [in] | fwd | Entry forward configuration. |
| [in] | flags | Entry insertion flags. |
| [in] | user_ctx | Pointer to the user context. This context is associated with the entry and will be used during removal operation. Therefore, the pointer must remain valid for as long as the entry is valid. |
| [out] | entry | The entry inserted. |
| 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.
This API will free the pipe entry and cancel HW offload. The Application receives the entry pointer upon creation and if can call this function when there is no more need for this offload. For example, if the entry aged, use this API to free it.
| [in] | pipe_queue | Queue identifier. |
| [in] | flags | Flow entry will be removed from hw immediately or not. enum doca_flow_flags_type. |
| [in] | entry | The pipe entry to be removed. |
| 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.
| [in] | pipe | Pointer to pipe. |
| [in] | new_congestion_level | Pushback the pipe current congestion level to a new value. |
| [in] | nr_entries_changed_cb | Number of entries after resize. |
| [in] | entry_relocation_cb | Entry relocate behavior. |
| 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.
| [in] | pipe_queue | Queue identifier. |
| [in] | pipe | Pointer to pipe. |
| [in] | actions | Pointer to modify actions, indicate specific modify information. |
| [in] | monitor | Pointer to monitor actions. |
| [in] | fwd | Pointer to fwd actions. |
| [in] | flags | Flow entry will be pushed to hw immediately or not. enum doca_flow_flags_type. |
| [in] | entry | The pipe entry to be updated. |
| 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.
| [in] | pipe | The pipe to update its miss action. |
| [in] | fwd_miss | A new fwd_miss configuration for the pipe. |
| 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.
Calculate the entropy as it would have been calculated by the HW.
| [in] | port | The given port for the entropy calculation. |
| [in] | header | Pointer to the header that holds the fields that are the base for the entropy calculation. |
| [out] | entropy | Used to return the calculated entropy. It will be written in network order. |
| DOCA_STABLE doca_error_t doca_flow_port_cfg_create | ( | struct doca_flow_port_cfg ** | cfg | ) |
Create DOCA Flow port configuration struct.
Create and allocate DOCA Flow port configuration struct
| [out] | cfg | DOCA Flow port configuration. |
| DOCA_STABLE doca_error_t doca_flow_port_cfg_destroy | ( | struct doca_flow_port_cfg * | cfg | ) |
Destroy DOCA Flow port configuration struct.
Free and destroy the DOCA Flow port configuration struct
| [in] | cfg | DOCA Flow port configuration. |
| 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.
Set max memory which will be used by actions in this port. Default is zero.
| [in] | cfg | DOCA Flow port configuration. |
| [in] | size | The memory size in byte, should be power of two and not less than 64B. |
| 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.
| [in] | cfg | DOCA Flow port configuration. |
| [in] | dev | Device |
| 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.
Calling this function also indicates the port is representor.
| [in] | cfg | DOCA Flow port configuration. |
| [in] | dev | Doca device representor. |
| DOCA_STABLE doca_error_t doca_flow_port_cfg_set_devargs | ( | struct doca_flow_port_cfg * | cfg, |
| const char * | devargs | ||
| ) |
Set devargs.
Set specific configuration per port type
| [in] | cfg | DOCA Flow port configuration |
| [in] | devargs | Specific configuration per port type |
| 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.
| [in] | cfg | DOCA Flow port configuration. |
| 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.
| [in] | cfg | DOCA Flow port configuration. |
| [in] | state | The desired operation state for the port instance. |
| 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.
Assigns a logical port ID to the specified DOCA Flow port.
| [in] | cfg | Pointer to the DOCA Flow port configuration. |
| [in] | port_id | Logical port ID to assign to the port. |
| 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.
| [in] | cfg | DOCA Flow port configuration. |
| [in] | priv_data_size | User private data size |
| 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.
| [in] | cfg | DOCA Flow port configuration. |
| [in] | rss_cfg | RSS configuration |
| 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.
Set cpu core which will be used by service threads in this port. Default is zero. Current supported service threads: counters cache threads
| [in] | cfg | DOCA Flow port configuration. |
| [in] | core | The cpu core number. |
| 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.
Defines the minimum time between two consecutive thread cycle executions in port. Default is 1000 ms (1 sec). Current supported service threads: counters cache threads
| [in] | cfg | DOCA Flow port configuration. |
| [in] | cycle_ms | The service threads cycle in ms. |
| 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.
This function changes the operation state of the given port instance. If the port instance already has the required state, the function returns DOCA_SUCCESS without performing any operations.
| [in] | port | Pointer to the DOCA port instance. |
| [in] | state | The desired operation state for the port instance. |
| 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.
This API should be used to pair two doca ports. This pair should be the same as the actual physical layer paired information. Those two pair ports have no order, a port cannot be paired with itself.
In this API, default behavior will be handled according to each modes. In VNF mode, pair information will be translated to queue action to redirect packets to it's pair port. In REMOTE_VNF mode, default rules will be created to redirect packets between 2 pair ports.
| [in] | port | Pointer to doca flow port. |
| [in] | pair_port | Pointer to the pair port. |
| DOCA_EXPERIMENTAL void doca_flow_port_pipes_dump | ( | struct doca_flow_port * | port, |
| FILE * | f | ||
| ) |
Dump pipes of one port.
Dump all pipes information belong to this port.
| [in] | port | Pointer to doca flow port. |
| [in] | f | The output file of the pipe information. |
| DOCA_STABLE void doca_flow_port_pipes_flush | ( | struct doca_flow_port * | port | ) |
Flush pipes of one port.
Destroy all pipes and all pipe entries belonging to the port.
| [in] | port | Pointer to doca flow port. |
| DOCA_STABLE uint8_t* doca_flow_port_priv_data | ( | struct doca_flow_port * | port | ) |
Get pointer of user private data.
User can manage specific data structure in port structure. The size of the data structure is given on port configuration. See doca_flow_cfg for more details.
| [in] | port | Port struct. |
| 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.
Start a port with the given configuration. Will create one port in the doca flow layer, allocate all resources used by this port, and create the default offload logic for traffic.
| [in] | cfg | Port configuration, see doca_flow_cfg for details. |
| [out] | port | Port handler on success. |
| DOCA_STABLE doca_error_t doca_flow_port_stop | ( | struct doca_flow_port * | port | ) |
Stop a doca port.
Stop the port, disable the traffic, destroy the doca port, free all resources of the port.
| [in] | port | Port struct. |
| DOCA_STABLE struct doca_flow_port* doca_flow_port_switch_get | ( | const struct doca_flow_port * | port | ) |
Get doca flow switch port.
| [in] | port | The port for which to get the switch port. If NULL, get the first switch port created. The application could use this function to get the doca switch port, then create pipes and pipe entries on this port. |
| 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.
Query the packet statistics about specific pipe entry
| [in] | entry | The pipe entry to query. |
| [in] | query_stats | Data retrieved by the query. |
| 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.
Query the packet statistics about specific pipe miss entry
| [in] | pipe | The pipe to query. |
| [in] | query_stats | Data retrieved by the query. |
| 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.
This API can be used by bounded and unbounded resources.
| [in] | type | Shared resource type. |
| [in] | id | Shared resource id. |
| [in] | cfg | Pointer to a shared resource configuration. |
| 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.
Binds a bulk of shared resources from the same type to a bindable object. Currently the bindable objects are ports and pipes.
| [in] | type | Shared resource type. |
| [in] | res_array | Array of shared resource IDs. |
| [in] | res_array_len | Shared resource IDs array length. |
| [in] | bindable_obj | Pointer to an allowed bindable object, use NULL to bind globally. |
| 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.
Query an array of shared objects of a specific type.
| [in] | type | Shared object type. |
| [in] | res_array | Array of shared objects IDs to query. |
| [in] | query_results_array | Data array retrieved by the query. |
| [in] | array_len | Number of objects and their query results in their arrays (same number). |