1*49ef7e06SGarrett D'Amore /*
2*49ef7e06SGarrett D'Amore  * Copyright (c) 2009-2015 Solarflare Communications Inc.
3*49ef7e06SGarrett D'Amore  * All rights reserved.
4*49ef7e06SGarrett D'Amore  *
5*49ef7e06SGarrett D'Amore  * Redistribution and use in source and binary forms, with or without
6*49ef7e06SGarrett D'Amore  * modification, are permitted provided that the following conditions are met:
7*49ef7e06SGarrett D'Amore  *
8*49ef7e06SGarrett D'Amore  * 1. Redistributions of source code must retain the above copyright notice,
9*49ef7e06SGarrett D'Amore  *    this list of conditions and the following disclaimer.
10*49ef7e06SGarrett D'Amore  * 2. Redistributions in binary form must reproduce the above copyright notice,
11*49ef7e06SGarrett D'Amore  *    this list of conditions and the following disclaimer in the documentation
12*49ef7e06SGarrett D'Amore  *    and/or other materials provided with the distribution.
13*49ef7e06SGarrett D'Amore  *
14*49ef7e06SGarrett D'Amore  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15*49ef7e06SGarrett D'Amore  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16*49ef7e06SGarrett D'Amore  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17*49ef7e06SGarrett D'Amore  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18*49ef7e06SGarrett D'Amore  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19*49ef7e06SGarrett D'Amore  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20*49ef7e06SGarrett D'Amore  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21*49ef7e06SGarrett D'Amore  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22*49ef7e06SGarrett D'Amore  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23*49ef7e06SGarrett D'Amore  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24*49ef7e06SGarrett D'Amore  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*49ef7e06SGarrett D'Amore  *
26*49ef7e06SGarrett D'Amore  * The views and conclusions contained in the software and documentation are
27*49ef7e06SGarrett D'Amore  * those of the authors and should not be interpreted as representing official
28*49ef7e06SGarrett D'Amore  * policies, either expressed or implied, of the FreeBSD Project.
29*49ef7e06SGarrett D'Amore  */
30*49ef7e06SGarrett D'Amore 
31*49ef7e06SGarrett D'Amore #ifndef _SYS_MCDI_MON_H
32*49ef7e06SGarrett D'Amore #define	_SYS_MCDI_MON_H
33*49ef7e06SGarrett D'Amore 
34*49ef7e06SGarrett D'Amore #include "efx.h"
35*49ef7e06SGarrett D'Amore 
36*49ef7e06SGarrett D'Amore #ifdef	__cplusplus
37*49ef7e06SGarrett D'Amore extern "C" {
38*49ef7e06SGarrett D'Amore #endif
39*49ef7e06SGarrett D'Amore 
40*49ef7e06SGarrett D'Amore #if EFSYS_OPT_MON_MCDI
41*49ef7e06SGarrett D'Amore 
42*49ef7e06SGarrett D'Amore #if EFSYS_OPT_MON_STATS
43*49ef7e06SGarrett D'Amore 
44*49ef7e06SGarrett D'Amore 	__checkReturn	efx_rc_t
45*49ef7e06SGarrett D'Amore mcdi_mon_cfg_build(
46*49ef7e06SGarrett D'Amore     __in		efx_nic_t *enp);
47*49ef7e06SGarrett D'Amore 
48*49ef7e06SGarrett D'Amore 			void
49*49ef7e06SGarrett D'Amore mcdi_mon_cfg_free(
50*49ef7e06SGarrett D'Amore 	__in		efx_nic_t *enp);
51*49ef7e06SGarrett D'Amore 
52*49ef7e06SGarrett D'Amore 
53*49ef7e06SGarrett D'Amore extern	__checkReturn			efx_rc_t
54*49ef7e06SGarrett D'Amore mcdi_mon_ev(
55*49ef7e06SGarrett D'Amore 	__in				efx_nic_t *enp,
56*49ef7e06SGarrett D'Amore 	__in				efx_qword_t *eqp,
57*49ef7e06SGarrett D'Amore 	__out				efx_mon_stat_t *idp,
58*49ef7e06SGarrett D'Amore 	__out				efx_mon_stat_value_t *valuep);
59*49ef7e06SGarrett D'Amore 
60*49ef7e06SGarrett D'Amore extern	__checkReturn			efx_rc_t
61*49ef7e06SGarrett D'Amore mcdi_mon_stats_update(
62*49ef7e06SGarrett D'Amore 	__in				efx_nic_t *enp,
63*49ef7e06SGarrett D'Amore 	__in				efsys_mem_t *esmp,
64*49ef7e06SGarrett D'Amore 	__inout_ecount(EFX_MON_NSTATS)	efx_mon_stat_value_t *values);
65*49ef7e06SGarrett D'Amore 
66*49ef7e06SGarrett D'Amore #endif	/* EFSYS_OPT_MON_STATS */
67*49ef7e06SGarrett D'Amore 
68*49ef7e06SGarrett D'Amore #endif /* EFSYS_OPT_MON_MCDI */
69*49ef7e06SGarrett D'Amore 
70*49ef7e06SGarrett D'Amore #ifdef	__cplusplus
71*49ef7e06SGarrett D'Amore }
72*49ef7e06SGarrett D'Amore #endif
73*49ef7e06SGarrett D'Amore 
74*49ef7e06SGarrett D'Amore #endif	/* _SYS_MCDI_MON_H */
75