1mlx5dv_create_flow_matcher(3m)lx5 Programmer’s Manuamllx5dv_create_flow_matcher(3)
2
3
4
6 mlx5dv_create_flow_matcher - creates a matcher to be used with
7 mlx5dv_create_flow(3)
8
10 #include <infiniband/mlx5dv.h>
11
12 struct mlx5dv_flow_matcher *
13 mlx5dv_create_flow_matcher(struct ibv_context *context,
14 struct mlx5dv_flow_matcher_attr *attr)
15
17 mlx5dv_create_flow_matcher() creates a flow matcher (mask) to be used
18 with mlx5dv_create_flow(3).
19
21 Please see ibv_open_device(3) for context.
22
23 attr
24 struct mlx5dv_flow_matcher_attr {
25 enum ibv_flow_attr_type type;
26 uint32_t flags; /* From enum ibv_flow_flags */
27 uint16_t priority;
28 uint8_t match_criteria_enable; /* Device spec format */
29 struct mlx5dv_flow_match_parameters *match_mask;
30 uint64_t comp_mask;
31 enum mlx5dv_flow_table_type ft_type;
32 };
33
34 type Type of matcher to be created: IBV_FLOW_ATTR_NORMAL: Normal rule
35 according to specification.
36
37 flags special flags to control rule: 0: Nothing or zero value means
38 matcher will store ingress flow rules. IBV_FLOW_AT‐
39 TR_FLAGS_EGRESS: Specified this matcher will store egress flow
40 rules.
41
42 priority
43 See ibv_create_flow(3).
44
45 match_criteria_enable
46 What match criteria is configured in match_mask, passed in de‐
47 vice spec format.
48
49 match_mask
50 struct mlx5dv_flow_match_parameters {
51 size_t match_sz;
52 uint64_t match_buf[]; /* Device spec format */
53 };
54
55 match_sz
56 Size in bytes of match_buf.
57
58 match_buf
59 Set which mask to be used, passed in device spec format.
60
61 comp_mask
62 MLX5DV_FLOW_MATCHER_MASK_FT_TYPE for ft_type
63
64 ft_type
65 Specified in which flow table type, the matcher will store the flow
66 rules: MLX5DV_FLOW_TABLE_TYPE_NIC_RX: Specified this matcher will store
67 ingress flow rules. MLX5DV_FLOW_TABLE_TYPE_NIC_TX Specified this
68 matcher will store egress flow rules. MLX5DV_FLOW_TABLE_TYPE_FDB :
69 Specified this matcher will store FDB rules. MLX5DV_FLOW_TA‐
70 BLE_TYPE_RDMA_RX: Specified this matcher will store ingress RDMA flow
71 rules. MLX5DV_FLOW_TABLE_TYPE_RDMA_TX: Specified this matcher will
72 store egress RDMA flow rules.
73
75 mlx5dv_create_flow_matcher returns a pointer to mlx5dv_flow_matcher, on
76 error NULL will be returned and errno will be set.
77
79 ibv_open_device(3), ibv_create_flow(3)
80
82 Mark Bloch <markb@mellanox.com>
83
84
85
86mlx5 2018-9-19 mlx5dv_create_flow_matcher(3)