net/mlx5: enable debug logs dynamically
[dpdk.git] / drivers / common / mlx5 / windows / mlx5_win_ext.h
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 "mlx5_prm.h"
13 #include "mlx5devx.h"
14
15 typedef struct mlx5_context {
16         devx_device_ctx        *devx_ctx;
17         struct devx_device mlx5_dev;
18         struct devx_shutdown_event shutdown_event_obj;
19 } mlx5_context_st;
20
21 typedef struct {
22         devx_device_ctx *devx_ctx;
23         struct devx_obj_handle *obj;
24 } mlx5_devx_obj_st;
25
26 struct mlx5_devx_umem {
27         void                   *addr;
28         struct devx_obj_handle *umem_hdl;
29         uint32_t                umem_id;
30 };
31
32 struct mlx5_pd {
33         void                   *obj;
34         uint32_t                pdn;
35         devx_device_ctx        *devx_ctx;
36 };
37
38 struct mlx5_devx_clock {
39         void *p_iseg_internal_timer;
40         u64 clock_frequency_hz;
41         int is_stable_clock_frequency;
42 };
43
44 #define GET_DEVX_CTX(ctx) (((mlx5_context_st *)ctx)->devx_ctx)
45 #define GET_OBJ_CTX(obj)  (((mlx5_devx_obj_st *)obj)->devx_ctx)
46
47 #endif /* __MLX5_WIN_ETX_H__ */