mlx5dv_create_flow(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | ARGUMENTS | RETURN VALUE | SEE ALSO | AUTHOR | COLOPHON

mlx5dv_create_flow(3)    mlx5 Programmer’s Manual   mlx5dv_create_flow(3)

NAME         top

       mlx5dv_create_flow - creates a steering flow rule

SYNOPSIS         top

              #include <infiniband/mlx5dv.h>

              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[])

DESCRIPTION         top

       mlx5dv_create_flow() creates a steering flow rule with the ability
       to specify specific driver properties.

ARGUMENTS         top

       Please see mlx5dv_create_flow_matcher(3) for flow_matcher and
       match_value.

       num_actions
              Specifies how many actions are passed in actions_attr

   actions_attr
              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;
                  };
              };

       type   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.

       qp     QP passed, to be used with type
              MLX5DV_FLOW_ACTION_DEST_IBV_QP.

       action Flow action, to be used with type
              MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION see
              mlx5dv_create_flow_action_modify_header(3) and
              mlx5dv_create_flow_action_packet_reformat(3).

       tag_value
              tag value to be passed in the work completion, to be used
              with type MLX5DV_FLOW_ACTION_TAG see ibv_create_cq_ex(3).

       obj    DEVX object, to be used with type
              MLX5DV_FLOW_ACTION_DEST_DEVX or by
              MLX5DV_FLOW_ACTION_COUNTERS_DEVX.

RETURN VALUE         top

       mlx5dv_create_flow returns a pointer to the created flow rule, on
       error NULL will be returned and errno will be set.

SEE ALSO         top

       mlx5dv_create_flow_action_modify_header(3),
       mlx5dv_create_flow_action_packet_reformat(3),
       mlx5dv_create_flow_matcher(3), mlx5dv_create_qp(3),
       ibv_create_qp_ex(3) ibv_create_cq_ex(3) ibv_create_counters(3)

AUTHOR         top

       Mark Bloch ⟨marb@mellanox.com⟩

COLOPHON         top

       This page is part of the rdma-core (RDMA Core Userspace Libraries
       and Daemons) project.  Information about the project can be found
       at ⟨https://github.com/linux-rdma/rdma-core⟩.  If you have a bug
       report for this manual page, send it to
       linux-rdma@vger.kernel.org.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/linux-rdma/rdma-core.git⟩ on 2025-08-11.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2025-08-04.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there is
       a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

mlx5                            2018-9-19           mlx5dv_create_flow(3)