1 /* 2 * Copyright (C) Mellanox Technologies, Ltd. 2001-2020. 3 * 4 */ 5 #ifndef __MLX5_WIN_ETX_H__ 6 #define __MLX5_WIN_ETX_H__ 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 #include "mlx5devx.h" 13 14 typedef struct mlx5_context { 15 devx_device_ctx *devx_ctx; 16 struct devx_device mlx5_dev; 17 struct devx_shutdown_event shutdown_event_obj; 18 } mlx5_context_st; 19 20 typedef struct { 21 devx_device_ctx *devx_ctx; 22 struct devx_obj_handle *obj; 23 } mlx5_devx_obj_st; 24 25 struct mlx5_devx_umem { 26 void *addr; 27 struct devx_obj_handle *umem_hdl; 28 uint32_t umem_id; 29 }; 30 31 struct mlx5_pd { 32 void *obj; 33 uint32_t pdn; 34 devx_device_ctx *devx_ctx; 35 }; 36 37 struct mlx5_devx_clock { 38 void *p_iseg_internal_timer; 39 u64 clock_frequency_hz; 40 int is_stable_clock_frequency; 41 }; 42 43 #define GET_DEVX_CTX(ctx) (((mlx5_context_st *)ctx)->devx_ctx) 44 #define GET_OBJ_CTX(obj) (((mlx5_devx_obj_st *)obj)->devx_ctx) 45 46 #endif /* __MLX5_WIN_ETX_H__ */ 47