mcdi_mon.h revision 300607
1145519Sdarrenr/*-
2145510Sdarrenr * Copyright (c) 2009-2016 Solarflare Communications Inc.
3170268Sdarrenr * All rights reserved.
4170268Sdarrenr *
5170268Sdarrenr * Redistribution and use in source and binary forms, with or without
6170268Sdarrenr * modification, are permitted provided that the following conditions are met:
7170268Sdarrenr *
8170268Sdarrenr * 1. Redistributions of source code must retain the above copyright notice,
9170268Sdarrenr *    this list of conditions and the following disclaimer.
10170268Sdarrenr * 2. Redistributions in binary form must reproduce the above copyright notice,
11145510Sdarrenr *    this list of conditions and the following disclaimer in the documentation
12145547Sdarrenr *    and/or other materials provided with the distribution.
13145510Sdarrenr *
14145510Sdarrenr * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15145510Sdarrenr * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16145510Sdarrenr * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17145510Sdarrenr * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18145510Sdarrenr * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19145510Sdarrenr * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20145510Sdarrenr * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21145510Sdarrenr * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22145510Sdarrenr * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23145510Sdarrenr * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24145510Sdarrenr * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25145510Sdarrenr *
26145510Sdarrenr * The views and conclusions contained in the software and documentation are
27145510Sdarrenr * those of the authors and should not be interpreted as representing official
28145510Sdarrenr * policies, either expressed or implied, of the FreeBSD Project.
29145510Sdarrenr *
30145510Sdarrenr * $FreeBSD: head/sys/dev/sfxge/common/mcdi_mon.h 300607 2016-05-24 12:16:57Z arybchik $
31145510Sdarrenr */
32145510Sdarrenr
33145510Sdarrenr#ifndef _SYS_MCDI_MON_H
34145510Sdarrenr#define	_SYS_MCDI_MON_H
35145510Sdarrenr
36145510Sdarrenr#include "efx.h"
37145510Sdarrenr
38145510Sdarrenr#ifdef	__cplusplus
39145510Sdarrenrextern "C" {
40145510Sdarrenr#endif
41145510Sdarrenr
42145510Sdarrenr#if EFSYS_OPT_MON_MCDI
43145510Sdarrenr
44147547Sdarrenr#if EFSYS_OPT_MON_STATS
45145510Sdarrenr
46145510Sdarrenr	__checkReturn	efx_rc_t
47145510Sdarrenrmcdi_mon_cfg_build(
48145510Sdarrenr    __in		efx_nic_t *enp);
49145510Sdarrenr
50145510Sdarrenr			void
51145510Sdarrenrmcdi_mon_cfg_free(
52145510Sdarrenr	__in		efx_nic_t *enp);
53145510Sdarrenr
54145510Sdarrenr
55145510Sdarrenrextern	__checkReturn			efx_rc_t
56145510Sdarrenrmcdi_mon_ev(
57147547Sdarrenr	__in				efx_nic_t *enp,
58145510Sdarrenr	__in				efx_qword_t *eqp,
59145510Sdarrenr	__out				efx_mon_stat_t *idp,
60145510Sdarrenr	__out				efx_mon_stat_value_t *valuep);
61145510Sdarrenr
62145510Sdarrenrextern	__checkReturn			efx_rc_t
63147547Sdarrenrmcdi_mon_stats_update(
64147547Sdarrenr	__in				efx_nic_t *enp,
65145510Sdarrenr	__in				efsys_mem_t *esmp,
66147547Sdarrenr	__inout_ecount(EFX_MON_NSTATS)	efx_mon_stat_value_t *values);
67145510Sdarrenr
68145510Sdarrenr#endif	/* EFSYS_OPT_MON_STATS */
69145510Sdarrenr
70145510Sdarrenr#endif /* EFSYS_OPT_MON_MCDI */
71145510Sdarrenr
72145510Sdarrenr#ifdef	__cplusplus
73}
74#endif
75
76#endif	/* _SYS_MCDI_MON_H */
77