[IPOIB] g_stat: added more fields: prev_port and halt thread.
[mirror/winof/.git] / ulp / ipoib / kernel / ipoib_stat.h
1 /*++\r
2 \r
3 Copyright (c) 2005-2009 Mellanox Technologies. All rights reserved.\r
4 \r
5 Module Name:\r
6         ipoib_stat.h\r
7 \r
8 Abstract:\r
9         Statistics Collector header file\r
10 \r
11 Revision History:\r
12 \r
13 Notes:\r
14 \r
15 --*/\r
16 \r
17 #pragma once\r
18 \r
19 #include <ntddk.h>\r
20 \r
21 //\r
22 // restrictions\r
23 //\r
24 \r
25 #define IPOIB_ST_MAX_DEVICES                    8\r
26 \r
27 //\r
28 // enums\r
29 // \r
30 \r
31 //\r
32 // structures\r
33 //\r
34 \r
35 // device\r
36 typedef struct _ipoib_adapter ipoib_adapter_t;\r
37 typedef struct _ipoib_port ipoib_port_t;\r
38 \r
39 \r
40 typedef struct _IPOIB_ST_DEVICE\r
41 {\r
42         boolean_t                       valid;\r
43         ipoib_adapter_t         *p_adapter;\r
44         ipoib_port_t            *p_prev_port;\r
45         PRKTHREAD                       *p_halt_thread;\r
46         int                                     n_power_irps;   // NdisDevicePnPEventPowerProfileChanged \r
47         int                                     n_pnp_irps;             // NdisDevicePnPEventSurpriseRemoved \r
48         \r
49 } IPOIB_ST_DEVICE, *PIPOIB_ST_DEVICE;\r
50 \r
51 // driver\r
52 typedef struct _IPOIB_ST_DRIVER\r
53 {\r
54         PDRIVER_OBJECT          obj;\r
55         \r
56 } IPOIB_ST_DRIVER, *PIPOIB_ST_DRIVER;\r
57 \r
58 // driver stack\r
59 \r
60 typedef struct _IPOIB_ST_STAT\r
61 {\r
62         IPOIB_ST_DRIVER         drv;\r
63         IPOIB_ST_DEVICE         dev[IPOIB_ST_MAX_DEVICES];\r
64         \r
65 } IPOIB_ST_STAT, *PIPOIB_ST_STAT;\r
66 \r
67 extern IPOIB_ST_STAT g_stat;\r
68 \r
69 //\r
70 // functions \r
71 //\r
72 \r
73 void ipoib_st_dev_rmv( PIPOIB_ST_DEVICE p_stat );\r
74 \r
75 PIPOIB_ST_DEVICE ipoib_st_dev_add();\r
76 \r
77 void ipoib_st_init();\r
78 \r
79 \r
80 \r