.\" Automatically generated by Pandoc 2.2.1 .\" .TH "mlx5dv_create_flow" "3" "2018\-9\-19" "mlx5" "mlx5 Programmer'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[] .fi .SH DESCRIPTION .PP \f[B]mlx5dv_create_flow()\f[] 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[] for \f[I]flow_matcher\f[] and \f[I]match_value\f[]. .TP .B \f[I]num_actions\f[] Specifies how many actions are passed in \f[I]actions_attr\f[] .RS .RE .SS \f[I]actions_attr\f[] .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[] .fi .TP .B \f[I]type\f[] 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. .RS .RE .TP .B \f[I]qp\f[] QP passed, to be used with \f[I]type\f[] \f[I]MLX5DV_FLOW_ACTION_DEST_IBV_QP\f[]. .RS .RE .TP .B \f[I]action\f[] Flow action, to be used with \f[I]type\f[] \f[I]MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION\f[] see \f[I]mlx5dv_create_flow_action_modify_header(3)\f[] and \f[I]mlx5dv_create_flow_action_packet_reformat(3)\f[]. .RS .RE .TP .B \f[I]tag_value\f[] tag value to be passed in the work completion, to be used with \f[I]type\f[] \f[I]MLX5DV_FLOW_ACTION_TAG\f[] see \f[I]ibv_create_cq_ex(3)\f[]. .RS .RE .TP .B \f[I]obj\f[] DEVX object, to be used with \f[I]type\f[] \f[I]MLX5DV_FLOW_ACTION_DEST_DEVX\f[] or by \f[I]MLX5DV_FLOW_ACTION_COUNTERS_DEVX\f[]. .RS .RE .SH RETURN VALUE .PP \f[B]mlx5dv_create_flow\f[] 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[], \f[I]mlx5dv_create_flow_action_packet_reformat(3)\f[], \f[I]mlx5dv_create_flow_matcher(3)\f[], \f[I]mlx5dv_create_qp(3)\f[], \f[I]ibv_create_qp_ex(3)\f[] \f[I]ibv_create_cq_ex(3)\f[] \f[I]ibv_create_counters(3)\f[] .SH AUTHOR .PP Mark Bloch