1mlx5dv_create_flow(3) mlx5 Programmer’s Manual mlx5dv_create_flow(3)
2
3
4
6 mlx5dv_create_flow - creates a steering flow rule
7
9 #include <infiniband/mlx5dv.h>
10
11 struct ibv_flow *
12 mlx5dv_create_flow(struct mlx5dv_flow_matcher *flow_matcher,
13 struct mlx5dv_flow_match_parameters *match_value,
14 size_t num_actions,
15 struct mlx5dv_flow_action_attr actions_attr[])
16
18 mlx5dv_create_flow() creates a steering flow rule with the ability to
19 specify specific driver properties.
20
22 Please see mlx5dv_create_flow_matcher(3) for flow_matcher and
23 match_value.
24
25 num_actions
26 Specifies how many actions are passed in actions_attr
27
28 actions_attr
29 struct mlx5dv_flow_action_attr {
30 enum mlx5dv_flow_action_type type;
31 union {
32 struct ibv_qp *qp;
33 struct ibv_counters *counter;
34 struct ibv_flow_action *action;
35 uint32_t tag_value;
36 struct mlx5dv_devx_obj *obj;
37 };
38 };
39
40 type MLX5DV_FLOW_ACTION_DEST_IBV_QP The QP passed will receive the
41 matched packets. MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION The flow
42 action to be applied. MLX5DV_FLOW_ACTION_TAG Flow tag to be
43 provided in work completion. MLX5DV_FLOW_ACTION_DEST_DEVX The
44 DEVX destination object for the matched packets.
45 MLX5DV_FLOW_ACTION_COUNTERS_DEVX The DEVX counter object for the
46 matched packets. MLX5DV_FLOW_ACTION_DEFAULT_MISS Steer the
47 packet to the default miss destination. MLX5DV_FLOW_ACTION_DROP
48 Action is dropping the matched packet.
49
50 qp QP passed, to be used with type MLX5DV_FLOW_ACTION_DEST_IBV_QP.
51
52 action Flow action, to be used with type MLX5DV_FLOW_AC‐
53 TION_IBV_FLOW_ACTION see mlx5dv_create_flow_action_modify_head‐
54 er(3) and mlx5dv_create_flow_action_packet_reformat(3).
55
56 tag_value
57 tag value to be passed in the work completion, to be used with
58 type MLX5DV_FLOW_ACTION_TAG see ibv_create_cq_ex(3).
59
60 obj DEVX object, to be used with type MLX5DV_FLOW_ACTION_DEST_DEVX
61 or by MLX5DV_FLOW_ACTION_COUNTERS_DEVX.
62
64 mlx5dv_create_flow returns a pointer to the created flow rule, on error
65 NULL will be returned and errno will be set.
66
68 mlx5dv_create_flow_action_modify_header(3), mlx5dv_create_flow_ac‐
69 tion_packet_reformat(3), mlx5dv_create_flow_matcher(3), mlx5dv_cre‐
70 ate_qp(3), ibv_create_qp_ex(3) ibv_create_cq_ex(3) ibv_create_coun‐
71 ters(3)
72
74 Mark Bloch <marb@mellanox.com>
75
76
77
78mlx5 2018-9-19 mlx5dv_create_flow(3)