devx_free_uar((devx_uar_handle *)uar);
}
+static_assert(MLX5_ST_SZ_BYTES(fte_match_param) == 0x200,
+ "PRM size of fte_match_param is broken! cannot compile Windows!");
+
static void*
mlx5_glue_devx_fs_rule_add(void *ctx, void *in, uint32_t inlen)
return devx_fs_rule_del(flow);
}
+static int
+mlx5_glue_query_rt_values(void *ctx, void *devx_clock)
+{
+ struct mlx5_context *mlx5_ctx;
+ struct mlx5_devx_clock *clock;
+ int err;
+
+ if (!ctx) {
+ errno = EINVAL;
+ return errno;
+ }
+ mlx5_ctx = (struct mlx5_context *)ctx;
+ clock = (struct mlx5_devx_clock *)devx_clock;
+ err = devx_hca_clock_query(
+ mlx5_ctx->devx_ctx,
+ &clock->p_iseg_internal_timer,
+ &clock->clock_frequency_hz,
+ &clock->is_stable_clock_frequency);
+ if (err) {
+ errno = err;
+ return errno;
+ }
+ return 0;
+}
+
+static int
+mlx5_glue_devx_init_showdown_event(void *ctx)
+{
+ struct mlx5_context *mlx5_ctx;
+ int err;
+
+ if (!ctx) {
+ errno = EINVAL;
+ return errno;
+ }
+ mlx5_ctx = (struct mlx5_context *)ctx;
+ err = devx_query_shutdown_event(mlx5_ctx->devx_ctx,
+ &mlx5_ctx->shutdown_event_obj);
+ if (err) {
+ errno = err;
+ return errno;
+ }
+ return 0;
+}
+
alignas(RTE_CACHE_LINE_SIZE)
const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){
.version = MLX5_GLUE_VERSION,
.devx_fs_rule_add = mlx5_glue_devx_fs_rule_add,
.devx_fs_rule_del = mlx5_glue_devx_fs_rule_del,
.devx_query_eqn = mlx5_glue_devx_query_eqn,
+ .query_rt_values = mlx5_glue_query_rt_values,
+ .devx_init_showdown_event = mlx5_glue_devx_init_showdown_event,
};