mlx5dv_create_flow_matcher(3) — Linux manual page

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

mlx5dv_cr...w_matcher(3) mlx5 Programmer’s Manualmlx5dv_cr...w_matcher(3)

NAME         top

       mlx5dv_create_flow_matcher - creates a matcher to be used with
       mlx5dv_create_flow(3)

SYNOPSIS         top

              #include <infiniband/mlx5dv.h>

              struct mlx5dv_flow_matcher *
              mlx5dv_create_flow_matcher(struct ibv_context *context,
                             struct mlx5dv_flow_matcher_attr *attr)

DESCRIPTION         top

       mlx5dv_create_flow_matcher() creates a flow matcher (mask) to be
       used with mlx5dv_create_flow(3).

ARGUMENTS         top

       Please see ibv_open_device(3) for context.

   attr
              struct mlx5dv_flow_matcher_attr {
                  enum ibv_flow_attr_type type;
                  uint32_t flags; /* From enum ibv_flow_flags */
                  uint16_t priority;
                  uint8_t match_criteria_enable; /* Device spec format */
                  struct mlx5dv_flow_match_parameters *match_mask;
                  uint64_t comp_mask;
                  enum mlx5dv_flow_table_type ft_type;
                  uint32_t ib_port;
              };

       type   Type of matcher to be created: IBV_FLOW_ATTR_NORMAL: Normal
              rule according to specification.

       flags  special flags to control rule: 0: Nothing or zero value
              means matcher will store ingress flow rules.
              IBV_FLOW_ATTR_FLAGS_EGRESS: Specified this matcher will
              store egress flow rules.

       priority
              See ibv_create_flow(3).

       match_criteria_enable
              What match criteria is configured in match_mask, passed in
              device spec format.

   match_mask
              struct mlx5dv_flow_match_parameters {
                  size_t match_sz;
                  uint64_t match_buf[]; /* Device spec format */
              };

       match_sz
              Size in bytes of match_buf.

       match_buf
              Set which mask to be used, passed in device spec format.

       comp_mask
              MLX5DV_FLOW_MATCHER_MASK_FT_TYPE for ft_type
              MLX5DV_FLOW_MATCHER_MASK_IB_PORT for ib_port

   ft_type
       Specified in which flow table type, the matcher will store the
       flow rules: MLX5DV_FLOW_TABLE_TYPE_NIC_RX: Specified this matcher
       will store ingress flow rules.  MLX5DV_FLOW_TABLE_TYPE_NIC_TX
       Specified this matcher will store egress flow rules.
       MLX5DV_FLOW_TABLE_TYPE_FDB : Specified this matcher will store FDB
       rules.  MLX5DV_FLOW_TABLE_TYPE_RDMA_RX: Specified this matcher
       will store ingress RDMA flow rules.
       MLX5DV_FLOW_TABLE_TYPE_RDMA_TX: Specified this matcher will store
       egress RDMA flow rules.  MLX5DV_FLOW_TABLE_TYPE_RDMA_TRANSPORT_RX:
       Specified this matcher will store RDMA transport domain flow
       rules.  MLX5DV_FLOW_TABLE_TYPE_RDMA_TRANSPORT_TX: Specified this
       matcher will store RDMA transport domain flow rules.

   ib_port
       Specified to which vport attach the matcher, this is valid and
       required only when creating the steering RDMA transport domain
       flow table: MLX5DV_FLOW_TABLE_TYPE_RDMA_TRANSPORT_RX
       MLX5DV_FLOW_TABLE_TYPE_RDMA_TRANSPORT_TX

RETURN VALUE         top

       mlx5dv_create_flow_matcher returns a pointer to
       mlx5dv_flow_matcher, on error NULL will be returned and errno will
       be set.

SEE ALSO         top

       ibv_open_device(3), ibv_create_flow(3)

AUTHOR         top

       Mark Bloch ⟨markb@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_cr...w_matcher(3)