.\" Automatically generated by Pandoc 1.19.2.4
.\"
.TH "mlx5dv_create_flow_matcher" "3" "2018\-9\-19" "mlx5" "mlx5 Programmer\[aq]s Manual"
.hy
.SH NAME
.PP
mlx5dv_create_flow_matcher \- creates a matcher to be used with
\f[I]mlx5dv_create_flow(3)\f[]
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <infiniband/mlx5dv.h>
struct\ mlx5dv_flow_matcher\ *
mlx5dv_create_flow_matcher(struct\ ibv_context\ *context,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ mlx5dv_flow_matcher_attr\ *attr)
\f[]
.fi
.SH DESCRIPTION
.PP
\f[B]mlx5dv_create_flow_matcher()\f[] creates a flow matcher (mask) to
be used with \f[I]mlx5dv_create_flow(3)\f[].
.SH ARGUMENTS
.PP
Please see \f[I]ibv_open_device(3)\f[] for \f[I]context\f[].
.SS \f[I]attr\f[]
.IP
.nf
\f[C]
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;
};
\f[]
.fi
.TP
.B \f[I]type\f[]
Type of matcher to be created: IBV_FLOW_ATTR_NORMAL: Normal rule
according to specification.
.RS
.RE
.TP
.B \f[I]flags\f[]
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.
.RS
.RE
.TP
.B \f[I]priority\f[]
See \f[I]ibv_create_flow(3)\f[].
.RS
.RE
.TP
.B \f[I]match_criteria_enable\f[]
What match criteria is configured in \f[I]match_mask\f[], passed in
device spec format.
.RS
.RE
.SS \f[I]match_mask\f[]
.IP
.nf
\f[C]
struct\ mlx5dv_flow_match_parameters\ {
\ \ \ \ size_t\ match_sz;
\ \ \ \ uint64_t\ match_buf[];\ /*\ Device\ spec\ format\ */
};
\f[]
.fi
.TP
.B \f[I]match_sz\f[]
Size in bytes of \f[I]match_buf\f[].
.RS
.RE
.TP
.B \f[I]match_buf\f[]
Set which mask to be used, passed in device spec format.
.RS
.RE
.TP
.B \f[I]comp_mask\f[]
MLX5DV_FLOW_MATCHER_MASK_FT_TYPE for \f[I]ft_type\f[]
.RS
.RE
.SS \f[I]ft_type\f[]
.PP
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.
.SH RETURN VALUE
.PP
\f[B]mlx5dv_create_flow_matcher\f[] returns a pointer to
\f[I]mlx5dv_flow_matcher\f[], on error NULL will be returned and errno
will be set.
.SH SEE ALSO
.PP
\f[I]ibv_open_device(3)\f[], \f[I]ibv_create_flow(3)\f[]
.SH AUTHOR
.PP
Mark Bloch <markb@mellanox.com>