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 };
32
33 type Type of matcher to be created: IBV_FLOW_ATTR_NORMAL: Normal rule
34 according to specification.
35
36 flags special flags to control rule: 0: Nothing or zero value means
37 matcher will store ingress flow rules. IBV_FLOW_AT‐
38 TR_FLAGS_EGRESS: Specified this matcher will store egress flow
39 rules.
40
41 priority
42 See ibv_create_flow(3).
43
44 match_criteria_enable
45 What match criteria is configured in match_mask, passed in de‐
46 vice spec format.
47
48 match_mask
49 struct mlx5dv_flow_match_parameters {
50 size_t match_sz;
51 uint64_t match_buf[]; /* Device spec format */
52 };
53
54 match_sz
55 Size in bytes of match_buf.
56
57 match_buf
58 Set which mask to be used, passed in device spec format.
59
61 mlx5dv_create_flow_matcher returns a pointer to mlx5dv_flow_matcher, on
62 error NULL will be returned and errno will be set.
63
65 ibv_open_device(3), ibv_create_flow(3)
66
68 Mark Bloch <markb@mellanox.com>
69
70
71
72mlx5 2018-9-19 mlx5dv_create_flow_matcher(3)