mlx5dv_create_flow_matcher - creates a matcher to be used with mlx5dv_create_flow(3)
#include <infiniband/mlx5dv.h> struct mlx5dv_flow_matcher * mlx5dv_create_flow_matcher(struct ibv_context *context, struct mlx5dv_flow_matcher_attr *attr)
mlx5dv_create_flow_matcher() creates a flow matcher (mask) to be used with mlx5dv_create_flow(3).
Please see ibv_open_device(3) for context.
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;
};
struct mlx5dv_flow_match_parameters {
    size_t match_sz;
    uint64_t match_buf[]; /* Device spec format */
};
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_create_flow_matcher returns a pointer to mlx5dv_flow_matcher, on error NULL will be returned and errno will be set.
ibv_open_device(3), ibv_create_flow(3)
Mark Bloch <markb@mellanox.com>