net/sfc: introduce common driver library
[dpdk.git] / drivers / common / sfc_efx / base / mcdi_mon.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright(c) 2019-2020 Xilinx, Inc.
4  * Copyright(c) 2009-2019 Solarflare Communications Inc.
5  */
6
7 #ifndef _SYS_MCDI_MON_H
8 #define _SYS_MCDI_MON_H
9
10 #include "efx.h"
11
12 #ifdef  __cplusplus
13 extern "C" {
14 #endif
15
16 #if EFSYS_OPT_MON_MCDI
17
18 #if EFSYS_OPT_MON_STATS
19
20 LIBEFX_INTERNAL
21 extern  __checkReturn   efx_rc_t
22 mcdi_mon_cfg_build(
23     __in                efx_nic_t *enp);
24
25 LIBEFX_INTERNAL
26 extern                  void
27 mcdi_mon_cfg_free(
28         __in            efx_nic_t *enp);
29
30
31 LIBEFX_INTERNAL
32 extern  __checkReturn                   efx_rc_t
33 mcdi_mon_ev(
34         __in                            efx_nic_t *enp,
35         __in                            efx_qword_t *eqp,
36         __out                           efx_mon_stat_t *idp,
37         __out                           efx_mon_stat_value_t *valuep);
38
39 LIBEFX_INTERNAL
40 extern  __checkReturn                   efx_rc_t
41 mcdi_mon_stats_update(
42         __in                            efx_nic_t *enp,
43         __in                            efsys_mem_t *esmp,
44         __inout_ecount(EFX_MON_NSTATS)  efx_mon_stat_value_t *values);
45
46 LIBEFX_INTERNAL
47 extern  __checkReturn                   efx_rc_t
48 mcdi_mon_limits_update(
49         __in                            efx_nic_t *enp,
50         __inout_ecount(EFX_MON_NSTATS)  efx_mon_stat_limits_t *values);
51
52 #endif  /* EFSYS_OPT_MON_STATS */
53
54 #endif /* EFSYS_OPT_MON_MCDI */
55
56 #ifdef  __cplusplus
57 }
58 #endif
59
60 #endif  /* _SYS_MCDI_MON_H */