Introduce driver create and destroy flow methods on the uverbs flow object. This allows the driver to get its specific device attributes to match the underlay specification while still using the generic ib_flow object for cleanup and code sharing. The IB object's attributes are set via the ib_set_flow() helper function. The specific implementation for the given specification is added in downstream patches.
Showing the changes to include/uapi (1 of 7 files). Show all
Unified · Split
| @@ -149,4 +149,21 @@ enum mlx5_ib_flow_type { · 148 unmodified lines | |||
| 149 | MLX5_IB_FLOW_TYPE_MC_DEFAULT, | 149 | MLX5_IB_FLOW_TYPE_MC_DEFAULT, |
| 150 | }; | 150 | }; |
| 151 | 151 | ||
| 152 | enum mlx5_ib_create_flow_attrs { | ||
| 153 | MLX5_IB_ATTR_CREATE_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 154 | MLX5_IB_ATTR_CREATE_FLOW_MATCH_VALUE, | ||
| 155 | MLX5_IB_ATTR_CREATE_FLOW_DEST_QP, | ||
| 156 | MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX, | ||
| 157 | MLX5_IB_ATTR_CREATE_FLOW_MATCHER, | ||
| 158 | }; | ||
| 159 | |||
| 160 | enum mlx5_ib_destoy_flow_attrs { | ||
| 161 | MLX5_IB_ATTR_DESTROY_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 162 | }; | ||
| 163 | |||
| 164 | enum mlx5_ib_flow_methods { | ||
| 165 | MLX5_IB_METHOD_CREATE_FLOW = (1U << UVERBS_ID_NS_SHIFT), | ||
| 166 | MLX5_IB_METHOD_DESTROY_FLOW, | ||
| 167 | }; | ||
| 168 | |||
| 152 | #endif | 169 | #endif |