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

Data Structures | |
| struct | doca_flow_ct_aging_ctx |
| CT aging user plugin context. More... | |
| union | doca_flow_ct_aging_conn |
| CT aging connection info. More... | |
| struct | doca_flow_ct_aging_conn_event |
| CT aging user plugin connection event. More... | |
| struct | doca_flow_ct_aging_ops |
| CT aging user plugin callbacks. More... | |
| struct | doca_flow_ct_aging_counter_state |
| CT aging counter state. More... | |
| struct | doca_flow_ct_aging_counter |
| Counter statistics. More... | |
| struct | doca_flow_ct_aging_conn_update_info |
| Connection update information. More... | |
| struct | doca_flow_ct_actions |
| struct | doca_flow_ct_match4 |
| doca flow CT IPv4 match pattern More... | |
| struct | doca_flow_ct_match6 |
| doca flow CT IPv6 match pattern More... | |
| struct | doca_flow_ct_match |
| doca flow CT match pattern More... | |
Macros | |
| #define | DOCA_FLOW_CT_ACTION_HANDLE_INVALID (UINT32_MAX) |
| #define | DOCA_FLOW_CT_MARK_FROM_DPDK(_mark) (DOCA_BETOH32((_mark) + 1) >> 8) |
Typedefs | |
| typedef void(* | doca_flow_ct_entry_finalize_cb) (struct doca_flow_pipe *pipe, void *entry, uint16_t queue, void *usr_ctx) |
| typedef void(* | doca_flow_ct_stats_update_cb) (struct doca_flow_pipe *pipe, void *priv_data, struct doca_flow_resource_query *stats_origin, struct doca_flow_resource_query *stats_reply) |
Functions | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_create (struct doca_flow_ct_cfg **cfg) |
| Create CT configuration. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_destroy (struct doca_flow_ct_cfg *cfg) |
| Destroy CT configuration. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_flags (struct doca_flow_ct_cfg *cfg, uint32_t flags) |
| Set CT flags. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_queues (struct doca_flow_ct_cfg *cfg, uint32_t n_queues) |
| Set number of hardware queues. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_queue_depth (struct doca_flow_ct_cfg *cfg, uint32_t queue_depth) |
| Set queue depth. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_ctrl_queues (struct doca_flow_ct_cfg *cfg, uint32_t n_ctrl_queues) |
| Set number of control queues. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_user_actions (struct doca_flow_ct_cfg *cfg, uint32_t n_user_actions) |
| Set number of user actions. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_connections (struct doca_flow_ct_cfg *cfg, uint32_t n_ipv4, uint32_t n_ipv6, uint32_t n_total) |
| Set number of ARM sessions. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_max_connections_per_zone (struct doca_flow_ct_cfg *cfg, uint32_t max_connections_per_zone) |
| Set maximum number of connections per zone. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_counter_asymmetric (struct doca_flow_ct_cfg *cfg, uint32_t n_counter_asymmetric) |
| Set number of asymmetric counter connections. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_entry_private_data_size (struct doca_flow_ct_cfg *cfg, uint32_t entry_priv_data_size) |
| Set entry private data size. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_entry_finalize_cb (struct doca_flow_ct_cfg *cfg, doca_flow_ct_entry_finalize_cb entry_finalize_cb) |
| Set entry finalize callback to query connection final stats. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_status_update_cb (struct doca_flow_ct_cfg *cfg, doca_flow_ct_stats_update_cb stats_update_cb) |
| Set status update callback to notify on counter changes. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_aging_core (struct doca_flow_ct_cfg *cfg, uint32_t aging_core) |
| Set core ID to run aging thread on. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_aging_query_delay (struct doca_flow_ct_cfg *cfg, uint32_t aging_query_delay_s) |
| Set aging query delay in seconds. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_aging_plugin_ops (struct doca_flow_ct_cfg *cfg, struct doca_flow_ct_aging_ops *aging_ops) |
| Set aging plugin callbacks. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_dup_filter_size (struct doca_flow_ct_cfg *cfg, uint32_t dup_filter_sz) |
| Set Number of connections to cache in duplication filter. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cfg_set_direction (struct doca_flow_ct_cfg *cfg, bool direction, bool match_inner, struct doca_flow_meta *zone_match_mask, struct doca_flow_meta *meta_modify_mask) |
| Set CT configuration origin and reply direction. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_init (const struct doca_flow_ct_cfg *cfg) |
| Initialize the doca flow ct. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_cap_is_dev_supported (const struct doca_devinfo *devinfo) |
| Check if doca device supported by CT. More... | |
| DOCA_EXPERIMENTAL void | doca_flow_ct_destroy (void) |
| Destroy the doca flow ct. More... | |
| DOCA_EXPERIMENTAL void | doca_flow_ct_meta_prepare (struct doca_flow_meta *meta, uint32_t zone, bool is_reply) |
| Prepare meta with zone and default CT type. More... | |
| DOCA_EXPERIMENTAL void | doca_flow_ct_meta_mask_prepare (struct doca_flow_meta *meta, bool is_reply) |
| Prepare meta as mask with zone and CT type. More... | |
| DOCA_EXPERIMENTAL void | doca_flow_ct_meta_set_match_zone (struct doca_flow_meta *meta, uint32_t zone, bool is_reply) |
| Set meta match zone data to doca_flow meta. More... | |
| DOCA_EXPERIMENTAL uint32_t | doca_flow_ct_meta_get_zone_offset (bool is_reply) |
| Get zone data bit offset in meta data field. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_aging_counter_state_get (struct doca_flow_ct_aging_ctx *ctx, struct doca_flow_ct_aging_counter_state *ctrs, uint32_t n) |
| Get counter state inside aging plugin timer callback. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_aging_counter_state_set (struct doca_flow_ct_aging_ctx *ctx, struct doca_flow_ct_aging_counter_state *ctrs, uint32_t n) |
| Set counter state inside aging plugin timer callback. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_aging_counter_query (struct doca_flow_ct_aging_ctx *ctx, struct doca_flow_ct_aging_counter *ctrs, uint32_t n) |
| Get counter statistics inside aging plugin timer callback. More... | |
| DOCA_EXPERIMENTAL void | doca_flow_ct_aging_conn_update (struct doca_flow_ct_aging_ctx *ctx, struct doca_flow_ct_aging_conn_update_info *info, uint32_t n) |
| Update connection counter inside aging plugin timer callback. More... | |
| DOCA_EXPERIMENTAL void | doca_flow_ct_aging_conn_timeout (struct doca_flow_ct_aging_ctx *ctx, uint32_t *aging_conn_ids, uint32_t n) |
| Remove timeout connections inside aging plugin timer callback. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_entries_process (struct doca_flow_port *port, uint16_t pipe_queue, uint32_t min_room, uint32_t max_processed_entries, uint32_t *queue_room) |
| Process CT entries in queue. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_entry_prepare (uint16_t queue, struct doca_flow_pipe *pipe, uint32_t flags, struct doca_flow_ct_match *match_origin, uint32_t hash_origin, struct doca_flow_ct_match *match_reply, uint32_t hash_reply, struct doca_flow_pipe_entry **entry, bool *conn_found) |
| Lookup recent CT entry and create on miss. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_entry_prepare_rollback (uint16_t queue, struct doca_flow_pipe *pipe, struct doca_flow_pipe_entry *entry) |
| Free the CT entry that hasn't been added to CT pipe. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_add_entry (uint16_t queue, struct doca_flow_pipe *pipe, uint32_t flags, struct doca_flow_ct_match *match_origin, struct doca_flow_ct_match *match_reply, const struct doca_flow_ct_actions *actions_origin, const struct doca_flow_ct_actions *actions_reply, uint32_t fwd_handle_origin, uint32_t fwd_handle_reply, uint32_t timeout_s, void *usr_ctx, struct doca_flow_pipe_entry *entry) |
| Add new entry to doca flow CT pipe. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_entry_add_dir (uint16_t queue, struct doca_flow_pipe *pipe, uint32_t flags, struct doca_flow_ct_match *match, const struct doca_flow_ct_actions *actions, uint32_t fwd_handle, struct doca_flow_pipe_entry *entry) |
| Add missing direction rule to CT connection. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_update_entry (uint16_t queue, struct doca_flow_pipe *pipe, uint32_t flags, struct doca_flow_pipe_entry *entry, const struct doca_flow_ct_actions *actions_origin, const struct doca_flow_ct_actions *actions_reply, uint32_t fwd_handle_origin, uint32_t fwd_handle_reply, uint32_t timeout_s) |
| Update CT entry meta or counter. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_rm_entry (uint16_t queue, struct doca_flow_pipe *pipe, uint32_t flags, struct doca_flow_pipe_entry *entry) |
| remove CT entry. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_get_entry (uint16_t queue, struct doca_flow_pipe *pipe, uint32_t flags, struct doca_flow_pipe_entry *entry, struct doca_flow_ct_match *match_origin, struct doca_flow_ct_match *match_reply, uint64_t *entry_flags) |
| Get CT entry match pattern. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_query_entry (uint16_t queue, struct doca_flow_pipe *pipe, uint32_t flags, struct doca_flow_pipe_entry *entry, struct doca_flow_resource_query *stats_origin, struct doca_flow_resource_query *stats_reply, uint64_t *last_hit_s) |
| Extract information about specific entry. More... | |
| DOCA_EXPERIMENTAL void * | doca_flow_ct_entry_get_priv_data (uint16_t queue, struct doca_flow_pipe *pipe, struct doca_flow_pipe_entry *entry) |
| DOCA_EXPERIMENTAL uint32_t | doca_flow_ct_entry_get_conn_id (uint16_t queue, struct doca_flow_pipe *pipe, struct doca_flow_pipe_entry *entry) |
| DOCA_EXPERIMENTAL uint32_t | doca_flow_ct_entry_get_aging_conn_id (uint16_t queue, struct doca_flow_pipe *pipe, struct doca_flow_pipe_entry *entry) |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_entry_get_by_id (uint16_t queue, struct doca_flow_pipe *pipe, uint32_t conn_id, struct doca_flow_pipe_entry **entry, void **priv_data) |
| Retrieves the entry from CT pipe based on the given connection ID. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_actions_add_shared (uint16_t ctrl_queue, struct doca_flow_pipe *pipe, const struct doca_flow_ct_actions actions[], uint32_t nb_actions, uint32_t actions_handles[]) |
| Add shared modify-action. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_actions_update_shared (uint16_t ctrl_queue, struct doca_flow_pipe *pipe, const struct doca_flow_ct_actions actions[], uint32_t nb_actions, uint32_t actions_handles[]) |
| Update shared modify-action. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_actions_rm_shared (uint16_t ctrl_queue, struct doca_flow_pipe *pipe, uint32_t actions_handles[], uint32_t nb_actions) |
| Remove shared modify-action. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_flow_ct_fwd_register (struct doca_flow_port *port, uint32_t fwd_count, struct doca_flow_fwd fwd[], uint32_t fwd_handle[]) |
| CT register multiple forwards pipes. More... | |
DOCA HW connection tracking library.
| #define DOCA_FLOW_CT_ACTION_HANDLE_INVALID (UINT32_MAX) |
invalid CT action handle
Definition at line 45 of file doca_flow_ct.h.
| #define DOCA_FLOW_CT_MARK_FROM_DPDK | ( | _mark | ) | (DOCA_BETOH32((_mark) + 1) >> 8) |
Translate DPDK's MARK value to CT mark value
Definition at line 50 of file doca_flow_ct.h.
| typedef void(* doca_flow_ct_entry_finalize_cb) (struct doca_flow_pipe *pipe, void *entry, uint16_t queue, void *usr_ctx) |
This callback is invoked as the final step in the lifecycle of a flow entry if the DOCA_FLOW_CT_ENTRY_FLAGS_ENTRY_FINALIZE was configured. It occurs after the destroy callback and provides a last opportunity to query the flow's final state before the SW context associated with the flow entry is completely invalidated.
Definition at line 72 of file doca_flow_ct.h.
| typedef void(* doca_flow_ct_stats_update_cb) (struct doca_flow_pipe *pipe, void *priv_data, struct doca_flow_resource_query *stats_origin, struct doca_flow_resource_query *stats_reply) |
Stats updates callback function to notify on counter changes
Definition at line 77 of file doca_flow_ct.h.
doca flow CT entry operation flags
| Enumerator | |
|---|---|
| DOCA_FLOW_CT_ENTRY_FLAGS_NO_WAIT | entry will not be buffered, send to hardware immediately |
| DOCA_FLOW_CT_ENTRY_FLAGS_DIR_ORIGIN | apply to origin direction |
| DOCA_FLOW_CT_ENTRY_FLAGS_DIR_REPLY | apply to reply direction |
| DOCA_FLOW_CT_ENTRY_FLAGS_IPV6_ORIGIN | origin direction is IPv6, union in struct doca_flow_ct_match is ipv6 |
| DOCA_FLOW_CT_ENTRY_FLAGS_IPV6_REPLY | reply direction is IPv6, union in struct doca_flow_ct_match is ipv6 |
| DOCA_FLOW_CT_ENTRY_FLAGS_COUNTER_ORIGIN | Apply counter to origin direction |
| DOCA_FLOW_CT_ENTRY_FLAGS_COUNTER_REPLY | Apply counter to reply direction |
| DOCA_FLOW_CT_ENTRY_FLAGS_COUNTER_SHARED | Counter is shared for both direction |
| DOCA_FLOW_CT_ENTRY_FLAGS_ENTRY_FINALIZE | Enable finalize callback on entry removed |
| DOCA_FLOW_CT_ENTRY_FLAGS_ALLOC_ON_MISS | Allocate on entry not found |
| DOCA_FLOW_CT_ENTRY_FLAGS_DUP_FILTER_ORIGIN | Enable duplication filter on origin |
| DOCA_FLOW_CT_ENTRY_FLAGS_DUP_FILTER_REPLY | Enable duplication filter on reply |
| DOCA_FLOW_CT_ENTRY_FLAGS_STATS_UPDATES | Enable calls to stats_update_cb on counter changes |
Definition at line 664 of file doca_flow_ct.h.
| enum doca_flow_ct_flags |
CT flags.
Definition at line 55 of file doca_flow_ct.h.
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_actions_add_shared | ( | uint16_t | ctrl_queue, |
| struct doca_flow_pipe * | pipe, | ||
| const struct doca_flow_ct_actions | actions[], | ||
| uint32_t | nb_actions, | ||
| uint32_t | actions_handles[] | ||
| ) |
Add shared modify-action.
| [in] | ctrl_queue | control queue id. |
| [in] | pipe | Pointer to pipe. |
| [in] | actions | list of actions data, each updated with action id |
| [in] | nb_actions | number of actions to create |
| [out] | actions_handles | list of handles allocated for the input actions |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_actions_rm_shared | ( | uint16_t | ctrl_queue, |
| struct doca_flow_pipe * | pipe, | ||
| uint32_t | actions_handles[], | ||
| uint32_t | nb_actions | ||
| ) |
Remove shared modify-action.
| [in] | ctrl_queue | control ctrl queue id. |
| [in] | pipe | Pointer to pipe. |
| [in] | actions_handles | list of action ids |
| [in] | nb_actions | number of actions to create |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_actions_update_shared | ( | uint16_t | ctrl_queue, |
| struct doca_flow_pipe * | pipe, | ||
| const struct doca_flow_ct_actions | actions[], | ||
| uint32_t | nb_actions, | ||
| uint32_t | actions_handles[] | ||
| ) |
Update shared modify-action.
| [in] | ctrl_queue | control queue id. |
| [in] | pipe | Pointer to pipe. |
| [in] | actions | list of actions data, each updated with action id |
| [in] | nb_actions | number of actions to update |
| [in] | actions_handles | list of handles used for the update actions |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_add_entry | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| uint32_t | flags, | ||
| struct doca_flow_ct_match * | match_origin, | ||
| struct doca_flow_ct_match * | match_reply, | ||
| const struct doca_flow_ct_actions * | actions_origin, | ||
| const struct doca_flow_ct_actions * | actions_reply, | ||
| uint32_t | fwd_handle_origin, | ||
| uint32_t | fwd_handle_reply, | ||
| uint32_t | timeout_s, | ||
| void * | usr_ctx, | ||
| struct doca_flow_pipe_entry * | entry | ||
| ) |
Add new entry to doca flow CT pipe.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | flags | operation flags, see doca_flow_ct_entry_flags. |
| [in] | match_origin | match pattern in origin direction. |
| [in] | match_reply | match pattern in reply direction, default to reverse of origin pattern. |
| [in] | actions_origin | actions to set on origin direction |
| [in] | actions_reply | actions to set on reply direction |
| [in] | fwd_handle_origin | fwd handle for origin direction |
| [in] | fwd_handle_reply | fwd handle for reply direction |
| [in] | timeout_s | aging timeout in second, 0 to disable aging |
| [in] | usr_ctx | user context data to associate to entry |
| [out] | entry | pointer of the CT entry |
| DOCA_EXPERIMENTAL void doca_flow_ct_aging_conn_timeout | ( | struct doca_flow_ct_aging_ctx * | ctx, |
| uint32_t * | aging_conn_ids, | ||
| uint32_t | n | ||
| ) |
Remove timeout connections inside aging plugin timer callback.
| ctx | CT Aging callback context |
| aging_conn_ids | List of aging global connection IDs |
| n | Number of connections to remove |
| DOCA_EXPERIMENTAL void doca_flow_ct_aging_conn_update | ( | struct doca_flow_ct_aging_ctx * | ctx, |
| struct doca_flow_ct_aging_conn_update_info * | info, | ||
| uint32_t | n | ||
| ) |
Update connection counter inside aging plugin timer callback.
| ctx | CT Aging callback context |
| info | List of connection info |
| n | Number of connections to update |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_aging_counter_query | ( | struct doca_flow_ct_aging_ctx * | ctx, |
| struct doca_flow_ct_aging_counter * | ctrs, | ||
| uint32_t | n | ||
| ) |
Get counter statistics inside aging plugin timer callback.
| ctx | CT Aging callback context | |
| [out] | ctrs | List of counter states with counter ID set |
| n | Number of counter statistics to get |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_aging_counter_state_get | ( | struct doca_flow_ct_aging_ctx * | ctx, |
| struct doca_flow_ct_aging_counter_state * | ctrs, | ||
| uint32_t | n | ||
| ) |
Get counter state inside aging plugin timer callback.
| ctx | CT Aging callback context | |
| [out] | ctrs | List of counter states with counter ID set |
| n | Number of counter states to get |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_aging_counter_state_set | ( | struct doca_flow_ct_aging_ctx * | ctx, |
| struct doca_flow_ct_aging_counter_state * | ctrs, | ||
| uint32_t | n | ||
| ) |
Set counter state inside aging plugin timer callback.
| ctx | CT Aging callback context |
| ctrs | List of counter states |
| n | Number of counter states to set |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cap_is_dev_supported | ( | const struct doca_devinfo * | devinfo | ) |
Check if doca device supported by CT.
| devinfo | Doca device info. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_create | ( | struct doca_flow_ct_cfg ** | cfg | ) |
Create CT configuration.
| [out] | cfg | CT configuration. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_destroy | ( | struct doca_flow_ct_cfg * | cfg | ) |
Destroy CT configuration.
| [in] | cfg | CT configuration. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_aging_core | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | aging_core | ||
| ) |
Set core ID to run aging thread on.
| [in] | cfg | CT configuration. |
| [in] | aging_core | Core to run aging thread on. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_aging_plugin_ops | ( | struct doca_flow_ct_cfg * | cfg, |
| struct doca_flow_ct_aging_ops * | aging_ops | ||
| ) |
Set aging plugin callbacks.
| [in] | cfg | CT configuration. |
| [in] | aging_ops | Aging plugin callbacks. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_aging_query_delay | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | aging_query_delay_s | ||
| ) |
Set aging query delay in seconds.
| [in] | cfg | CT configuration. |
| [in] | aging_query_delay_s | Aging query delay in seconds. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_connections | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | n_ipv4, | ||
| uint32_t | n_ipv6, | ||
| uint32_t | n_total | ||
| ) |
Set number of ARM sessions.
| [in] | cfg | CT configuration. |
| [in] | n_ipv4 | Number of IPv4 sessions. |
| [in] | n_ipv6 | Number of IPv6 sessions. |
| [in] | n_total | Total number of sessions. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_counter_asymmetric | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | n_counter_asymmetric | ||
| ) |
Set number of asymmetric counter connections.
| [in] | cfg | CT configuration. |
| [in] | n_counter_asymmetric | Max number of connections with asymmetric counter. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_ctrl_queues | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | n_ctrl_queues | ||
| ) |
Set number of control queues.
| [in] | cfg | CT configuration. |
| [in] | n_ctrl_queues | Number of control queues. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_direction | ( | struct doca_flow_ct_cfg * | cfg, |
| bool | direction, | ||
| bool | match_inner, | ||
| struct doca_flow_meta * | zone_match_mask, | ||
| struct doca_flow_meta * | meta_modify_mask | ||
| ) |
Set CT configuration origin and reply direction.
| [in] | cfg | CT configuration. |
| [in] | direction | Direction of the CT configuration. |
| [in] | match_inner | Match inner 5-tuples. |
| [in] | zone_match_mask | Zone match mask. |
| [in] | meta_modify_mask | Meta modify mask. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_dup_filter_size | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | dup_filter_sz | ||
| ) |
Set Number of connections to cache in duplication filter.
| [in] | cfg | CT configuration. |
| [in] | dup_filter_sz | Connection duplication filter cache size. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_entry_finalize_cb | ( | struct doca_flow_ct_cfg * | cfg, |
| doca_flow_ct_entry_finalize_cb | entry_finalize_cb | ||
| ) |
Set entry finalize callback to query connection final stats.
| [in] | cfg | CT configuration. |
| [in] | entry_finalize_cb | Entry finalize callback. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_entry_private_data_size | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | entry_priv_data_size | ||
| ) |
Set entry private data size.
| [in] | cfg | CT configuration. |
| [in] | entry_priv_data_size | Entry private data size. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_flags | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | flags | ||
| ) |
Set CT flags.
| [in] | cfg | CT configuration. |
| [in] | flags | CT flags. see enum doca_flow_ct_flags. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_max_connections_per_zone | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | max_connections_per_zone | ||
| ) |
Set maximum number of connections per zone.
| [in] | cfg | CT configuration. |
| [in] | max_connections_per_zone | Max number of CT connections per zone, default 0x200000. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_queue_depth | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | queue_depth | ||
| ) |
Set queue depth.
| [in] | cfg | CT configuration. |
| [in] | queue_depth | Queue depth. Default to 512 |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_queues | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | n_queues | ||
| ) |
Set number of hardware queues.
| [in] | cfg | CT configuration. |
| [in] | n_queues | Number of hardware queues. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_status_update_cb | ( | struct doca_flow_ct_cfg * | cfg, |
| doca_flow_ct_stats_update_cb | stats_update_cb | ||
| ) |
Set status update callback to notify on counter changes.
| [in] | cfg | CT configuration. |
| [in] | stats_update_cb | Status update callback. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_cfg_set_user_actions | ( | struct doca_flow_ct_cfg * | cfg, |
| uint32_t | n_user_actions | ||
| ) |
Set number of user actions.
| [in] | cfg | CT configuration. |
| [in] | n_user_actions | Number of shared and non-shared user actions. |
| DOCA_EXPERIMENTAL void doca_flow_ct_destroy | ( | void | ) |
Destroy the doca flow ct.
Release all the resources used by doca flow ct.
Must be invoked before doca flow destroy.
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_entries_process | ( | struct doca_flow_port * | port, |
| uint16_t | pipe_queue, | ||
| uint32_t | min_room, | ||
| uint32_t | max_processed_entries, | ||
| uint32_t * | queue_room | ||
| ) |
Process CT entries in queue.
The application may invoke this function in order to complete the flow rule offloading and to receive the flow rule operation status via callbacks.
This function allows the application to ensure minimal room in the steering queue for pushing entries operations in bulks.
This function also processes entries counter reset and counter update if enabled.
| [in] | port | Port |
| [in] | pipe_queue | Queue identifier. |
| [in] | min_room | Non-zero value: minimal room to ensure in queue. max_processed_entries must be set to same value or greater. 0 to poll queue once, process any entries operation completion available. |
| [in] | max_processed_entries | Flow CT entries number to process from hardware steering queue. If it is 0, no limitation, process all entries available, max is queue depth. |
| [out] | queue_room | If set, return queue room available after processing entries. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_entry_add_dir | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| uint32_t | flags, | ||
| struct doca_flow_ct_match * | match, | ||
| const struct doca_flow_ct_actions * | actions, | ||
| uint32_t | fwd_handle, | ||
| struct doca_flow_pipe_entry * | entry | ||
| ) |
Add missing direction rule to CT connection.
The direction must be specified via flags, must be empty when the connection created. Must call doca_flow_entries_process to polling adding result.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | flags | operation flags, see doca_flow_ct_entry_flags. |
| [in] | match | match pattern of the direction. |
| [in] | actions | actions to set of the direction |
| [in] | fwd_handle | fwd handle for the input direction created |
| [in] | entry | pointer of the entry |
| DOCA_EXPERIMENTAL uint32_t doca_flow_ct_entry_get_aging_conn_id | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| struct doca_flow_pipe_entry * | entry | ||
| ) |
Retrieves the aging connection ID associated with a given CT entry.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | entry | CT entry. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_entry_get_by_id | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| uint32_t | conn_id, | ||
| struct doca_flow_pipe_entry ** | entry, | ||
| void ** | priv_data | ||
| ) |
Retrieves the entry from CT pipe based on the given connection ID.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | conn_id | CT connection ID inside queue. |
| [out] | entry | CT entry retrieved by the query. |
| [out] | priv_data | Private data associated with the CT entry. |
| DOCA_EXPERIMENTAL uint32_t doca_flow_ct_entry_get_conn_id | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| struct doca_flow_pipe_entry * | entry | ||
| ) |
Retrieves the connection ID associated with a given CT entry.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | entry | CT entry. |
| DOCA_EXPERIMENTAL void* doca_flow_ct_entry_get_priv_data | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| struct doca_flow_pipe_entry * | entry | ||
| ) |
Retrieves the user private data associated with a specific CT entry.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | entry | The CT pipe entry to query. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_entry_prepare | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| uint32_t | flags, | ||
| struct doca_flow_ct_match * | match_origin, | ||
| uint32_t | hash_origin, | ||
| struct doca_flow_ct_match * | match_reply, | ||
| uint32_t | hash_reply, | ||
| struct doca_flow_pipe_entry ** | entry, | ||
| bool * | conn_found | ||
| ) |
Lookup recent CT entry and create on miss.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | flags | operation flags, see doca_flow_ct_entry_flags. |
| [in] | match_origin | match pattern in origin direction. |
| [in] | hash_origin | 5 tuple hash of origin direction. |
| [in] | match_reply | match pattern in reply direction, default to reverse of origin pattern. |
| [in] | hash_reply | 5 tuple hash of reply direction. |
| [out] | entry | pointer to save the new entry |
| [out] | conn_found | whether the entry is found in recent list. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_entry_prepare_rollback | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| struct doca_flow_pipe_entry * | entry | ||
| ) |
Free the CT entry that hasn't been added to CT pipe.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [out] | entry | pointer to the CT entry |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_fwd_register | ( | struct doca_flow_port * | port, |
| uint32_t | fwd_count, | ||
| struct doca_flow_fwd | fwd[], | ||
| uint32_t | fwd_handle[] | ||
| ) |
CT register multiple forwards pipes.
| [in] | port | Port struct. |
| [in] | fwd_count | number of CT forwards |
| [in] | fwd | array of CT forwards |
| [out] | fwd_handle | array of forward handles |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_get_entry | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| uint32_t | flags, | ||
| struct doca_flow_pipe_entry * | entry, | ||
| struct doca_flow_ct_match * | match_origin, | ||
| struct doca_flow_ct_match * | match_reply, | ||
| uint64_t * | entry_flags | ||
| ) |
Get CT entry match pattern.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | flags | operation flags, see doca_flow_ct_entry_flags. |
| [in] | entry | CT entry. |
| [out] | match_origin | Pointer to save match pattern of origin direction |
| [out] | match_reply | Pointer to save match pattern of reply direction |
| [out] | entry_flags | Entry flags, see doca_flow_ct_entry_flags. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_init | ( | const struct doca_flow_ct_cfg * | cfg | ) |
Initialize the doca flow ct.
This is the global initialization function for doca flow ct. 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 ct initialization and global configurations.
Must be invoked after Doca Flow initialization, before port start.
| cfg | CT configuration. |
| DOCA_EXPERIMENTAL uint32_t doca_flow_ct_meta_get_zone_offset | ( | bool | is_reply | ) |
Get zone data bit offset in meta data field.
| is_reply | Reply direction in asymmetric mode. |
| DOCA_EXPERIMENTAL void doca_flow_ct_meta_mask_prepare | ( | struct doca_flow_meta * | meta, |
| bool | is_reply | ||
| ) |
Prepare meta as mask with zone and CT type.
| meta | Doca flow meta. |
| is_reply | Prepare reply direction zone in asymmetric mode. |
| DOCA_EXPERIMENTAL void doca_flow_ct_meta_prepare | ( | struct doca_flow_meta * | meta, |
| uint32_t | zone, | ||
| bool | is_reply | ||
| ) |
Prepare meta with zone and default CT type.
| meta | Doca flow meta. |
| zone | Zone value. |
| is_reply | Prepare reply direction zone in asymmetric mode. |
| DOCA_EXPERIMENTAL void doca_flow_ct_meta_set_match_zone | ( | struct doca_flow_meta * | meta, |
| uint32_t | zone, | ||
| bool | is_reply | ||
| ) |
Set meta match zone data to doca_flow meta.
| meta | doca_flow meta. |
| zone | Zone value. |
| is_reply | Set reply direction zone in asymmetric mode. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_query_entry | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| uint32_t | flags, | ||
| struct doca_flow_pipe_entry * | entry, | ||
| struct doca_flow_resource_query * | stats_origin, | ||
| struct doca_flow_resource_query * | stats_reply, | ||
| uint64_t * | last_hit_s | ||
| ) |
Extract information about specific entry.
Query the packet statistics about specific CT pipe entry
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | flags | operation flags, see doca_flow_ct_entry_flags. |
| [in] | entry | The CT pipe entry to query. |
| [in] | stats_origin | Data of origin direction retrieved by the query. |
| [in] | stats_reply | Data of reply direction retrieved by the query. |
| [in] | last_hit_s | Last hit time in the number of seconds since the Epoch. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_rm_entry | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| uint32_t | flags, | ||
| struct doca_flow_pipe_entry * | entry | ||
| ) |
remove CT entry.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | flags | operation flags, see doca_flow_ct_entry_flags. |
| [in] | entry | The CT pipe entry to query. |
| DOCA_EXPERIMENTAL doca_error_t doca_flow_ct_update_entry | ( | uint16_t | queue, |
| struct doca_flow_pipe * | pipe, | ||
| uint32_t | flags, | ||
| struct doca_flow_pipe_entry * | entry, | ||
| const struct doca_flow_ct_actions * | actions_origin, | ||
| const struct doca_flow_ct_actions * | actions_reply, | ||
| uint32_t | fwd_handle_origin, | ||
| uint32_t | fwd_handle_reply, | ||
| uint32_t | timeout_s | ||
| ) |
Update CT entry meta or counter.
| [in] | queue | queue ID, offset from doca_flow.nb_queues. |
| [in] | pipe | Pointer to pipe. |
| [in] | flags | operation flags, see doca_flow_ct_entry_flags. |
| [in] | entry | The CT pipe entry to query. |
| [in] | actions_origin | actions to set on origin direction |
| [in] | actions_reply | actions ta to set on reply direction |
| [in] | fwd_handle_origin | fwd handle for origin direction |
| [in] | fwd_handle_reply | fwd handle for reply direction |
| [in] | timeout_s | aging timeout in second, 0 to disable aging |