.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "mlx5dv_create_flow" "3" "2018-9-19" "mlx5" "mlx5 Programmer\[cq]s Manual" .hy .SH NAME .PP mlx5dv_create_flow - creates a steering flow rule .SH SYNOPSIS .IP .nf \f[C] #include struct ibv_flow * mlx5dv_create_flow(struct mlx5dv_flow_matcher *flow_matcher, struct mlx5dv_flow_match_parameters *match_value, size_t num_actions, struct mlx5dv_flow_action_attr actions_attr[]) \f[R] .fi .SH DESCRIPTION .PP \f[B]mlx5dv_create_flow()\f[R] creates a steering flow rule with the ability to specify specific driver properties. .SH ARGUMENTS .PP Please see \f[I]mlx5dv_create_flow_matcher(3)\f[R] for \f[I]flow_matcher\f[R] and \f[I]match_value\f[R]. .TP \f[I]num_actions\f[R] Specifies how many actions are passed in \f[I]actions_attr\f[R] .SS \f[I]actions_attr\f[R] .IP .nf \f[C] struct mlx5dv_flow_action_attr { enum mlx5dv_flow_action_type type; union { struct ibv_qp *qp; struct ibv_counters *counter; struct ibv_flow_action *action; uint32_t tag_value; struct mlx5dv_devx_obj *obj; }; }; \f[R] .fi .TP \f[I]type\f[R] MLX5DV_FLOW_ACTION_DEST_IBV_QP The QP passed will receive the matched packets. MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION The flow action to be applied. MLX5DV_FLOW_ACTION_TAG Flow tag to be provided in work completion. MLX5DV_FLOW_ACTION_DEST_DEVX The DEVX destination object for the matched packets. MLX5DV_FLOW_ACTION_COUNTERS_DEVX The DEVX counter object for the matched packets. MLX5DV_FLOW_ACTION_DEFAULT_MISS Steer the packet to the default miss destination. MLX5DV_FLOW_ACTION_DROP Action is dropping the matched packet. .TP \f[I]qp\f[R] QP passed, to be used with \f[I]type\f[R] \f[I]MLX5DV_FLOW_ACTION_DEST_IBV_QP\f[R]. .TP \f[I]action\f[R] Flow action, to be used with \f[I]type\f[R] \f[I]MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION\f[R] see \f[I]mlx5dv_create_flow_action_modify_header(3)\f[R] and \f[I]mlx5dv_create_flow_action_packet_reformat(3)\f[R]. .TP \f[I]tag_value\f[R] tag value to be passed in the work completion, to be used with \f[I]type\f[R] \f[I]MLX5DV_FLOW_ACTION_TAG\f[R] see \f[I]ibv_create_cq_ex(3)\f[R]. .TP \f[I]obj\f[R] DEVX object, to be used with \f[I]type\f[R] \f[I]MLX5DV_FLOW_ACTION_DEST_DEVX\f[R] or by \f[I]MLX5DV_FLOW_ACTION_COUNTERS_DEVX\f[R]. .SH RETURN VALUE .PP \f[B]mlx5dv_create_flow\f[R] returns a pointer to the created flow rule, on error NULL will be returned and errno will be set. .SH SEE ALSO .PP \f[I]mlx5dv_create_flow_action_modify_header(3)\f[R], \f[I]mlx5dv_create_flow_action_packet_reformat(3)\f[R], \f[I]mlx5dv_create_flow_matcher(3)\f[R], \f[I]mlx5dv_create_qp(3)\f[R], \f[I]ibv_create_qp_ex(3)\f[R] \f[I]ibv_create_cq_ex(3)\f[R] \f[I]ibv_create_counters(3)\f[R] .SH AUTHOR .PP Mark Bloch